Skip to content

Instantly share code, notes, and snippets.

View codecat's full-sized avatar
🌸
Meow

Melissa codecat

🌸
Meow
View GitHub Profile
@codecat
codecat / imgur-uploader
Created July 4, 2012 22:23 — forked from robertbasic/imgur-uploader
xfce4-screenshooter to imgur
#!/bin/bash
# Ubuntu Keyboard settings shortcut:
# xfce4-screenshooter -r -o "sh /location/to/imgur-uploader.sh"
API_KEY=YOUR_API_KEY_GOES_HERE
URL=http://api.imgur.com/2/upload
RESPONSE=$(curl -s -F "key=$API_KEY" -F "image=@$1" $URL)
echo "$RESPONSE" | grep -o -E "<original>.*</original>" | grep -o -E "http://.*\.png" | xsel -i -b