Skip to content

Instantly share code, notes, and snippets.

Sean Bleier sebleier

Block or report user

Report or block sebleier

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View #lawrence.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
sebleier / gist:2891440
Created Jun 7, 2012 — forked from hay/gist:1351230
Enterprisify your Java Class Names!
View gist:2891440
<!doctype html>
body {
background: white;
text-align: center;
padding: 20px;
font-family: Georgia, serif;
View gist:1473587

Big-Q Notation

Big-Q notation is exactly the same as Big-O notation, except for the understanding that the constant multiplier for the asymptotic bound function is greater.

For example Big-O is defined as:

f(x) <= C * g(x)

Big-Q notation could be defined as:

sebleier / gist:1127937
Created Aug 5, 2011
This is how I kinda wished django migrations would work.
View gist:1127937
$ git checkout master
Already on 'master'
$ migrate
Error: Cannot migrate in a dirty state
$ git commit -am "Added migration to remove blog entry's pub_month and pub_day fields."
$ tag_migration add_column_to_foo # tags a migration identifier using git-tag
$ migrate
last known sha: c39168d21bb27754737a1036a50f57687cf6ae56
new migrations found between c39168..HEAD:
sebleier / nav_footer
Created Jun 16, 2011 — forked from anonymous/nav_footer
New navigation footer
View nav_footer
View gist:663612
>>> class Foo(object):
... a = {}
... b = 'bar'
... f = Foo()
... f.a['animal'] = "monkey"
... = 'not bar'
... g = Foo()
... print g.a, g.b
{'animal': 'monkey'} bar
View redis-server-for-init.d-startup
#! /bin/sh
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
View gist:185731
class WSGIHandlerWrapper(WSGIHandler):
def __init__(self):
super(WSGIHandlerWrapper, self).__init__()
def handle_uncaught_exception(self, request, resolver, exc_info):
super(WSGIHandlerWrapper, self).handle_uncaught_exception(request, resolver, exc_info)
except Exception, e:
# do something
You can’t perform that action at this time.