Last Updated: February 25, 2016
· natfriedman

Quick screenshot sharing

I use this script at least 20 times a day. It sits in the dock on my mac, and I use to quickly screenshot a region of the screen, copy it to my server, and put the URL for the screenshot in my paste buffer. Click, drag, Cmd-v. It's faster than any of the commercial alternatives I've found. It generates a random, non-guessable URL.




FILENAME=`(cat /dev/random|head -c 10; date) | md5 -q | head -c 10`.png

screencapture -i $@ $FILEPATH
if [ -f $FILEPATH ]
    echo $HTTP_URL$FILENAME | pbcopy
    rm $FILEPATH

    echo `date` $HTTP_URL$FILENAME >> ~/bin/sattap.log

4 Responses
Add your response

Great little app, will definitely use, slight tweak use
sshpass -p ${SCP_PASS}

add this prior to scp and add the SCP_PASS variable.

over 1 year ago ·

Gist if anyone likes my addition

over 1 year ago ·

I thought of an adaptation for linux/ubuntu:
* replace "screencapture" by "scrot"
* use /dev/urandom instead of /dev/random
* md5 doesn't exist as is, must 'awk' md5sum a little, or use some other scripting

over 1 year ago ·

Reminds me of this: integrates with the normal screen shot hot key on OS X, drops the image in dropbox, and puts the public link in your paste buffer.

over 1 year ago ·