Skip to content

Instantly share code, notes, and snippets.

Will Langstroth wlangstroth

View GitHub Profile
# For those without rename
for i in *; do mv $i $i.mp3; done
# or
for f in *;do mv $f ${f/test/prod};done
# replace text in lots of files
perl -pi -e 's/wrong/right/g' *
View memoize.js
// Crockford's
function memoizer(memo, fundamental) {
var shell = function (n) {
var result = memo[n];
if (typeof result !== 'number') {
result = fundamental(shell, n);
memo[n] = result;
return result;
You can’t perform that action at this time.