Skip to content

Instantly share code, notes, and snippets.

View erichs's full-sized avatar

Erich Smith erichs

View GitHub Profile
@erichs
erichs / ghanity.sh
Created March 18, 2013 15:02
create GitHub vanity url using git.io shortening service. Works with OSX clipboard
ghanity ()
{
local code="$1" url="$2";
echo 'creating vanity GitHub URL... ';
ghurl=$(curl -s -i http://git.io -F "url=$url" -F "code=$code" | grep Location | awk '{print $2}');
echo $ghurl | pbcopy;
echo "copied to clipboard: ${ghurl}"
}