Skip to content

Instantly share code, notes, and snippets.

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@i-e-b
i-e-b / adler32.cs
Created September 18, 2017 14:30
Adler32 hash in C#
private static uint Adler32(string str)
{
const int mod = 65521;
uint a = 1, b = 0;
foreach (char c in str) {
a = (a + c) % mod;
b = (b + a) % mod;
}
return (b << 16) | a;
}
@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;
}