# Define types of building blocks
SUBDOMAIN = STRING.set('validate', validate_subdomain)
'data': NESTED({
'attributes': NESTED({
'subdomain': SUBDOMAIN,

Here's my config:

$ cat Procfile.test
foo: python -u

$ cat
import logging
logging.warn('A log line\nWith a line break')
logging.warn('Second log')
def lookup_table(values, key=None, keyval=None, unique=False, use_lists=False):
Builds a dict-based lookup table (index) elegantly.
Supports building normal and unique lookup tables. For example:
>>> lookup_table(['foo', 'bar', 'baz', 'qux', 'quux'],
... lambda s: s[0])
'b': {'bar', 'baz'},
'f': {'foo'},
'q': {'quux', 'qux'}
View magic.awk
#ifdef _not_defined
"exit`[ -z $BASH ] && t=sh; [ -z $BASH ] || t=$(basename $BASH); echo Hello, World from $t > /dev/tty;`";
"[puts {Hello, World from Tcl}; {exit}]";
from operator import concat;
exec concat(concat(concat(chr(109),chr(61)),chr(39)),chr(39));
m,""" ";/,;s/;//;
#include <stdio.h>
#define BEGIN int main(int nargs,char** args)

Keybase proof

I hereby claim:

  • I am nvie on github.
  • I am nvie ( on keybase.
  • I have a public key whose fingerprint is 9B5C 55F6 2651 625C C4EE 7C8F 4DAB 9440 5EA5 AAF0

To claim this, I am signing this object:

from contextlib import contextmanager
from django.conf import settings
from django.db import connection
def no_queries_allowed():
"""This is a helper method that makes it easier during development, by
throwing an exception when any queries are made within its block. Using
from collections import deque
from functools import wraps
def inversify(predicate):
"""Returns a predicate that is the inverses of the given predicate."""
def _inner(*args, **kwargs):
return not predicate(*args, **kwargs)
return _inner
import jingo
from django_assets.env import get_env
jingo.env.assets_environment = get_env()
View log.txt
$ python
Traceback (most recent call last):
File "", line 7, in <module>
File "/Users/nvie/.virtualenvs/foo/lib/python2.7/site-packages/django/core/", line 175, in sign
return str('%s%s%s') % (value, self.sep, self.signature(value))
File "/Users/nvie/.virtualenvs/foo/lib/python2.7/site-packages/django/core/", line 169, in signature
signature = base64_hmac(self.salt + 'signer', value, self.key)
File "/Users/nvie/.virtualenvs/foo/lib/python2.7/site-packages/django/core/", line 75, in base64_hmac
return b64_encode(salted_hmac(salt, value, key).digest())
View gist:5082554
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 0: ordinal not in range(128)
Stacktrace (most recent call last):
File "connect/", line 47, in get
resp.set_signed_cookie('foo', 'bar', max_age=600)
File "django/http/", line 188, in set_signed_cookie
value = signing.get_cookie_signer(salt=key + salt).sign(value)
File "django/core/", line 91, in get_cookie_signer
return Signer('django.http.cookies' + settings.SECRET_KEY, salt=salt)