Skip to content

Instantly share code, notes, and snippets.

@jcanfield
Created September 29, 2012 21:18
Show Gist options
  • 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