Skip to content

Instantly share code, notes, and snippets.

Avatar
Building stuff @ Monzo

Dan Hughes dan1elhughes

Building stuff @ Monzo
View GitHub Profile
View auth.sh
#!/usr/bin/env bash
# Use github as a authorized_keys file. Single-user system only, probably janky and a bad idea in many ways.
url="https://danhughes.dev/keys"
cachefile="/tmp/keycache"
keys=$(curl -sfL $url)
code=$?
View fib.js
const assert = require('assert');
const naiveFib = n => {
if (n === 1 || n === 2) return 1;
return naiveFib(n - 1) + naiveFib(n - 2);
};
console.time("naive");
assert(naiveFib(45) === 1134903170);