Skip to content

Instantly share code, notes, and snippets.

View idris's full-sized avatar

Idris Mokhtarzada idris

View GitHub Profile
@idris
idris / gmo
Last active August 29, 2015 13:56
`gmo` command to merge pull requests
#!/bin/bash
git merge -m "Merge #$1 from $2 into $(git symbolic-ref --short HEAD)" origin/$2
@idris
idris / 0_reuse_code.js
Created March 20, 2014 16:56
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Keybase proof

I hereby claim:

  • I am idris on github.
  • I am idrism (https://keybase.io/idrism) on keybase.
  • I have a public key whose fingerprint is 04FF 1E6F E9C0 B832 7642 6630 B2C9 E54F E841 04FE

To claim this, I am signing this object:

@idris
idris / fwml_hello_world.html
Created March 12, 2010 15:29
FWML Hello World
<fw:page permapath="/fwml_hello_world.html">
Hello, <fw:name />!
</fw:page>
@idris
idris / gist:364715
Created April 13, 2010 15:13 — forked from reinh/ship.sh
hack & ship all-in-one
#!/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
.*iPhone|iPod|BlackBerry|Android|webOS|Windows CE|IEMobile|Symbian|Opera Mini|Opera Mobi|Nokia|HTC|LG-CU920|SAMSUNG-SGH-A687|SAMSUNG-SGH-A867.*
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
}
@idris
idris / fix-layout-slugs-mongo.js
Created December 6, 2011 18:49
Script to update theme slugs
/********************************************************************
* 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
idris / github.sh
Created November 13, 2012 04:03
command-line utility that opens a browser to the given file/directory/commit in GitHub. Now has blame command which opens github blame page.
#!/bin/bash
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
else
echo $branch
fi
@idris
idris / boxen dependency cycle
Created November 11, 2013 17:29
I'm getting this when running boxen. I'm on mavericks.
Error: Could not apply complete catalog: Found 1 dependency cycle:
(File[/Users/idris/src/our-boxen/script/boxen-git-credential] => File[/opt/boxen/bin/boxen-git-credential] => Repository[/opt/boxen/homebrew] => Class[Homebrew] => Class[Main] => Node[default] => File[/Users/idris/src/our-boxen] => File[/Users/idris/src/our-boxen/script/boxen-git-credential])
Try the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz