I hereby claim:
- I am jbittel on github.
- I am envfriction (https://keybase.io/envfriction) on keybase.
- I have a public key ASC3Z4f_h5HUQRKRJ5YdScPa6tmbd2yoCKFrodUX1-fQUwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
map $remote_addr $proxy_remote_user { | |
default ''; | |
192.168.0.1 'username'; | |
} | |
server { | |
location / { | |
if ($proxy_remote_user) { | |
proxy_set_header X-Proxy-Remote-User $proxy_remote_user; | |
} |
from django.contrib.auth.backends import ModelBackend | |
from django.contrib.auth.models import User | |
class CaseInsensitiveModelBackend(ModelBackend): | |
def authenticate(self, username=None, password=None): | |
try: | |
user = User.objects.get(username__iexact=username) | |
if user.check_password(password): | |
return user |
#!/bin/bash | |
# This hook is sourced after every virtualenv is activated. | |
PROJECT_DIR="$HOME/code/$(basename $VIRTUAL_ENV)" | |
if [ -d $PROJECT_DIR ]; then | |
# If we aren't already within the project dir, cd into it | |
if [[ ! `pwd` == "$PROJECT_DIR*" ]]; then | |
export PRE_VENV_ACTIVATE_DIR=`pwd` | |
cd "$PROJECT_DIR" | |
fi |
<button id="lever">Pull!</button> | |
<div id="outcome"></div> | |
<button id="test">Distribution</button> | |
<div><table> | |
<thead> | |
<th>Symbols</th> | |
<th>Chance</th> | |
<th>Result</th> | |
<th>Variance</th> | |
</thead> |