Skip to content

Instantly share code, notes, and snippets.

View ttys3's full-sized avatar
💭
sad, ttyS0 has been taken by other user

ttys3

💭
sad, ttyS0 has been taken by other user
View GitHub Profile
@lilydjwg
lilydjwg / gh-check
Last active March 20, 2025 01:02
gh-check: speed test to known GitHub IPs
#!/usr/bin/python3
import asyncio
import time
import socket
import argparse
import aiohttp
class MyConnector(aiohttp.TCPConnector):
@giuseppe
giuseppe / podman_runc_crun.md
Last active April 10, 2024 22:38
runc vs crun performance

running Podman as root

runc

[root@fedora-s-4vcpu-8gb-fra1-01 ~]# for i in {1..10}; do /usr/bin/time -f%e podman \
    --runtime /usr/bin/runc run --rm alpine true; done 2>&1 | sort
1.10
1.10
1.10
@bittner
bittner / keyboard-keys.md
Created February 28, 2019 22:50
Keyboard keys markup in MarkDown

Ctrl + Alt + Space

Cache Latency CPU cycles Size
L1 access ~1.2 ns ~4 Between 32 KB and 512 KB
L2 access ~3 ns ~10 Between 128 KB and 24 MB
L3 access ~12 ns ~40 Between 2 MB and 32 MB
@fnky
fnky / ANSI.md
Last active June 10, 2025 06:47
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@qiulang
qiulang / 不同分词器在elastic中的实际效果.md
Last active October 31, 2022 10:10
不同分词器在elastic中的实际效果
@coin8086
coin8086 / using-proxy-for-git-or-github.md
Last active January 24, 2025 07:47
Use Proxy for Git/GitHub

Use Proxy for Git/GitHub

Generally, the Git proxy configuration depends on the Git Server Protocol you use. And there're two common protocols: SSH and HTTP/HTTPS. Both require a proxy setup already. In the following, I assume a SOCKS5 proxy set up on localhost:1080. But it can also be a HTTP proxy. I'll talk about how to set up a SOCKS5 proxy later.

SSH Protocol

When you do git clone ssh://[user@]server/project.git or git clone [user@]server:project.git, you're using the SSH protocol. You need to configurate your SSH client to use a proxy. Add the following to your SSH config file, say ~/.ssh/config:

ProxyCommand nc -x localhost:1080 %h %p
@phracker
phracker / unpackxip.md
Created August 5, 2018 20:40
Unpack XIP on Linux

Unpacking XIP files on Linux:

  1. Install xar from https://mackyle.github.io/xar/
  2. Install pbzx from https://github.com/NiklasRosenstein/pbzx (use gcc -llzma -lxar -I /usr/local/include pbzx.c -o pbzx and copy the binary into your PATH)
  3. use xar -xf XIP_FILE -C /path/to/extract/to
  4. Change to the directory where you extracted the file.
  5. Use pbzx -n Content | cpio -i to extract the contents.
@hermanbanken
hermanbanken / Dockerfile
Last active May 22, 2025 06:20
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@hjertnes
hjertnes / doom.txt
Created April 6, 2018 08:28
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch