Skip to content

Instantly share code, notes, and snippets.

@topher1kenobe
Created October 11, 2022 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save topher1kenobe/73053b393cad123510e1bbbecf1b4457 to your computer and use it in GitHub Desktop.
Save topher1kenobe/73053b393cad123510e1bbbecf1b4457 to your computer and use it in GitHub Desktop.
take a screenshot, ssh it someplace
#!/bin/bash
/opt/homebrew/bin/ffmpeg -ss 0.5 -f avfoundation -r 30.000030 -i "0" -t 1 /Users/topher/window_shots/"grmi_$(date +%F_%H-%M-%S).jpg" -frames:v 1
unset -v latest
for file in /Users/topher/window_shots/*; do
[[ $file -nt $latest ]] && latest=$file
done
keychain --noask --eval id_dsa
scp $latest cat:~/www/example.com/public_html/window_shot.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment