Skip to content

Instantly share code, notes, and snippets.

@dvl
dvl / .env
Created February 9, 2015 22:29
DEBUG=1
ALLOWED_HOSTS='.localhost, .alerte.com'
SECRET_KEY=s3cr3t_k3y
CACHE_LOCATION=127.0.0.1:6379:1
DATABASE_URL=postgres://postgres:deadpool@localhost/delphos
# -*- coding: utf-8 -*-
import functools
def ensure_types(f):
@functools.wraps(f)
def wrapper(*args: list, **kwargs: dict):
if f.__annotations__:
for arg in args:
@dvl
dvl / index.html
Last active August 29, 2015 14:17
Registered users: {{ view.total_users }}

Keybase proof

I hereby claim:

  • I am dvl on github.
  • I am xdvl (https://keybase.io/xdvl) on keybase.
  • I have a public key whose fingerprint is C2A1 B32E 70FA 18AB 6B76 62AD 9754 691F 790D 3CEE

To claim this, I am signing this object:

# -*- coding: utf-8 -*-
import time
import praw
from praw.errors import InvalidUserPass, RateLimitExceeded
bot = praw.Reddit('bf monitor')
username = 'test'
# -*- coding: utf-8 -*-
from django.conf.urls import include, url
from django.contrib import admin
# Text to put at the end of each page's <title>.
admin.site.site_title = 'Administração Infobusca'
# Text to put in each page's <h1>.
admin.site.site_header = 'Infobusca'
@dvl
dvl / udjango.py
Last active August 29, 2015 14:21
mininal Django app
# -*- coding: utf-8 -*-
from django.conf import settings
settings.configure(
DEBUG=True,
SECRET_KEY='th1s_1s_s3cr37',
ROOT_URLCONF=__name__,
)
alphabet = {
".-": "A",
"-...": "B",
"-.-.": "C",
"-..": "D",
".": "E",
"..-.": "F",
"--.": "G",
"....": "H",
"..": "I",
FROM buildpack-deps:jessie
RUN apt-get purge -y python.*
ENV LANG C.UTF-8
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys \
26DEA9D4613391EF3E25C9FF0A5B101836580288
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys \
9554F04D7259F04124DE6B476D5A82AC7E37093B \
@dvl
dvl / a.out
Last active August 29, 2015 14:23
$ python test.py
4 0 LOAD_CONST 3 ('aaaaaaaaaaaaaaaaaaaa')
3 STORE_FAST 0 (a)
5 6 LOAD_CONST 4 ('aaaaaaaaaaaaaaaaaaaa')
9 STORE_FAST 1 (b)
7 12 LOAD_FAST 0 (a)
15 LOAD_FAST 1 (b)
18 COMPARE_OP 8 (is)