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 / vbulletintags.user.js
Created October 10, 2011 18:00
vBulletinTags greasemonkey script
// ==UserScript==
// @name vBulletinTags
// @namespace http://www.hodique.info/gmscripts
// @include http://www.denofangels.com/forums/showthread.php?*
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js
// @require https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js
// @require https://raw.github.com/gist/1273800/1a880db0bc3abceb2c0e2841b72babceefa0fa17/jquerytagsinput.js
// @require https://raw.github.com/gist/1275791/1972165bbe3bbffc16025483f3ea850d1a780f56/jquery.purr.js
// @resource tagImg https://developer.mozilla.org/skins/mdn/Transitional/img/icons/tag-tiny.png
// ==/UserScript==
@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]