Skip to content

Instantly share code, notes, and snippets.


Idris Mokhtarzada idris

View GitHub Profile
idris / 0_reuse_code.js
Created Mar 20, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
idris /
Created Nov 13, 2012
command-line utility that opens a browser to the given file/directory/commit in GitHub. Now has blame command which opens github blame page.
function parse_git_branch {
local branch=`cd $DIR;git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ "$branch" == "" ]; then
exit 1
echo $branch
idris / fix-layout-slugs-mongo.js
Created Dec 6, 2011
Script to update theme slugs
View fix-layout-slugs-mongo.js
* fix-theme-slugs-mongo.js
* To run, replace localhost/db_name with your connection info and
* run this command:
* mongo localhost/db_name --quiet fix-layout-slugs-mongo.js
idris / gist:364715
Created Apr 13, 2010 — forked from reinh/
hack & ship all-in-one
View gist:364715
#!/bin/sh -x
# git name-rev is fail
CURRENT=`git branch | grep '\*' | awk '{print $2}'`
git checkout master
git pull origin master
git checkout ${CURRENT}
git rebase master
git checkout master
git merge ${CURRENT}
git push origin master