From 51cc6543d0fd663ec10522ac2a24d5d603232773 Mon Sep 17 00:00:00 2001 From: gotbletu Date: Fri, 24 May 2013 21:09:24 -0700 Subject: [PATCH] new --- imgur_function.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 imgur_function.txt diff --git a/imgur_function.txt b/imgur_function.txt new file mode 100644 index 0000000..a0eddd8 --- /dev/null +++ b/imgur_function.txt @@ -0,0 +1,16 @@ +# this is notes for video: http://www.youtube.com/watch?v=7-9uYSGyvU0 + + +# upload to image hosting server +# http://www.commandlinefu.com/commands/view/9341 +upl-imgur() { + curl -# -F image=@"$1" -F "key=1913b4ac473c692372d108209958fd15" \ + http://api.imgur.com/2/upload.xml | grep -Eo "(.)*" \ + | grep -Eo "http://i.imgur.com/[^<]*" +} + +# http://www.commandlinefu.com/commands/view/4004 +upl-ompldr() { + curl -# -F file1=@"$1" http://ompldr.org/upload|awk '/File:/' | cut -d\> -f5- | cut -d\/ -f1-4 +} +