I hereby claim:
- I am stevommmm on github.
- I am c45y (https://keybase.io/c45y) on keybase.
- I have a public key whose fingerprint is 1EA9 9344 5B7C 9817 0AC0 4135 5243 019A 99B7 B1A3
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #header { | |
| animation-name: hue_span; | |
| animation-duration: 20s; | |
| animation-timing-function: ease-out; | |
| animation-iteration-count: infinite; | |
| animation-direction: normal; | |
| animation-play-state: running; | |
| } | |
| @keyframes hue_span { |
| @font-face { | |
| font-family: "Lato"; | |
| font-style: normal; | |
| font-weight: 400; | |
| src: local("Lato Regular"), local("Lato-Regular"), url("http://themes.googleusercontent.com/static/fonts/lato/v7/9k-RPmcnxYEPm8CNFsH2gg.woff") format("woff"); | |
| } | |
| @font-face { | |
| font-family: "Lato"; | |
| font-style: normal; |
| html { | |
| height: 100%; | |
| -webkit-font-smoothing: antialiased; | |
| } | |
| body { | |
| font-family: 'Open Sans', sans-serif; | |
| color: #888; | |
| font-weight: 400; | |
| font-size: 12px; |
| # Exit if we aren't interactive | |
| [ -z "$PS1" ] && return | |
| shopt -s checkwinsize | |
| lowpriv="\[\033[1;48;5;32m\]" | |
| rootpriv="\[\033[1;48;5;1m\]" | |
| dirpath="\[\033[38;5;220;48;5;238m\]" | |
| reset="\[\033[00m\]" |
| import logging | |
| import types | |
| funcs = [] | |
| def decorator(func, *args, **kwargs): | |
| if type(func) != types.FunctionType: | |
| return decorator | |
| funcs.append(func) |
| #!/usr/bin/env python | |
| import select | |
| import socket | |
| from multiprocessing import current_process, active_children | |
| from multiprocessing.pool import ThreadPool | |
| class SockPool(object): | |
| """Threaded socket pool making use of multiprocessing.pool.ThreadPool and select.select""" | |
| def __init__(self, host, port, poolsize=10, backlog=10, readsize=1024): |
| SELECT type, SUM(created) AS created, SUM(destroyed) AS destroyed FROM ( | |
| (SELECT type, count(type) AS created, 0 AS destroyed FROM `lb-world` INNER JOIN `lb-players` USING (playerid) WHERE playername = 'DOKDOR' AND type > 0 AND type != replaced $dateClause GROUP BY type) | |
| UNION | |
| (SELECT replaced AS type, 0 AS created, count(replaced) AS destroyed FROM `lb-world` INNER JOIN `lb-players` USING (playerid) WHERE playername = 'DOKDOR' AND replaced > 0 AND type != replaced $dateClause GROUP BY replaced) | |
| ) AS t GROUP BY type ORDER BY SUM(created) + SUM(destroyed) DESC |
| class SmartServerSocket: | |
| def __init__( self, sock ): | |
| self.sock = sock | |
| # delegate methods as needed | |
| _delegate_methods = [ "fileno" ] | |
| for method in _delegate_methods: | |
| setattr( self, method, getattr( sock, method ) ) | |
| def accept( self ): | |
| (conn, addr) = self.sock.accept() | |
| if conn.recv( 1, socket.MSG_PEEK ) == "\x16": |
| def run(self): | |
| self.conn.send('220 Welcome!\r\n') | |
| while True: | |
| if not isinstance(self.conn, ssl.SSLSocket): # Can't PEEK at ssl sockets | |
| if self.conn.recv( 1, socket.MSG_PEEK ) == "\x16": | |
| self.conn = ssl.wrap_socket(self.conn, certfile="cert.pem", server_side=True) | |
| cmd=self.conn.recv(256) | |
| if not cmd: break |