Skip to content

Instantly share code, notes, and snippets.

@robertlyall
Last active December 23, 2015 03:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertlyall/6571765 to your computer and use it in GitHub Desktop.
Save robertlyall/6571765 to your computer and use it in GitHub Desktop.
Cool function for Terminal. I just need to type "upload cool-image.jpg" in the Terminal to upload it to my VPS, and copy the public URL to my clipboard.
function upload() {
scp "$1" robert@rglyall.co.uk:~/public/rglyall.co.uk/public/i;
echo "http://rglyall.co.uk/i/$1" | pbcopy;
echo "Copied to clipboard: http://rglyall.co.uk/i/$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment