Skip to content

Instantly share code, notes, and snippets.

@mrc
Created May 13, 2011 02:51
Show Gist options
  • Select an option

  • Save mrc/969887 to your computer and use it in GitHub Desktop.

Select an option

Save mrc/969887 to your computer and use it in GitHub Desktop.
git histogram of commits over hours
# http://twitter.com/#!/mfeathers/status/61229026034978817
`git log | grep "^Date"`.split($/).map { |line| line.split(' ')[4].split(':')[0] }.group_by { |x| x }.map {|k,v| [k,v.length] }
@newacct
Copy link
Copy Markdown

newacct commented Aug 25, 2011

.sort.group_by { |x| x } should just be written as .group_by { |x| x }. sort is unnecessary

@mrc
Copy link
Copy Markdown
Author

mrc commented Aug 25, 2011

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment