😆
The requests.session
and CheckmateClient
stuff I wrote does this exact thing under the hood.
from pawn import client
from pawn.rackspace import AuthRackspaceIdentity, AuthRacker
master = true | |
#vv = true | |
port = 27017 | |
bind_ip = 0.0.0.0 | |
auth = false | |
noauth = true | |
jsonp = true | |
rest = true | |
fork = false | |
#upgrade = true |
import os | |
import random | |
import tempfile | |
def somebytes(length=512): | |
return ''.join(chr(random.randint(0,255)) for _ in xrange(length)) | |
def same(f1, f2): |
😆
The requests.session
and CheckmateClient
stuff I wrote does this exact thing under the hood.
from pawn import client
from pawn.rackspace import AuthRackspaceIdentity, AuthRacker
import collections | |
import itertools | |
import operator | |
import six | |
def lenient_getitem(obj, key): | |
try: | |
return operator.getitem(obj, key) |
$ python brew-checkup.py -h
usage: brew-checkup.py [-h] [--verbose] [--debug]
🌈 homebrew-check: update, cleanup, upgrade, doctor.
optional arguments:
-h, --help show this help message and exit
--verbose, -v Pass the --verbose option to all homebrew commands.
--debug, -d If set, any commands that can emit debugging information will
Even if you know the basics, making the right choices matters a lot. A minor mistake can destroy the security of your system.
repo: https://github.com/reaperhulk/pycon2015-crypto-tutorial
gist: https://gist.github.com/dmend/9a7269d5c521e72cc221
vm: https://4a95d8c077a100de3278-188294849580e8742c8bb57afd78c06c.ssl.cf2.rackcdn.com/pycon-2015-ubuntu.ova
"""This should work with python 2 & 3 | |
Something curious: if private_bytes() is | |
called with a format other than | |
serialization.PrivateFormat.TraditionalOpenSSL, | |
the generated key will prompt for a password | |
when running `ssh-keygen -f test-key -e` even when | |
encryption is set to serialization.NoEncryption() | |
There's a hunch that this ^^ only occurs on mac os x. |
def kwargs(string, separator='=', type=None): | |
"""Return a dict from a delimited string. | |
If 'type' is not None, values will be passed through | |
to type before returning the dictionary. | |
""" | |
if separator not in string: | |
raise ValueError("Separator '%s' not in value '%s'" | |
% (separator, string)) | |
if string.strip().startswith(separator): |
I hereby claim:
To claim this, I am signing this object: