Skip to content

Instantly share code, notes, and snippets.

@cvan
Created December 17, 2011 01:41
Show Gist options
  • Save cvan/1488826 to your computer and use it in GitHub Desktop.
Save cvan/1488826 to your computer and use it in GitHub Desktop.
auto upload mac screenshots to imgur
function ss {
IMGUR_API_KEY="GET_YOUR_OWN"
SCREENSHOT="/tmp/`date +%s`.png"
screencapture -iW ${SCREENSHOT}
echo "Sending ${SCREENSHOT} ..."
curl -F "image=@${SCREENSHOT}" -F "key=${IMGUR_API_KEY}" http://api.imgur.com/2/upload.xml | sed "s/.*<original>\([^<]*\).*<.*/\1/" | pbcopy
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment