Created
October 18, 2018 15:53
-
-
Save s3krit/09b9935d0939b8d53f62718693a82397 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pushd /tmp > /dev/null | |
scrot "$@" scr.png | |
ret=$(curl -sfX POST -F 'files[]'="@scr.png" "https://file0.s3kr.it/upload") | |
filehash=$(echo $ret | egrep -o '[a-z0-9]{12}\.[a-z]{3}' | head -n 1) | |
desturl="https://file0.s3kr.it/${filehash}" | |
echo $desturl | tr -d '\n' | xclip -selection clipboard | |
echo $desturl | tr -d '\n' | xclip | |
rm scr.png | |
beep | |
popd > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment