Skip to content

Instantly share code, notes, and snippets.

@aroben
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aroben/d2098a3be3f0372224a7 to your computer and use it in GitHub Desktop.
Save aroben/d2098a3be3f0372224a7 to your computer and use it in GitHub Desktop.
Find who has deleted more code than they've added; run on https://github.com/rails/rails/graphs/contributors or similar
$.makeArray($('.capped-card')).map(function(e) {
return [$(e).find('.aname').text(), parseInt($(e).find('.a').text().replace(/,/g, ''), 10), parseInt($(e).find('.d').text().replace(/,/g, ''), 10)];
}).filter(function(a) {
return a[2] > a[1];
}).map(function(a) {
return [a[0], a[2] - a[1], a[2] / a[1]];
}).sort(function(a, b) {
return b[1] - a[1];
}).map(function(a) {
return a[0] + " removed " + a[1] + " lines (" + a[2].toFixed(2) + "x as many lines as they added)";
}).join("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment