Skip to content

Instantly share code, notes, and snippets.

hash tag farm lyfe

George Hickman ghickman

hash tag farm lyfe
View GitHub Profile
View gitalist.conf
name Gitalist
#git /path/to/git
# Configure this to where your repositories are.
repo_dir /home/git/repositories/
sitename "Gitalist"
ghickman / add_inline.js
Created Jun 11, 2011
Add an inline Django form to the formset without reloading the page.
View add_inline.js
function add_inline_form(prefix) {
var count = parseInt($('#id_' + prefix + '-TOTAL_FORMS').val(), 10);
var last_form = $('.' + prefix + ':last');
var new_form = last_form.clone(false).html(last_form.html().replace(
new RegExp(prefix + '-\\\\d-', 'g'), prefix + '-' + count + '-'));
new_form.find('input[type="text"], textarea').each(function () {
ghickman / .noserc
Created Apr 30, 2011
Example noserc file
View .noserc
ghickman / post-receive
Created Apr 5, 2011
Post-Receive hook. Runs when the repository is pushed to.
View post-receive
while read oldrev newrev refname
if [ "$refname" == "refs/heads/master" ]; then
export GIT_DIR=$WORKDIR/.git
pushd $WORKDIR >/dev/null
git pull --quiet >/dev/null
# run some code
popd >/dev/null
ghickman / setup_load_paths.rb
Created Apr 3, 2011
Ruby script to tell RVM which environment to load
View setup_load_paths.rb
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME']))
rvm_lib_path = File.join(rvm_path, 'lib')
$LOAD_PATH.unshift rvm_lib_path
require 'rvm'
RVM.use_from_path! File.dirname(File.dirname(__FILE__))
rescue LoadError
# RVM is unavailable at this point.
raise "RVM ruby lib is currently unavailable."
View authorized_keys
ssh-rsa <the Gateway's generated key> Gateway
ssh-rsa <the Satellite generated key> Satellite
ssh-rsa <the generated key> User 1
ssh-rsa <the generated key> User 2
ssh-rsa <the generated key> User 3
View .gitmodules
[submodule "Contrib/json-framework"]
path = Contrib/json-framework
url =
[submodule "Contrib/scifihifi-iphone"]
path = Contrib/scifihifi-iphone
url =
ghickman / gist:835009
Created Feb 19, 2011
Set vim to 256 colours for iTerm2
View gist:835009
set t_Co=256
ghickman /
Created Dec 16, 2010
Check the validity of a MySQL connection profile in a Java app. Requires the mysql jdbc connector.
package dbtest;
import java.sql.*;
* @author George Hickman <>
public class Main {
ghickman / clean build install
Created Oct 14, 2010
Installation Instructions for Tv Renamr
View clean build install
python clean -a
python build
python install