Skip to content

Instantly share code, notes, and snippets.

atoponce / w3w-two-word-compound-unsafe-words.txt
Created Apr 19, 2021
what3words that are not two-word compound safe, such as "wheel" "chair" "woman" "hood". Is that "wheelchair.woman.hood", "wheel.chairwoman.hood", or "wheel.chair.womanhood"?
View w3w-two-word-compound-unsafe-words.txt
View 0-letterblock.js
Improves the security of
- Replace the letters with the original proposal at
- All bigrams are kept, rather than truncating
- Replace Math.random() with crypto.getRandomValues()
- Replace Math.floor(Math.random() * length) with uniform modulo rejection
- Replace a character count with a minimum security margin
- The HTML "Length" input should be replaced with "Security minimum" (or something similar, in bits)
- Implement the checksum per
- Use 6 characters instead of 4 (or 7) for a uniform checksum
View eff-passphrases.json
View largest-deck-id.js
function factorial(n) {
let result = BigInt(1)
while (n > 0) {
result *= BigInt(n)
return result
var deck = []
View lehmer.html
<!doctype html>
<meta charset='utf-8'></meta>
<title>Lehmer Code</title>
input[type=text] {
font-family: monospace;
width: 450px;
atoponce / tilekeys.html
Created Jan 26, 2021
JavaScript TileKey generator
View tilekeys.html
<!doctype html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Secure TileKey Generator</title>
.dot {
background-color: white;
border: 1px solid black;
border-radius: 50%;
#!/usr/bin/env python
def _rot90(num):
counter = 0
bits = "{:09b}".format(num)
tmp = list(bits)
for idx in [6,3,0,7,4,1,8,5,2]:
tmp[idx] = bits[counter]
counter += 1
atoponce /
Last active Nov 26, 2020
Three password generators in ZSH

Each generator yields 128-bit security passwords. Each generator can take an optional numeric password to generate that many passwords. They should be placed in your ~/.zshrc. They are not portable across other shells.

gen-monkey-pass generates visually unambiguous random meaningless strings using Crockford's base32. Requires only ZSH:

% gen-monkey-pass 
% gen-monkey-pass 3
atoponce / dbus-uuidgen.txt
Created Nov 14, 2020
D-bus UUID generator
View dbus-uuidgen.txt
$ for i in {1..50}; do printf "%02d: " $i; dbus-uuidgen; done
01: f7ce22e1c3ec82343e11a8035faf4860
02: 5973bebcc026a65797ed89a75faf4860
03: a3df92986e08d099b11924ab5faf4860
04: 5fa5585b4808fc2a2286a28b5faf4860
05: d2fda8ca45322051fecc8a685faf4860
06: 0ba63db9be3cee781275bd805faf4860
07: fb108d510955ba08f8c6bdd45faf4860
08: 60f97e492e5339f39a0783fd5faf4860
09: 55d7e5721db10bf2389156f55faf4860
atoponce /
Last active Apr 3, 2021
Convert any binary to an image

Convert any binary to PNG

This walk through comes from @GalacticFurball who tweeted two images representing the youtube_dl source code as of 2020-09-20. They mentioned later in the thread that they struggled converting the gzip-compressed tarball of the source code with Imagemagick to a PNG, so they ended up using a 3rd party website to do the work. This Gist will show you how to do it cleanly and exactly.


If you would like to convert any non-image binary into PNG, Imagemagick makes this trivial. I will be executing the commands on a Debian Linux system, so you may need to adjust the commands for BSD, macOS, or Windows as necessary.