I hereby claim:
- I am za3k on github.
- I am za3k (https://keybase.io/za3k) on keybase.
- I have a public key whose fingerprint is 4F92 E819 BBDB 4225 ABE6 9043 7DA2 C164 1594 B27F
To claim this, I am signing this object:
| # Written by Claude (Anthropic AI) | |
| # Rewritten by Za3k because it was bad style. | |
| from decimal import Decimal, getcontext | |
| from math import comb | |
| from itertools import product | |
| from collections import defaultdict | |
| getcontext().prec = 100 | |
| def coupon_collector(probs): |
| ################################################################### | |
| Writing C software without the standard library | |
| Linux Edition | |
| ################################################################### | |
| There are many tutorials on the web that explain how to build a | |
| simple hello world in C without the libc on AMD64, but most of them | |
| stop there. | |
| I will provide a more complete explanation that will allow you to | |
| build yourself a little framework to write more complex programs. |
| [Unit] | |
| Description=Web Socket Server | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| User=root | |
| TimeoutStartSec=0 | |
| Restart=always | |
| RestartSec=10 |
| #!/bin/bash | |
| ONERNG=/dev/ttyACM0 | |
| t=onerng.out | |
| stty -F $ONERNG raw -echo clocal -crtscts | |
| echo "cmd0" >$ONERNG # standard noise | |
| echo "cmdO" >$ONERNG # turn it on | |
| stty -F $ONERNG raw -echo clocal -crtscts | |
| gone() { | |
| echo "cmdo" >$ONERNG # turn it off |
| #!/bin/bash | |
| # | |
| # e621 downloader. maintains a mirror of e621 (just DB export+images, not the HTML) | |
| # suggested use is to run this from crontab once per day. | |
| # this maintains an infinite number of database snapshots and also keeps deleted images forever (in a separate directory) because I'm a packrat. feel free to modify to delete old stuff. | |
| # | |
| # written by zachary "za3k" vance. released in the public domain | |
| # | |
| # dependencies: csvtools (davylandman), chronic (joeyh's moreutils, optional), wget, gzip, coreutils | |
| # |
| [18Mar2020 18:25:33.052] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, Za3k, --version, 1.15.2-forge-31.1.25, --gameDir, /home/games-x11/.minecraft, --assetsDir, /home/games-x11/.minecraft/assets, --assetIndex, 1.15, --uuid, 497ab4c654ef4664a8a498c161941088, --accessToken, ❄❄❄❄❄❄❄❄, --userType, legacy, --versionType, release, --launchTarget, fmlclient, --fml.forgeVersion, 31.1.25, --fml.mcVersion, 1.15.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20200307.202953] | |
| [18Mar2020 18:25:33.057] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 5.0.0-milestone.4+67+b1a340b starting: java version 13.0.2 by Oracle Corporation | |
| [18Mar2020 18:25:33.323] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust | |
| [18Mar2020 18:25:33.367] [main/WARN] [net.minecraftforge.fml.loading.FMLConfig/CORE]: Configuration file /home/games-x11/.minecraft/config/fml.toml is not correct. Correcting | |
| [1 |
| import os.path, sys | |
| memory_available = 4 * (10**9) | |
| outfile = "out.pbm" | |
| default_tsv_file="image_lookup_table.tsv" | |
| DEBUG = False | |
| def debug(*x): | |
| if DEBUG: | |
| print(*x) |
| #!/bin/sh | |
| NUMFORMAT=cat | |
| for program in numfmt gnumfmt | |
| do | |
| if which "${program}" 2>/dev/null >/dev/null | |
| then | |
| NUMFORMAT="${program} --to=si" | |
| break | |
| fi | |
| done |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| md5_folder() { | |
| { | |
| # Print md5 hash of every file | |
| find "$1" -type f -print0 | sort -z | xargs -0 md5sum | |
| # Print the names of all files and directories | |
| find "$1" -printf %P\\0 | |
| } | md5sum | awk '{print $1}' | |
| } |