Skip to content

Instantly share code, notes, and snippets.

View twidi's full-sized avatar
🕶️

Stéphane "Twidi" Angel twidi

🕶️
View GitHub Profile
@nicdaCosta
nicdaCosta / Grep.js
Last active March 9, 2024 13:39
Basic function that searches / filters any object or function and returns matched properties.
/*
Grep.js
Author : Nic da Costa ( @nic_daCosta )
Created : 2012/11/14
Version : 0.2
(c) Nic da Costa
License : MIT, GPL licenses
Overview:
Basic function that searches / filters any object or function and returns matched properties.
@jnothman
jnothman / timedeltatype.py
Created November 12, 2012 05:41
An argparse type factory that produces datetime.timedelta objects
import datetime
import re
class TimeDeltaType(object):
"""
Interprets a string as a timedelta for argument parsing.
With no default unit:
>>> tdtype = TimeDeltaType()
@agnoster
agnoster / README.md
Last active March 10, 2025 15:41
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@revolunet
revolunet / redisfile.py
Created August 23, 2012 23:36
REDIS file caching
import hashlib
from redis import Redis
#
# automatically cache file access to a redis instance
# check if file changed via md5
#
class RedisFileManager(object):
""" cache file access to a redis instance """
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@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

@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active January 22, 2025 09:27 — 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.
@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 :

@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