Skip to content

Instantly share code, notes, and snippets.


Idris Mokhtarzada idris

View GitHub Profile
View Colorful Git
function parse_git_branch {
local branch=`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ "$branch" == "" ]
echo ""
echo \($branch\)\
View Mobile User-Agent Regex
.*iPhone|iPod|BlackBerry|Android|webOS|Windows CE|IEMobile|Symbian|Opera Mini|Opera Mobi|Nokia|HTC|LG-CU920|SAMSUNG-SGH-A687|SAMSUNG-SGH-A867.*
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
View fwml_hello_world.html
<fw:page permapath="/fwml_hello_world.html">
Hello, <fw:name />!