I hereby claim:
- I am mithrandi on github.
- I am mithrandi (https://keybase.io/mithrandi) on keybase.
- I have a public key whose fingerprint is DB24 E315 EDAA AC13 D646 7099 58C0 FB1C DE3B 7600
To claim this, I am signing this object:
| #!/usr/bin/python | |
| from os import environ | |
| from socket import gethostname | |
| from boto import connect_route53 | |
| from boto.route53.record import ResourceRecordSets | |
| IF_NAME = 'ppp0' | |
| AWS_ACCESS_KEY = '...' | |
| AWS_SECRET_KEY = '...' |
| for thing in [thing1, thing2]: | |
| yield blahblahblah(thing) | |
| #### | |
| for thing in [ | |
| thing1, thing2, thing3, thing4, thing5]: | |
| yield blahblahblah(thing) | |
| #### |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/zsh | |
| source /Users/mithrandi/Library/Python/2.7/bin/virtualenvwrapper_lazy.sh | |
| workon Fusion | |
| BRANCH=$(hg branch --repository $HOME/code/Fusion) | |
| STORE="dev.axiom.$BRANCH" | |
| if [[ ! -d $STORE ]] { | |
| if [[ -e $STORE ]] { | |
| echo "Found unexpected $STORE, exiting." | |
| exit 1 | |
| } |
| From 96db9023b881d7cd9f379b0c154650d6c108e9a3 Mon Sep 17 00:00:00 2001 | |
| From: "Dr. Stephen Henson" <[email protected]> | |
| Date: Sun, 6 Apr 2014 00:51:06 +0100 | |
| Subject: [PATCH] Add heartbeat extension bounds check. | |
| A missing bounds check in the handling of the TLS heartbeat extension | |
| can be used to reveal up to 64k of memory to a connected client or | |
| server. | |
| Thanks for Neel Mehta of Google Security for discovering this bug and to |
| def _rangesOverlap(start1, end1, start2, end2): | |
| """ | |
| Check if [start1, end1) and [start2, end2) overlap. | |
| @type start1: L{datetime.datetime} | |
| @type end1: L{datetime.datetime} | |
| @type start2: L{datetime.datetime} |
| mithrandi@elvandar:~> apt-file search -x '/usr/bin/python[0-9.]*$' | |
| python-minimal: /usr/bin/python | |
| python-minimal: /usr/bin/python2 | |
| python2.6-dbg: /usr/lib/debug/usr/bin/python2.6 | |
| python2.6-minimal: /usr/bin/python2.6 | |
| python2.7-dbg: /usr/lib/debug/usr/bin/python2.7 | |
| python2.7-minimal: /usr/bin/python2.7 | |
| python3-minimal: /usr/bin/python3 | |
| python3.2-minimal: /usr/bin/python3.2 | |
| python3.3-dbg: /usr/lib/debug/usr/bin/python3.3 |
| from testtools.matchers import Mismatch | |
| class SuccessResultOf(object): | |
| """ | |
| Match if a Deferred has fired with a result. | |
| """ | |
| def __init__(self, resultMatcher=None): | |
| self.resultMatcher = resultMatcher |
| from hashlib import sha256 | |
| from sys import argv | |
| for fn in argv[1:]: | |
| if fn == '-': | |
| f = sys.stdin | |
| else: | |
| f = open(fn, 'rb') | |
| with f: | |
| print '%s *%s' % (sha256(f.read()).hexdigest(), fn) |
| suffixes = ('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB') | |
| def saneDataSize(size): | |
| index = int(floor(log(abs(size), 1024))) | |
| index = min(index, len(suffixes) - 1) | |
| index = max(index, 0) | |
| factor = 1024 ** index | |
| return '%0.3f %s' % (float(size) / factor, suffixes[index]) |