Skip to content

Instantly share code, notes, and snippets.

@sjs
sjs / wordlist.txt
Created August 9, 2018 19:19
Mnemonic encoding wordlist
# Original blog post: <https://mnx.io/blog/a-proper-server-naming-scheme/>
# Original word list: <http://web.archive.org/web/20091003023412/http://tothink.com/mnemonic/wordlist.txt>
# Sample usage: `curl <gist> | tail --lines +4 | shuf | head --lines 1`
acrobat
africa
alaska
albert
albino
album
alcohol
@sjs
sjs / keybase.md
Last active February 4, 2016 21:53

Keybase proof

I hereby claim:

  • I am sjs on github.
  • I am sjs (https://keybase.io/sjs) on keybase.
  • I have a public key whose fingerprint is 9A1A 3806 1A03 45D2 A1E8 D8DF 8F1F 854D A678 995F

To claim this, I am signing this object:

@sjs
sjs / Default (OSX).sublime-keymap
Created August 11, 2015 20:20
Sublime Preferences (OSX)
[
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol", "extend": false} },
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol", "extend": false } },
{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} },
{ "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true } },
{ "keys": ["f1"], "command": "goto_documentation" },
{ "keys": ["ctrl+shift+d"], "command": "file_diff_menu" }
]
@sjs
sjs / gist:e63bf57e2f6daa355028
Created March 4, 2015 15:16
Diskspace drill-down
du -h / | grep '[0-9\.]\+G'
@sjs
sjs / gist:b64f6e2bdf2c88dabfbd
Created March 2, 2015 20:17
niceseconds.php
function niceseconds($ss) {
$s = $ss%60;
$m = floor(($ss%3600)/60);
$h = floor(($ss%86400)/3600);
$d = floor(($ss%2592000)/86400);
$M = floor($ss/2592000);
$response = '';
if($M != 0) { $response .= "$M months, "; }
__,,,__
_¿f$´ÅÅÅÅÅÅÅÃ$f¿_
.j´ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÃ.
jÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ,
,ÅÅÅÅÅÅ' `ÅÅÅ©À~~~ÙªÃÅÅÅÅÅ,
.ÅÅÅÅÅÅÅ._,ÅÅl ¿ª©Ú `lÅÅÅÅÅ.
ÃÅÅÅÅÅÅÅPÙYÅÅ ´ÅÅÅÅÃ ÅÅÅÅÅ´
×ÅÅÅÅÅÅÅ ÅÅ ÅÅÅÅÅÅ ÅÅÅÅÅ×
ÃÅÅÅÅÅÅÅ ÅÅ ´ÅÅÅÅÃ ÅÅÅÅÅ´
ÅÅÅÅÅÅÅ ÅÅl Ùª©À _jÅÅÅÅÅ'
@sjs
sjs / la.geojson
Created February 6, 2014 15:58
la geo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Single-line version of pattern:
(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))
Extended version of same pattern:
(?xi)
\b
( # Capture 1: entire matched URL
# Searches dict for words that end in hn
grep -i ^.*hn$ /usr/share/dict/words