Skip to content

Instantly share code, notes, and snippets.

@agausmann
agausmann / letterblock.txt
Last active August 3, 2023 02:37
Letterblock reference table
Source: https://www.draketo.de/software/letterblock-diceware.html
| 1 2 3 4 5 6
--|------------------------
1 | 1 A J a h px
2 | 26 BC LR bc i r
3 | 37 DH N d j t
4 | 48 E PX e k u
5 | 59 FK U f m v
6 | 0 QM VW gq o w
@agausmann
agausmann / git-httpsify.sh
Created July 28, 2022 03:55
Convert SSH Git URLs to HTTPS
for gitdir in $(find $HOME -name .git); do cd "$gitdir/.." 2>/dev/null && ( git remote | grep -q origin ) && (git remote get-url origin | grep -q 'git@github\.com:agausmann' ) && git remote set-url origin "https://github.com/agausmann/$(basename "$(git remote get-url origin)")"; done
@agausmann
agausmann / vscode-update.sh
Created April 15, 2022 15:44
Download and extract updates for VS Code in a single command
#!/bin/sh
URL="https://code.visualstudio.com/sha/download?build=stable&os=linux-x64"
OUTPUT="$HOME/.local/lib"
curl -sL "$URL" | tar -zxv -C "$OUTPUT"
@agausmann
agausmann / battery.sh
Last active March 29, 2020 18:49
Alternative to sed for status rewriting
# ...
# emojis omitted because I don't want to go fetch them
case "$status" in
Discharging) status="" ;;
Not charging) status="" ;;
Charging) status="" ;;
Unknown) status="" ;;
Full) status="" ;;
esac
@agausmann
agausmann / keybase.md
Created August 22, 2018 05:41
Keybase Proof

Keybase proof

I hereby claim:

  • I am agausmann on github.
  • I am agausmann (https://keybase.io/agausmann) on keybase.
  • I have a public key whose fingerprint is 3DD8 3678 7FFB B57A 7250 58EB F70E 3791 13AA 4C04

To claim this, I am signing this object:

@agausmann
agausmann / fibonacci.asm
Last active May 26, 2017 19:32
StackJam benchmark programs
top:
000000 1000 # push 0
000001 1100 0101 # pop $4
000011 1001 # push 1
loop:
000100 1100 0100 # push $4
000110 0000 # add
000111 1100 0101 1100 0100 # sav $4
001011 1001 0100 1101 0010 1000 1000 0111 # jo top
010010 1101 0100 # push $5
import System.Environment
import System.IO
import Data.List
main = do
(command:args) <- getArgs
case command of
"view" -> view args
"add" -> add args
"remove" -> remove args
#!/usr/bin/python
import keyword
def eval_cmd(expr):
try:
for kw in keyword.kwlist:
if kw in expr:
return None
for word in dir():