Skip to content

Instantly share code, notes, and snippets.

View dan1elhughes's full-sized avatar
Building stuff @ Onfolk

Dan Hughes dan1elhughes

Building stuff @ Onfolk
View GitHub Profile
#!/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=$?
@dan1elhughes
dan1elhughes / 5.gif
Last active January 3, 2020 22:15
🦇
5.gif
@dan1elhughes
dan1elhughes / 4.gif
Last active January 3, 2020 22:16
🦇
4.gif
@dan1elhughes
dan1elhughes / 3.gif
Last active January 3, 2020 22:16
🦇
3.gif
@dan1elhughes
dan1elhughes / 2.gif
Last active January 3, 2020 22:16
🦇
2.gif
@dan1elhughes
dan1elhughes / 1.gif
Last active January 3, 2020 22:16
🦇
1.gif
@dan1elhughes
dan1elhughes / 0.gif
Last active January 3, 2020 22:15
🦇
0.gif
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);