Created
March 20, 2021 02:24
-
-
Save dblume/16bc8212b01d71a674617ca00e147d92 to your computer and use it in GitHub Desktop.
Find a QR code with as few black dots as possible.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Spoiler: | |
# $ ./qrcodes.sh | sort | head | |
# 416 http://7c.dblu.me | |
# 416 https://j.dblu.me | |
# 416 http://wc.dblu.me | |
# 420 http://2E.dblu.me | |
# 420 http://73.dblu.me | |
# | |
set -eu -o pipefail # See: https://sipb.mit.edu/doc/safe-shell/ | |
f () { | |
echo $(qrencode -t ASCII $1 | tr -cd '#' | wc -c) $1 | |
} | |
for X in {a..z} {A..Z} {0..9} | |
do | |
f http://dblu.me/$X | |
f https://dblu.me/$X | |
f http://dblu.me/$X/ | |
f http://$X.dblu.me | |
f https://$X.dblu.me | |
f http://$X.dblu.me/ | |
f http://$X.dlma.com | |
f http://dlma.com/$X | |
for Y in {a..z} {A..Z} {0..9} | |
do | |
f http://dblu.me/$X$Y | |
f http://$X$Y.dblu.me | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment