Skip to content

Instantly share code, notes, and snippets.

@Integralist
Created July 18, 2019 14:11
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 Integralist/7816083906903bf4c24140e7228c7ad2 to your computer and use it in GitHub Desktop.
Save Integralist/7816083906903bf4c24140e7228c7ad2 to your computer and use it in GitHub Desktop.
[Git Commit Frequency] #git #commit #frequency #bash #perl
git log --author="Integralist" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exist
s $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }'

On the BuzzFeed mono repo...

00 -    0
01 -    0
02 -    0
03 -    0
04 -    0
05 -    0
06 -    0
07 -    0
08 -    5 **
09 -   29 *************
10 -   57 **************************
11 -   82 **************************************
12 -   85 ****************************************
13 -   70 *********************************
14 -  103 ************************************************
15 -   79 *************************************
16 -  106 **************************************************
17 -   63 *****************************
18 -   42 *******************
19 -    9 ****
20 -    2
21 -    4 *
22 -    4 *
23 -    0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment