Skip to content

Instantly share code, notes, and snippets.

View sigma's full-sized avatar
🏠
Working from Home

Yann Hodique sigma

🏠
Working from Home
View GitHub Profile
@sigma
sigma / jquery.purr.js
Created October 10, 2011 16:56
jquery purr plugin
/**
* jquery.purr.js
* Copyright (c) 2008 Net Perspective (net-perspective.com)
* Licensed under the MIT License (http://www.opensource.org/licenses/mit-license.php)
*
* @author R.A. Ray
* @projectDescription jQuery plugin for dynamically displaying unobtrusive messages in the browser. Mimics the behavior of the MacOS program "Growl."
* @version 0.1.0
*
* @requires jquery.js (tested with 1.2.6)
@sigma
sigma / jquerytagsinput.js
Created October 9, 2011 15:23
jquery tags input plugin
/*
jQuery Tags Input Plugin 1.3.1
Copyright (c) 2011 XOXCO, Inc
Documentation for this plugin lives here:
http://xoxco.com/clickable/jquery-tags-input
Licensed under the MIT license:
@sigma
sigma / ipy_profile_gae.py
Created August 29, 2010 09:39
#published GAE #ipython configuration
import IPython.ipapi
from getpass import getpass
from netrc import netrc
from optparse import OptionParser
from google.appengine.ext.remote_api import remote_api_stub
from google.appengine.tools.appcfg import AppCfgApp, StatusUpdate
from google.appengine.tools.bulkloader import RequestManager
@sigma
sigma / gitproxy
Created August 23, 2010 11:18
flexible proxy traversal
#!/bin/bash
target_ip=`gethostip -d $1`
function is_local() {
echo $1 | grep '\(10\.\|127\.\|172\.\)'
}
flag=`is_local "$target_ip"`
if [ -n "$flag" ]; then
@sigma
sigma / postactivate
Created July 28, 2010 16:47
virtualenv global postactivate: don't change PS1 in my back
PS1="$_OLD_VIRTUAL_PS1"
export PS1
unset _OLD_VIRTUAL_PS1
rehash
@sigma
sigma / get_scratch.sh
Created July 25, 2010 09:04
get_scratch.sh
#!/bin/zsh
scratchpad="scratch$1"
if tmux has -t $scratchpad; then
tmux attach -t $scratchpad
else
tmux new -s $scratchpad
fi
@sigma
sigma / gist:342053
Created March 24, 2010 07:08
projects hashing
for proj in ~/Projects/*/*(/); do
hash -d ${proj##*/}=${proj}
done
@sigma
sigma / _workon
Created March 19, 2010 21:46
workon completion
#compdef workon
_workon_envs () {
local expl devs
envs=( $(workon) )
_wanted envs expl 'available envs' \
compadd "$@" - "${(@)envs%%:*}"
}
@sigma
sigma / shovestore.py
Created December 16, 2009 16:57
recursive python shove
from shove import Shove
class ShoveStore(Shove):
""" usage: Shove('shove://(shove://(sqlite://data.db file://data_files) memory://)',
'simple://', shove_params={'shove_params': {}})
"""
def __init__(self, engine, **kw):
url = engine.partition('://')[2][1:-1]
@sigma
sigma / etags-kill.el
Created November 30, 2009 16:20
etags-kill.el
;;; etags-kill.el --- kill useless buffers when browsing tags
;; Copyright (C) 2009 Free Software Foundation, Inc.
;; Author: Yann Hodique <[email protected]>
;; Keywords:
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)