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:
| #!/bin/bash -e | |
| REMOTE=${1:-origin} | |
| ref=$(git rev-parse --symbolic-full-name "$REMOTE/HEAD" 2>/dev/null) || { | |
| git remote set-head "$REMOTE" -a >/dev/null | |
| ref=$(git rev-parse --symbolic-full-name "$REMOTE/HEAD") | |
| } | |
| echo "${ref#refs/remotes/$REMOTE/}" |
| -- transform 8 bytes into an int64 | |
| CREATE FUNCTION bytes_to_int64(s BYTEA, OUT result INT8) | |
| AS $$ | |
| BEGIN | |
| SELECT bit_or(get_byte(s, ind)::INT8 << ((7 - ind) * 8)) | |
| INTO result | |
| FROM generate_series(0, 7) AS ind; | |
| END; | |
| $$ LANGUAGE 'plpgsql'; |
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 <[email protected]> | |
| + | |
| +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() |