Testing tools that measure process memory usage
Using a nodejs program that uses a known amount of memory to confirm the memory tracking tool is working
Faster file copying on cold AWS EBS volumes (created from snapshot)
chunk the file and copy in parallel
How to treat lines of a file as commands and execute in parallel
use parallel -j8
or xargs -n1 -d='\n' -P8 bash -c
Writing shebang for an executable js script with yarn v2+ and PnP
use env -S
Manually handle custom XDG protocol callback for Linux apps needing auth callbacks
get Location header from resp in browser and call app with $app --open-url $url
Running caddy for local HTTPS with self-signed/snake-oil cert
generate cert+key, write a short Caddyfile, run caddy
nodejs JSON pretty print one-liner
node -p 'JSON.stringify(JSON.parse(fs.readFileSync(0)),null,2)'
kakoune paste block or multiple selections
make sure you split the selection into lines before cutting
base64 each line of a file
encoding the whole file as one is easy, but what about each line on its own
Makefile parallelism respects dependency graph
We run a simple Makefile as proof