Skip to content

Instantly share code, notes, and snippets.

View noahmorrison's full-sized avatar

Noah Morrison noahmorrison

View GitHub Profile
@noahmorrison
noahmorrison / .bashrc
Created November 25, 2014 16:02
Gitignore integrated ls
ls_alias="ls --color=auto"
while read line
do
if [[ $line ]] && [[ ${line:0:1} != '#' ]]
then
export ls_alias+=" -I \"$line\""
fi
done < ~/.gitignore
alias ls=$ls_alias
@noahmorrison
noahmorrison / leven.lisp
Created November 22, 2014 01:15
Levenshtein distance in lisp (Recursive/slow)
(defun leven-distance (string1 string2)
(if (= (length string1) 0)
(length string2)
(if (= (length string2) 0)
(length string1)
(min (+ (leven-distance (subseq string1 0 (- (length string1) 1))
string2)
1)