Skip to content

Instantly share code, notes, and snippets.

@miku
miku / tri.py
Created February 13, 2023 09:25
langs = {
"de": [
"ein",
"ich",
"nde",
"die",
"und",
"der",
"che",
"end",
@miku
miku / lvz.sh
Last active January 24, 2023 11:26
lvz is a function
lvz ()
{
# go install github.com/ericchiang/pup@latest
for cmd in curl jq pup;
do
if [ ! $(command -v $cmd) ]; then
echo "$cmd required";
return;
fi;
done;
@miku
miku / .gitignore
Last active March 22, 2023 12:38
Minimal zipapp-ish thingy using shiv (https://github.com/linkedin/shiv)
app.zip
build/lib/hello.py
zhello.egg-info
@miku
miku / README.md
Last active July 4, 2022 07:39
Streaming through XML with a Python helper function

XML and large files

Python and stdlib

With Python standard lib only, xstream.py. Stream through a large file by looking, e.g. at one "record" at a time.

@miku
miku / README.md
Created August 21, 2021 20:39 — forked from obscurerichard/README.md
Simulates a low bandwidth, high-latency network connection

slow

This bash script offers quick shortcuts to simulate slower network connections. It is useful when you need to simulate a wireless network on a Linux network server, especially when you are using a virtual machine guest on your local machine or in the cloud.

slow 3G                   # Slow network on default eth0 down to 3G wireless speeds
slow reset                # Reset connection for default eth0 to normal
slow vsat --latency=500ms # Simulate satellite internet  with a high latency
slow dsl -b 1mbps         # Simulate DSL with a slower speed than the default

slow modem-56k -d eth0 # Simulate a 56k modem on the eth1 device. eth0 is unchanged.

// func GetCpuForThread() uint64
TEXT ·GetCpuForThread(SB),7,$0
MOVQ $0xB,AX
XORQ CX,CX
CPUID
MOVQ DX,ret+0(FP)
RET
@miku
miku / .gitignore
Created July 23, 2021 16:03 — forked from tkf/.gitignore
A script to locate libpython associated with the given Python executable.
*.pyc
.pytest_cache
@miku
miku / 945526.945527.pdf
Last active January 11, 2026 16:12
Dijkstra 1965 (Go)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@miku
miku / .gitignore
Last active January 17, 2022 23:30
Lightning talk, Notes on Storage
golangleipzig.cdx
golangleipzig.warc.gz
@miku
miku / .gitignore
Last active February 17, 2023 09:55
A data deduplication example with Go
Extra.md