Skip to content

Instantly share code, notes, and snippets.

Avatar
🏳️‍🌈

Johannes Löthberg kyrias

🏳️‍🌈
View GitHub Profile
@kyrias
kyrias / pomf
Created Jan 30, 2014
Upload a file to pomf.se
View pomf
#!/usr/bin/env bash
upload=$(curl -sf -F "files[]=@\"$1\"" http://pomf.se/upload.php)
geturl=$(jshon -e files -e 0 -e url -u <<< $upload)
printf "%s/%s\n" "http://a.pomf.se" "$geturl"
@kyrias
kyrias / scrotpomf.bash
Created Jan 30, 2014
Take a scrot and upload it to pomf.se
View scrotpomf.bash
#!/usr/bin/env bash
SCROTARGS=()
while (( "$#" )); do
SCROTARGS+=($1)
shift
done
# take the shot
FILE="$(scrot ${SCROTARGS[@]} -e 'echo -n $f')"