I hereby claim:
- I am thepaul on github.
- I am thepaul (https://keybase.io/thepaul) on keybase.
- I have a public key ASDVjs42Wo8PNSFWHDKiZmIsGEemdqZ4En1SFeO0uzkhswo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
git for-each-ref --format '%(refname) %(authoremail) %(committerdate:raw)' refs/remotes/origin/ \ | |
| sort -k2,3 \ | |
| awk '$3 < (systime()-(86400*30)) { | |
gsub(/refs\/remotes\//, "", $1); | |
printf "%-30s %-26s %s\n", $1, $2, strftime("%Y-%m-%d %H:%M", $3) | |
}' |
import re | |
class NotAToken(Exception): | |
pass | |
class YieldScanner(re.Scanner): | |
def scan(self, inputstr): | |
match = self.scanner.scanner(inputstr).match | |
pos = 0 | |
while True: |
diff --git a/tools/dockerz/Dockerfile b/tools/dockerz/Dockerfile | |
new file mode 100644 | |
index 0000000..0eafb35 | |
--- /dev/null | |
+++ b/tools/dockerz/Dockerfile | |
@@ -0,0 +1,17 @@ | |
+FROM ubuntu:trusty | |
+MAINTAINER <pcannon@epochlabs.com> | |
+ | |
+RUN apt-get -y update \ |
import signal | |
def wait_for_subprocs(procs, cb=lambda proc: 0): | |
# do-nothing handler for SIGCHLD, just so it's something other than SIG_DFL. | |
# otherwise, Python won't interrupt syscalls. | |
oldhandler = signal.signal(signal.SIGCHLD, lambda *_: None) | |
try: | |
while procs: | |
signal.pause() | |
aliveprocs = [] |
argparse (all classes) | |
abc.ABCMeta | |
collections.Counter | |
fractions.Fraction | |
plistlib.Dict and plistlib.Plist | |
random.Random | |
unittest.TextTestResult and unittest.FunctionTestCase | |
weakref.KeyedRef | |
zipfile.ZipExtFile | |
ctypes.py_object |
import contextlib | |
import os | |
import subprocess | |
import tempfile | |
class SshTunnelDefinition: | |
def __init__(self, host, user=None, executable='ssh', localforwards=(), | |
remoteforwards=(), port=None, options=None): | |
self.executable = executable |
import ConfigParser | |
class SanerConfigParser(ConfigParser.SafeConfigParser): | |
def __init__(self, defaults=None, dict_type=dict, allow_no_value=False): | |
ConfigParser.SafeConfigParser.__init__(self, dict_type=dict_type, | |
allow_no_value=allow_no_value) | |
self.mydefaults = defaults or {} | |
no_default = object() |
import logging | |
from twisted.python import log, failure | |
class TwistedLogHandler(logging.Handler): | |
""" | |
Sends Python stdlib logging output through the Twisted logging system. | |
""" | |
def __init__(self, twistedlogpublisher=None): |
import socket | |
import contextlib | |
def choose_unused_port(interface='0.0.0.0', sock_type=socket.SOCK_STREAM): | |
with contextlib.closing(socket.socket(socket.AF_INET, sock_type)) as s: | |
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) | |
s.bind((interface, 0)) | |
return s.getsockname()[1] |