Skip to content

Instantly share code, notes, and snippets.

View nmariz's full-sized avatar

Nuno Mariz nmariz

View GitHub Profile
#!/bin/sh
# on ubuntu: need some utils & dev libs
sudo apt-get install apache2-utils openssl libssl-dev libpcre3-dev
# compile nginx
cd /tmp
curl http://nginx.org/download/nginx-0.7.64.tar.gz | tar xz
cd nginx*
./configure --with-http_ssl_module --with-http_dav_module \
from django.contrib.auth.hashers import BCryptPasswordHasher
from django.utils.crypto import constant_time_compare
from django.utils.encoding import force_bytes
class DjangoBCryptPasswordHasher(BCryptPasswordHasher):
"""
Handles legacy passwords wich were hashed with the 'bc$' algorithm via
django-bcrypt.
"""