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 / 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 / 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 / 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 / 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 / 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 / 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 / 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 / _Xdefaults.txt
Created November 29, 2011 19:00
.Xdefaults excerpt (xft stuff)
Xft.dpi: 96
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.antialias: true
Xft.rgba: rgb
Xft.lcdfilter: lcddefault
@sigma
sigma / .local.sh
Created December 8, 2011 18:03
.local.hashes
#!/usr/bin/zsh
# I organize my projects by vcs / project
# e.g. Projects/git/magit or Projects/hg/marmalade
# every project gets its named directory: ~magit or ~marmalade
for proj in ~/Projects/*/*(-/); do
hash -d ${proj##*/}=${proj};
done
@sigma
sigma / package.el
Created February 22, 2012 10:23
emacs23 package bootstraping code
;;; package.el --- Simple package system for Emacs
;; Copyright (C) 2007-2011 Free Software Foundation, Inc.
;; Author: Tom Tromey <tromey@redhat.com>
;; Created: 10 Mar 2007
;; Version: 0.9
;; Keywords: tools
;; This file is part of GNU Emacs.