Skip to content

Instantly share code, notes, and snippets.

Avatar
🐍

Nicolas Dubois wo0dyn

🐍
View GitHub Profile
@wo0dyn
wo0dyn / gist:3340763
Last active Feb 1, 2017
Write “KFC” with one-line-script using the string “Kentucky Fried Chicken” once.
View gist:3340763

KFC

Write KFC with one-line-script using the string “Kentucky Fried Chicken” once.

Bash

for w in $(echo "Kentucky Fried Chicken" | tr " " "\n"); do echo -n ${w:0:1}; done;
View gist:3776206

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

View README.md

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

@wo0dyn
wo0dyn / gist:4113739
Created Nov 19, 2012
GitHub HOW-TO “Resync a fork from original repo”
View gist:4113739

GitHub HOW-TO “Resync a fork from original repo”

I forked a repo dzen/omgcats a couple weeks ago on duboisnicolas/omgcats. I missed some commits so I need to resynchronize dzen/omgcats on duboisnicolas/omgcats.

$ git clone git://github.com/duboisnicolas/omgcats.git
$ cd omgcats 
# New branch for latest commits:
$ git checkout -b upstream/master
# Add new remote upstream from original repo:
View pre-commit.sh
# 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
View pytong.bio.md

Jean-Michel Armand, aka JMad

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

View math-trick.md
@wo0dyn
wo0dyn / ovh_deploy_simulation.py
Last active Dec 28, 2015
/me en train de déployer une petite application Django sur un serveur mutualisé d'OVH…
View ovh_deploy_simulation.py
# -*- coding: utf-8 -*-
from random import choice
import sys
from webbrowser import open_new as please_help_me
def switch_to(app):
print('⌘ + ⇥ to ' + app.title())