Skip to content

Instantly share code, notes, and snippets.

@Voker57
Created October 29, 2009 20:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Voker57/221804 to your computer and use it in GitHub Desktop.
Save Voker57/221804 to your computer and use it in GitHub Desktop.
#!/bin/sh
usage()
{
echo "Usage: dump <file|image|text> [file] [language]"
}
case $1 in
file)
URL=`curl -w %{redirect_url} -F "file=@$2" http://dump.bitcheese.net/upload-file?simple`
echo "$URL [$URL/preview]" ;;
image)
URL=`curl -w %{redirect_url} -F "file=@$2" http://dump.bitcheese.net/upload-image?simple`
echo "$URL [$URL/preview]" ;;
text)
if [ -z $3 ] ; then
LANG=Plaintext
else
LANG=$3
fi
URL=`curl -w %{redirect_url} -F "lang=$LANG" -F "text=@$2" http://dump.bitcheese.net/upload-text`
echo $URL ;;
*) usage;
esac
@l29ah
Copy link

l29ah commented Nov 4, 2013

ГОВНО ПЛОХО ЗДЕЛАНО

Copy link

ghost commented Nov 24, 2014

Ну так зделай лутше.

@noktoborus
Copy link

@l29ah
Copy link

l29ah commented Sep 7, 2016

Зделой лущ линк на мой с хешепердолингом.

@l29ah
Copy link

l29ah commented Jul 23, 2018

@Voker57
Copy link
Author

Voker57 commented Sep 28, 2018

@l29ah запили без использования внешних тулз (urlencode), сделаю официальным.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment