Skip to content

Instantly share code, notes, and snippets.

@loredanacirstea
loredanacirstea / PipeProxy.sol
Last active May 6, 2024 12:03
General proxy for calling external contract functions and returning their output. This is unsafe, work in progress.
pragma solidity ^0.4.24;
contract PipeProxy {
function proxy(
address _to,
bytes input_bytes,
uint256 gas_value
)
payable
@tanghaiduong
tanghaiduong / Show All Files And Folder Hidden By Virus
Created September 24, 2014 13:25
How To Show All Files And Folder Hidden By Virus Using Command Prompt In Windows 8, 7 and XP
1. Open Command Prompt (CMD) as an Administrator.
2. Navigate to the drive whose files are hidden and you want to recover.
3. Then Type attrib -s -h -r /s /d *.* and hit Enter.
4. That is it. Now you will get all the hidden files and folder as general files and you can use it.
@saper-2
saper-2 / README.md
Created January 5, 2024 17:59
Debian on HP T620 terminal - hints

Installation tips

I use only Debian and net-inst image to install linux, and I use text install 😄

  • When partitioning primary disk where will be Debian installed, create first partiton of size 256-512M as EFI System partition - this will set this partition as Bootable, and FileSystem=vfat .
  • Don't forget about swap partition if you have not much too much RAM (at least of size of RAM), I usually create 4-8GB as 2nd partition on disk.
  • You can optionally create partition for /boot that have about 1-2GB , FS=ext4,
  • Or just use whole disk as / , FileSystem=ext4 - I almost always choose this setup - it's the most optimal.
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 6, 2024 12:02
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shankypedia
shankypedia / obtain_completed_quest_badge.rst
Created May 6, 2024 11:21
Guide to obtain the "Completed a Quest" Discord badge

Obtaining the Discord Badge

This guide provides instructions on obtaining the "Completed a Quest" Discord badge using two methods: Vencord or a manual method by updating Discord's settings. Please note that Discord is currently attempting to fix this process, and it may not always work as expected.

Note:

  • This method does not work on a web browser.
  • There must be a user in the voice channel watching your stream.
import asyncpg
import dlt
import asyncio
from typing import Any, Dict, Optional
from dlt.common.schema.typing import TColumnSchema
"""Convert an asyncpg type to a dlt column schema type.
This maps asyncpg types to dlt types based on PostgreSQL to Python type mapping
provided by asyncpg and the dlt data types.
@Iftimie
Iftimie / index.css
Last active May 6, 2024 12:00
Resume
/* Fonts */
/* Family */
h1 {
font-family: 'Julius Sans One', sans-serif;
}
h2 { /* Contact, Skills, Education, About me, Work Experience */
font-family: 'Archivo Narrow', sans-serif;
}
@lu4nm3
lu4nm3 / main.rs
Last active May 6, 2024 12:00
Tokio Async: Concurrent vs Parallel
use futures::StreamExt;
use std::error::Error;
use tokio;
use tokio::macros::support::Pin;
use tokio::prelude::*;
use tokio::time::{Duration, Instant};
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut multi_threaded_runtime = tokio::runtime::Builder::new()
.threaded_scheduler()
/* UTILS AND CONSTANTS*/
const SPEED_MULTIPLIER = 1.852;
const DISTANCE_MULTIPLIER = 111.045;
const SETTINGS = {
"default_object_online_timeout": 5
,"valid_by_avg_speed": false
,"min_moving_speed": 6
,"addon.device_tracker_app_login": false
@jforge
jforge / reset-pi-passwd.md
Created May 6, 2024 11:58 — forked from jlollis/reset-pi-passwd.md
Reset Forgotten Raspberry Password

Reset Forgotten Raspberry Pi Password

Remove SD Card

The first step is to turn off the Raspberry so you can remove the memory card without worry.

If the Raspberry Pi is not connected to a screen, the only way to turn it off is to unplug it. Otherwise, you can go through the GUI to turn it off properly, via the menu, before unplugging it.

Once the Raspberry Pi is turned off, you can insert the card into your computer and go to the next step.