I hereby claim:
- I am fugiman on github.
- I am fugi (https://keybase.io/fugi) on keybase.
- I have a public key whose fingerprint is 282B FAB3 7180 A044 AC67 A8E0 B79C 8D27 2F32 2CEA
To claim this, I am signing this object:
| // ==UserScript== | |
| // @name Blaseball | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.2 | |
| // @description Two column blaseball layout | |
| // @author Fugi | |
| // @match https://blaseball.com/* | |
| // @grant none | |
| // ==/UserScript== |
I hereby claim:
To claim this, I am signing this object:
| from twisted.enterprise import adbapi | |
| from twisted.internet import reactor, defer | |
| import txmongo, sys, random | |
| bottom = int(sys.argv[1]) if len(sys.argv) > 1 else 0 | |
| mongo = txmongo.lazyMongoConnectionPool().DATABASE.COLLECTION | |
| sql = adbapi.ConnectionPool(LIBRARY, host=HOST, port=PORT, db=DATABASE, user=USER, passwd=PASS, cp_reconnect=True) | |
| @defer.inlineCallbacks | |
| def main(): |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from twisted.internet defer | |
| from functools import wraps | |
| import json | |
| def writeJSON(fn): | |
| @wraps(fn) | |
| def wrapped(request, *params, **kwargs): |
| # -*- coding: utf-8 -*- | |
| from twisted.internet import reactor, ssl | |
| from twisted.internet.protocol import ClientFactory | |
| from twisted.words.protocols.irc import IRCClient | |
| import random, string | |
| def genMessage(low, high): | |
| l = random.randint(low, high) | |
| return "".join([random.choice(string.letters + string.digits + string.punctuation + ' ') for _ in xrange(l)]) | |
| from twisted.internet import reactor | |
| from twisted.protocols.portforward import ProxyFactory | |
| from txsockjs.factory import SockJSMultiFactory | |
| pf = ProxyFactory('host', port) | |
| ws = SockJSMultiFactory() | |
| ws.addFactory(pf, "proxy") | |
| reactor.listenTCP(8000, ws) | |
| reactor.run() |