Skip to content

Instantly share code, notes, and snippets.

@IsaacG
Created October 12, 2012 17:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save IsaacG/3880398 to your computer and use it in GitHub Desktop.
Save IsaacG/3880398 to your computer and use it in GitHub Desktop.
picpaste CLI command
#!/bin/bash
# storetime: 1:30m 2:1h 3:3h 4:6h 5:12h 6:1d 7:3d 8:7d 9:forever
# addprivacy: no:no 1:basic 2:strong 3:shorten
picpaste () {
opts=( -F storetime=1 -F addprivacy=1 -F rules=yes )
link=http://www.picpaste.com/upload.php
curl -sA firefox "${opts[@]}" -F upload=@"$1" "$link" \
| sed -n '/Picture URL/{n;s/.*">//;s/<.*//p}'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment