Skip to content

Instantly share code, notes, and snippets.

View twidi's full-sized avatar
🕶️

Stéphane "Twidi" Angel twidi

🕶️
View GitHub Profile
@streeter
streeter / pre-commit.py
Created November 18, 2011 16:02
Python .git/hooks/pre-commit hook
#!/usr/bin/env python
import os
import re
import subprocess
import sys
modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)')
CHECKS = [
@mklabs
mklabs / bootstrap-plugins.txt
Created December 2, 2011 11:23
h5bp + twitter bootstrap integration
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js
@melanke
melanke / README.md
Created January 17, 2012 17:32 — forked from eligrey/object-watch.js
watch the changes of some object or attribute
@skyl
skyl / kwacros.py
Created February 1, 2012 05:03
Django Template macros with args and kwargs
#
# templatetags/kwacros.py - Support for macros in Django templates
#
# Based on snippet by
# Author: Michal Ludvig <michal@logix.cz>
# http://www.logix.cz/michal
#
# modified for args and kwargs by Skylar Saveland http://skyl.org
#
@rbraband
rbraband / example 1
Created February 24, 2012 14:12
Howto implement stored procedures within Redis
# Step 0 -- create test data
redis-cli HSET :object:30343552:data foo bar
# Step 1 -- store sample function 'sampleFunction'
redis-cli SET :functions:sample "redis.call('SELECT', 0);local data=redis.call('HGETALL',':object:' .. ARGV[1] .. ':data');return data"
# Step 2 -- create function loader
redis-cli SCRIPT LOAD "f=loadstring(redis.call('get',':functions:' .. KEYS[1]));return f()"
# Step 3 -- test
@sgillies
sgillies / swap-coords.py
Created March 12, 2012 16:29
Swapping coordinates with Fiona
# Swapping x, y coords.
from descartes import PolygonPatch
from fiona import collection
from itertools import imap
import logging
from matplotlib import pyplot
log = logging.getLogger()
@samuraisam
samuraisam / model_cache.py
Created May 4, 2012 19:30
Django Model Cache and Cached Piston OAuth Store
# The author disclaims copyright to this source code. In place of a legal
# notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
import hashlib, cPickle as pickle, logging
from django.db.models import signals as db_signals
from django.core.cache import cache
@revolunet
revolunet / github.md
Last active October 6, 2015 08:27
Whats missing from Github

Missing features on Github

After some years enjoying github awesomeness, heres what i miss most. Add your comments :)

Id love to use github for agile project management so issues are very important to me :)

Repositories :

@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active June 5, 2024 22:16 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@panuta
panuta / gist:3075882
Last active May 7, 2024 13:33
How to setup Django server with virtualenv on Ubuntu Server 12.04

Fix locale problem

Open file /etc/default/locale to add or change LC_ALL to the following

LC_ALL="en_US.UTF-8"

Then logout and login again.

Install necessary packages