Skip to content

Instantly share code, notes, and snippets.

View kellishaver's full-sized avatar

Kelli Shaver kellishaver

View GitHub Profile
@tanema
tanema / git-type-loc.sh
Created May 27, 2013 19:38
Get the number of lines of code by extension, on a git repo.
git ls-files | perl -pe "s/.*\.(.*?)\n/\.\1\n/" | awk '/\..*/' | sort | uniq | xargs -n1 -E '\n' -I % sh -c 'git ls-files "*%" | xargs cat | echo "$(wc -l) %"' | sort -rn