Skip to content

Instantly share code, notes, and snippets.

View Pretz's full-sized avatar

Alex Pretzlav Pretz

View GitHub Profile
import web
import httplib
urls = ("/(.+?)/?", "http_err")
app = web.application(urls, globals())
class http_err:
def GET(self, err_code):
err_code = int(err_code.split("/")[0])
response = "%d %s" % (err_code, httplib.responses[err_code])
@Pretz
Pretz / trac-tickets-to-gh.py
Created September 21, 2010 03:03 — forked from dittos/trac-tickets-to-gh.py
import trac tickets to github from a mysql trac install
import sys; reload(sys); sys.setdefaultencoding('utf-8')
import MySQLdb
import urllib2
import urllib
import simplejson
login = 'your github login'
token = 'your github API key'
repo = 'username/repo'