Skip to content

Instantly share code, notes, and snippets.

@higebu
Created July 18, 2019 14:42
Show Gist options
  • Save higebu/42eb396a861eab47b8823df28143622e to your computer and use it in GitHub Desktop.
Save higebu/42eb396a861eab47b8823df28143622e to your computer and use it in GitHub Desktop.
git config
[alias]
worktime = "!f() { \
git log --author=\"$1\" --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 exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf \"%02d - %4d %s\", $_, $h{$_}, \"*\"x ($h{$_} / $m * 50); }'; \
}; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment