Skip to content

Instantly share code, notes, and snippets.

View wo0dyn's full-sized avatar

Nicolas Dubois wo0dyn

View GitHub Profile

Jean-Michel Armand, aka JMad

Djangonaute cheminot-entrepreneur-rôliste sous licence GPL.

# make sure there's no TODO, debugging... left
errors=0
for bad in 'import pdb' 'import ipdb' 'TODO' 'print' 'assert False'; do
echo ">> checking for '$bad'"
res=$(git diff-index --name-only --cached $against -S"$bad" --)
if test -n "$res"; then # if not empty, found some guilty files
echo "ERROR, found '$bad' in files commited:"
echo $res
errors=$(($errors + 1))
fi
@wo0dyn
wo0dyn / maths-puzzle.md
Last active December 4, 2015 08:25
Can you do the maths puzzle for Vietnamese eight-year-olds that has stumped parents and teachers?

Can you do the maths puzzle for Vietnamese eight-year-olds that has stumped parents and teachers?

Source: article from The Guardian

Script

from itertools import permutations

Create user and database for PostgreSQL

Just a simple script to create a user and its database easily.

Requirements

Tested w/ PostgreSQL 8.4 on Mint 11 (±Ubuntu). Be careful to use md5 in your pg_hba.conf.

Installation

PyElliptic

PyElliptic is a high level wrapper for the cryptographic library : OpenSSL. Under the GNU General Public License

Python3 compatible. For GNU/Linux and Windows. Require OpenSSL

Features