This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
''' | |
No values are url encoded so will fail if any spaces/special chars exist | |
apikey and pathToBanList need to be changed, the rest will work as-is | |
''' | |
import urllib2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
try: | |
import simplejson as json | |
except ImportError: | |
import json | |
class MCBouncer(object): | |
""" | |
MCBouncer object allowing you to interact with the API. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Networking stuff is cribbed from here | |
https://gist.github.com/barneygale/5051791 | |
This is just a gevent ports | |
""" | |
import optparse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"auto_complete": true, | |
"auto_complete_commit_on_tab": false, | |
"auto_complete_delay": 50, | |
"auto_complete_selector": "source - comment", | |
"auto_complete_size_limit": 4194304, | |
"auto_complete_triggers": | |
[ | |
{ | |
"characters": "<", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN; | |
CREATE TYPE usage_type AS ENUM ('notifications', 'gravatar', 'paypal'); | |
CREATE TYPE email_address_with_confirmation AS | |
( | |
address text, | |
confirmed boolean | |
); | |
ALTER TABLE participants ADD email_notifications email_address_with_confirmation DEFAULT NULL; | |
ALTER TABLE participants ADD email_gravatar email_address_with_confirmation DEFAULT NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from StringIO import StringIO | |
class UnpickledStringIO(StringIO): | |
def __setstate__(self, state): | |
self.__dict__.update(state) | |
def unpickle_factory(*a, **kw): | |
return UnpickledStringIO(*a, **kw) |