Skip to content

Instantly share code, notes, and snippets.

View wlangstroth's full-sized avatar

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' *
// 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;
};