Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#!/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 commented Nov 4, 2013

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

@ghost
ghost commented Nov 24, 2014

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

l29ah commented Sep 7, 2016

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

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