Skip to content

Instantly share code, notes, and snippets.

@Shadey
Last active August 29, 2015 14:14
Show Gist options
  • Save Shadey/af95fa3222e595c1b7d3 to your computer and use it in GitHub Desktop.
Save Shadey/af95fa3222e595c1b7d3 to your computer and use it in GitHub Desktop.
#requies xclip curl and imagemagick
#!/usr/bin/sh
upload(){
res=$(curl -s "http://pomf.se/upload.php" -F "files[]=@$1")
IFS='"' read -a array <<< $res
link="http://a.pomf.se/${array[17]}"
echo $link
echo $link | xclip -selection c
}
file="kok.png"
if [ -z "$1" ]
then
import $file
upload $file
rm $file
else
upload $1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment