Skip to content

Instantly share code, notes, and snippets.

Avatar

Idris Mokhtarzada idris

View GitHub Profile
View Colorful Git Bash.sh
function parse_git_branch {
local branch=`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ "$branch" == "" ]
then
echo ""
else
echo \($branch\)\
fi
}
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
idris / gist:364715
Created Apr 13, 2010 — forked from reinh/ship.sh
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 />!
</fw:page>