I hereby claim:
- I am dickbrouwer on github.
- I am dickbrouwer (https://keybase.io/dickbrouwer) on keybase.
- I have a public key whose fingerprint is E6ED E0C4 7AAC 906A 57DF BC1F 12AB FFA5 C939 E941
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
server { | |
listen 80; | |
server_name dev.websitename.com; | |
location / { | |
proxy_pass http://127.0.0.1:8000; | |
} | |
location /media/ { | |
root /var/django/websitename/; |
from celery import signals | |
import zmq | |
import logging | |
log = logging.getLogger("app." + __name__) | |
ZMQ_SOCKET_LINGER = 100 | |
context = zmq.Context() | |
context.linger = ZMQ_SOCKET_LINGER |
find . -type f -name '*.py' -exec sed -i "" "s/str1/str2/g" {} + |
from amqplib import client_0_8 as amqp | |
conn = amqp.Connection(host="localhost:5672", userid="<user>", password="<passwd>", virtual_host="<vhost>", insist=False) | |
conn = conn.channel() | |
conn.queue_purge("<queue_name>") |
+ (UserManager *)sharedManager { | |
static dispatch_once_t once; | |
dispatch_once(&once, ^ { | |
_sharedManager = [[self alloc] init]; | |
}); | |
return _sharedManager; | |
} |
+ (void)initialize { | |
static BOOL initialized = NO; | |
if (!initialized) { | |
initialized = YES; | |
_sharedManager = [Manager new]; | |
} | |
} |
from django.test import TestCase | |
from django.utils.importlib import import_module | |
from django.http import HttpRequest | |
from django.conf import settings | |
class SampleTest(TestCase): | |
def setUp(self): | |
# Create mock request object with session key | |
engine = import_module(settings.SESSION_ENGINE) | |
request = HttpRequest() |
filetype off | |
call pathogen#runtime_append_all_bundles() | |
call pathogen#helptags() | |
filetype plugin indent on | |
set nocompatible | |
set modelines=0 | |
let mapleader = "," | |
inoremap jj <ESC> |
class EmailUserCreationForm(UserCreationForm): | |
''' | |
User login form class that replaces the 'username' field with | |
an 'emailfield' on registration, sets email = username in the | |
User object, and adds case-insensitive username verification. | |
''' | |
username = forms.EmailField(label=("Email Address")) | |
confirm = forms.BooleanField(error_messages={'required': | |
'Please read and accept the Terms and Conditions to continue'}) |