Skip to content

Instantly share code, notes, and snippets.

View amackworth's full-sized avatar

Alexander Mackworth Mendoza amackworth

View GitHub Profile
### Keybase proof
I hereby claim:
* I am amackworth on github.
* I am amackworth (https://keybase.io/amackworth) on keybase.
* I have a public key whose fingerprint is 1F62 209D E06A AF7F 81C7 053A B66B 3615 010B 656C
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am alexanderpine on github.
* I am amackworth (https://keybase.io/amackworth) on keybase.
* I have a public key whose fingerprint is 1F62 209D E06A AF7F 81C7 053A B66B 3615 010B 656C
To claim this, I am signing this object:
@amackworth
amackworth / tree.sh
Created November 3, 2011 19:31
A copy of the tree command on Windows to *-nix machines
find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
@amackworth
amackworth / doctor.awk
Created October 27, 2011 15:57
A simple little check-in to make sure a *-nix computer has all your basic needs.
{ sum += $4 }
END { mb = sum / 1024
gb = mb / 1024
printf \"%.0f MB (%.2fGB) of available disk space\n\", mb, gb
}
EOF
function t(s,d,p){for(p in d)s=s.replace(new RegExp('{'+p+'}','g'),d[p]);return s;}
/*
String templating engine:
t("Hello {name}!, It is {date}!", { name: "Thomas", date: function(){ return new Date }});
// = "Hello Thomas!, It is Sun May 08 2011 15:15:33 GMT-0400 (EDT)!"
*/