Skip to content

Instantly share code, notes, and snippets.

View brutasse's full-sized avatar
🤌

Bruno Renié brutasse

🤌
View GitHub Profile
from django.contrib.auth.hashers import BasePasswordHasher
class NotHashingHasher(BasePasswordHasher):
"""
A hasher that does not hash.
"""
algorithm = 'plain'
def encode(self, password, salt):
@brutasse
brutasse / commits.py
Created May 14, 2011 13:09
Github Djangoproject commits -> highlighted Atom feed with links to changesets, tickets and files.
import os
import re
import feedgenerator
from github2.client import Github
REPO = 'django/django'
BRANCH = 'master'
HERE = os.path.abspath(os.path.dirname(__file__))
TICKET_RE = re.compile(r'#(?P<id>\d+)')
@brutasse
brutasse / shell_colors.py
Created July 13, 2010 15:58
Colorized shell output, some useful constants…
# Font colors #
BLACK = '\x1b[30m'
RED = '\x1b[31m'
GREEN = '\x1b[32m'
YELLOW = '\x1b[33m'
BLUE = '\x1b[34m'
PURPLE = '\x1b[35m'
PALE_BLUE = '\x1b[36m'
WHITE = '\x1b[37m'