Skip to content

Instantly share code, notes, and snippets.

lvh lvh

Block or report user

Report or block lvh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lvh
lvh / _about.md
Last active Mar 22, 2017
How the generate a random password or security question
View _about.md

https://imgs.xkcd.com/comics/password_strength.png

This is a generator for random passwords. It is also useful as the answer to security questions.

How this works

  1. Install gshuf. It's in GNU coreutils. On Macs with homewbrew, brew install coreutils. (On Linux, it night be called just shuf.)
  2. ./get-some.sh

What are these words?

@lvh
lvh / keybase.md
Created Feb 20, 2015
Keybase key cycling notice
View keybase.md

Keybase proof

I hereby claim:

  • I am lvh on github.
  • I am lvh (https://keybase.io/lvh) on keybase.
  • I have a public key whose fingerprint is 45DC 13EB 6A01 21E8 5219 8C09 8763 869B E2B2 663E

To claim this, I am signing this object:

View gist:6adfe51aa42bb268a273
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I am cycling my GPG key.
My old key has fingerprint:
D9DC 4315 772F 8E91 DD22 B153 DFD1 3DF7 A8DD 569B
My new key has fingerprint:
@lvh
lvh / cobyla.ipynb
Created Apr 8, 2014
PyCon financial aid grant optimization with COBYLA
View cobyla.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lvh
lvh / keybase.md
Created Mar 7, 2014
Keybase verification
View keybase.md

Keybase proof

I hereby claim:

  • I am lvh on github.
  • I am lvh (https://keybase.io/lvh) on keybase.
  • I have a public key whose fingerprint is D9DC 4315 772F 8E91 DD22 B153 DFD1 3DF7 A8DD 569B

To claim this, I am signing this object:

@lvh
lvh / info.txt
Created Mar 7, 2014
A notification of my cycled key.
View info.txt
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
My old PGP key (8D2E6BACE6D6AAAE) is being replaced by my new key
(DFD13DF7A8DD569B). You can find the new one on key servers near you.
The new key has been signed with the old one. The old key is now (by
time of reading, not writing) revoked. I have no reason to believe
that my old key was compromised.
I have updated my key on PyPI.
View jsonrpc.py
from json import dumps, loads
from twisted.internet.defer import inlineCallbacks
from twisted.protocols.basic import NetstringReceiver
from twisted.python import log
class JSONRPCReceiver(NetstringReceiver):
def stringReceived(self, string):
try:
request = loads(string)
@lvh
lvh / release-procedure.txt
Last active Dec 19, 2015
Updated release procedure for Divmod
View release-procedure.txt
1. Check Jenkins builders.
2. Get the latest revision:
% bzr pull
3. Bump version number in <Package>/<package>/_version.py
4. Write release notes in <Package>/NEWS.txt. Add version number and date.
View immediateResponder.py
def _immediateResponder(f):
"""
A decorator for responder functions that should return immediately and
execute asynchronously, as a defense against timing attacks.
The responder decorator should be applied after (above) this decorator::
@SomeCommand.responder
@_immediateResponder
def responder(...):
@lvh
lvh / manhole.py
Created Sep 15, 2012
Manhole and Axiom demo
View manhole.py
from axiom import attributes, item, store
import jinja2
import sys
from twisted.cred import checkers, portal
from twisted.conch import manhole, manhole_ssh
from twisted.internet import reactor
from twisted.python import log
from twisted.web import resource, server
You can’t perform that action at this time.