Skip to content

Instantly share code, notes, and snippets.

Embed
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

This comment has been minimized.

Copy link

commented Nov 4, 2013

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

@ghost

This comment has been minimized.

Copy link

commented Nov 24, 2014

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

@noktoborus

This comment has been minimized.

Copy link

commented Oct 20, 2015

@l29ah

This comment has been minimized.

Copy link

commented Sep 7, 2016

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

@l29ah

This comment has been minimized.

@Voker57

This comment has been minimized.

Copy link
Owner Author

commented Sep 28, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.