Skip to content

Instantly share code, notes, and snippets.

@ngerakines
Created June 25, 2010 16:31
Show Gist options
  • Select an option

  • Save ngerakines/453086 to your computer and use it in GitHub Desktop.

Select an option

Save ngerakines/453086 to your computer and use it in GitHub Desktop.
import os
import random
import tornado.httpserver
import tornado.ioloop
import tornado.web
names = ['Nick', 'Steve', 'Andy', 'Qi', 'Fanny', 'Sarah', 'Cord', 'Todd', 'Chris', 'Pasha', 'Gabe', 'Tony', 'Jason', 'Randal', 'Ali', 'Kim', 'Rainer']
def randline():
text = 'commit_messages.txt'
if not os.path.exists(text):
return "Shit ..."
f = file(text, 'rb')
for i,j in enumerate(f):
if random.randint(0,i) == i:
line = j
f.close()
return line
def randname():
for i,j in enumerate(names):
if random.randint(0, i) == i:
line = j
return line
class MainHandler(tornado.web.RequestHandler):
def get(self):
line = randline().replace("XNAMEX", randname())
self.render("index.html", message = line)
application = tornado.web.Application([
(r"/", MainHandler),
])
if __name__ == "__main__":
http_server = tornado.httpserver.HTTPServer(application)
http_server.listen(8888)
tornado.ioloop.IOLoop.instance().start()
XNAMEX, WE WENT OVER THIS. EXPANDTAB.
XNAMEX, WE WENT OVER THIS. C++ IO SUCKS.
Some shit.
add actual words
I CAN HAZ COMMENTZ.
giggle.
Whatever.
Finished fondling.
FONDLED THE CODE
this is how we generate our shit.
unh
don't be retarded.
It works!
unionfind is no longer being molested.
Well, it's doing something.
I'M PUSHING.
Whee.
Whee, good night.
It'd be nice if type errors caused the compiler to issue a type error
Fucking templates.
I hate this fucking language.
marks
that coulda been bad
hoo boy
Fucking egotistical bastard. adds expandtab to vimrc
if you're not using et, fuck off
WHO THE FUCK CAME UP WITH MAKE?
fix some fucking errors
first blush
uhhhhhh
forgot we're not using a smart language
include shit
things occurred
i dunno, maybe this works
8==========D
whooooooooooooooooooooooooooo
clarify further the brokenness of C++. why the fuck are we using C++?
(\ /)<br/>(O.o)<br/>(&gt; &lt;) Bunny approves these changes.
.
changes
A fix I believe, not like I tested or anything
Useful text
pgsql is being a pain
pgsql is more strict, increase the hackiness up to 11
c&p fail
syntax
XNAMEX sucks
XNAMEX SUCKS
fix
someone fails and it isn't me
Gross hack because XNAMEX doesn't know how to code
totally more readable
better grepping
fix
fix bug, for realz
fix /sigh
Does this work
MOAR BIFURCATION
bifurcation
REALLY FUCKING FIXED
FIX
better ignores
More ignore
more ignores
more ignores
more ignores
more ignores
more ignores
more ignored words
more fixes
really ignore ignored worsd
fixes
/sigh
fix
fail
pointless limitation
eppic fail eric
ajax-loader hotness, oh yeah
XNAMEX broke the regex, lame
small is a real HTML tag, who knew.
WTF is this.
Do things better, faster, stronger
Fixed a bug cause XNAMEX said to
Use a real JS construct, WTF knows why this works in chromium.
Added a banner to the default admin page. Please have mercy on me =(
needs more cow bell
Switched off unit test X because the build had to go out now and there was no time to fix it properly.
Updated
I must sleep... it's working... in just three hours...
I was wrong...
Completed with no bugs...
Fixed a little bug...
Fixed a bug in NoteLineCount... not seriously...
woa!! this one was really HARD!
Made it to compile...
changed things...
touched...
i think i fixed a bug...
perfect...
Moved something to somewhere... goodnight...
oops, forgot to add the file
Corrected mistakes
oops
oops!
put code that worked where the code that didn't used to be
Nothing to see here, move along
I am even stupider than I thought
I don't know what the hell I was thinking.
fixed errors in the previous commit
Committed some changes
Some bugs fixed
Minor updates
Added missing file in previous commit
bug fix
typo
bara bra grejjor
Continued development...
Does anyone read this? I'll be at the coffee shop accross the street.
That's just how I roll
work in progress
minor changes
some brief changes
assorted changes
lots and lots of changes
another big bag of changes
lots of changes after a lot of time
LOTS of changes. period
XNAMEX made me do it
Test commit. Please ignore
I'm just a grunt. Don't blame me for this awful PoS.
I did it for the lulz!
I'll explain this when I'm sober .. or revert it
Obligatory placeholder commit message
A long time ago, in a galaxy far far away...
Fixed the build.
Fixing XNAMEX's bug.
Fixing XNAMEX's bugs.
various changes
<html>
<head>
<title>Commit Message Generator</title>
<style>
body {
text-align: center;
margin: 1em 0 0 0;
vertical-align: middle;
font-family: 'Lucida Console', 'Courier New';
font-size: 26pt;
font-style: normal;
text-shadow: none;
text-decoration: none;
text-transform: none;
letter-spacing: 0;
word-spacing: 0;
line-height: 1.2;
}
#content {
width: 760px;
text-align: left;
margin: 1em auto;
}
</style>
</head>
<body>
<div id="content">
<p>{{ message }}</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment