Skip to content

Instantly share code, notes, and snippets.

@tonyc
Last active July 17, 2018 22:11
Show Gist options
  • Save tonyc/902b751b85d1598c619832ea728061a4 to your computer and use it in GitHub Desktop.
Save tonyc/902b751b85d1598c619832ea728061a4 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
BASE_DIR="${HOME}/Pictures/uploads"
FILENAME=$(ls -1t ${BASE_DIR} | head -n 1)
FULL_PATH="${BASE_DIR}/${FILENAME}"
/usr/local/bin/aws s3 cp ${FULL_PATH} s3://pics.manero.org --acl public-read
URL="http://pics.manero.org/${FILENAME}"
echo ${URL} | xclip -in -selection clipboard
notify-send "Screenshot uploaded" ${URL}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment