Skip to content

Instantly share code, notes, and snippets.

@fabiocerqueira
Created June 20, 2011 16:28
Show Gist options
  • Save fabiocerqueira/1035939 to your computer and use it in GitHub Desktop.
Save fabiocerqueira/1035939 to your computer and use it in GitHub Desktop.
add msg aleatória nos seus commits lol
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import urllib
import sys
commit_msg = sys.argv[1]
with open(commit_msg, 'r+') as f:
try:
nb_commit = urllib.urlopen("http://whatthecommit.com/index.txt").read()
except Exception:
nb_commit = 'fuuuuu!!!\n\n'
prev_msg = f.read()
f.seek(0)
f.write(nb_commit + prev_msg)
@arthuralvim
Copy link

=) Mai é fanfarrão demais! Aê Aê Aê Aê Ê Ê Ê Ê ÔôÔôÔôÔôÔô! o//

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