Skip to content

Instantly share code, notes, and snippets.

View danielegobbetti's full-sized avatar

Daniele Gobbetti danielegobbetti

View GitHub Profile

Keybase proof

I hereby claim:

  • I am danielegobbetti on github.
  • I am daniele (https://keybase.io/daniele) on keybase.
  • I have a public key whose fingerprint is E2A0 83FF F25D 864A 6286 DED7 FD30 AC6F A8A9 9CDC

To claim this, I am signing this object:

@danielegobbetti
danielegobbetti / CONTRIBUTORS.rst
Last active May 28, 2021 09:08
Auto-update your contributors list (bash quine)
.. 2>/dev/null
names ()
{
echo -e "\n exit;\n**Contributors (sorted by number of commits):**\n";
git log --format='%aN:%ae' origin/master | grep -Ev "(anonymous:|FYG_.*_bot_ignore_me)" | sed 's/@users.github.com/@users.noreply.github.com/g' | gawk 'BEGIN{FS=":"}{match ($1, /^(%)?(.*)/, n) ; ct[n[2]]+=1; if (n[1] ~ /%/ || e[n[2]] == "" ) { e[n[2]]=$2}}END{for (i in e) { n[i]=e[i];c[i]+=ct[i] }; for (a in e) print c[a]"\t* "a" <"n[a]">";}' | sort -n -r | cut -f 2-
}
quine ()
{
{
echo ".. 2>/dev/null";