cd ~
git clone https://gist.github.com/5165174.git bash
ln -s bash/bash_profile .bash_profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias branch="git branch | grep '^\*' | sed 's/* //'" | |
alias push-current='git push origin $(branch)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function delete-pyc() { | |
find . -name '*.pyc' -delete | |
} | |
function pull-latest-master() { | |
git checkout master; git pull & | |
git submodule foreach --recursive 'git checkout master; git pull &' | |
until [ -z "$(ps aux | grep '[g]it pull')" ]; do sleep 1; done | |
} | |
function update-code() { | |
pull-latest-master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* copied from http://www.netlobo.com/url_query_string_javascript.html */ | |
function get_url_param( name ) | |
{ | |
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); | |
var regexS = "[\\?&]"+name+"=([^&#]*)"; | |
var regex = new RegExp( regexS ); | |
var results = regex.exec( window.location.href ); | |
if( results == null ) | |
return ""; | |
else |
NewerOlder