Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jcanfield
Created September 29, 2012 21:18
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcanfield/3805214 to your computer and use it in GitHub Desktop.
Save jcanfield/3805214 to your computer and use it in GitHub Desktop.
Git.io Generator (Bash Script)
#!/bin/bash
##
## Usage: gist-shorten.sh gistID urlshortenedname
echo "--> Creating git.io address for your Gist..."
curl -i http://git.io -F "url=https://gist.github.com/$1" \
-F "code=$2"
echo "--> Created http://git.io/$2 ..."
exit
#!/bin/bash
##
## Usage: gitrepo-shorten.sh username/repository.git urlshortenedname
echo "--> Creating git.io address for your Repository..."
curl -i http://git.io -F "url=https://github.com/$1" \
-F "code=$2"
echo "--> Created http://git.io/$2 ..."
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment