Skip to content

Instantly share code, notes, and snippets.

@benwyrosdick
Created March 11, 2010 04:43
Show Gist options
  • Save benwyrosdick/328831 to your computer and use it in GitHub Desktop.
Save benwyrosdick/328831 to your computer and use it in GitHub Desktop.
Take a snapshot with iSight and upload it to twitter as you profile picture
#!/bin/sh
#
# download isightcapture at link below
# http://www.intergalactic.de/pages/iSight_files/isightcapture1_1.dmg
isightcapture -t png /tmp/capture.png
curl -u user:pass -H 'Expect:' -F image=@'/tmp/capture.png;type=image/png' http://api.twitter.com/1/account/update_profile_image.xml > /dev/null
echo "Profile Pic Updated"
#!/bin/sh
#
# Use this version when running as a cron job. First make an applescript to capture snapshot.
# Paste the following line in a new AppleScript file
#
# do shell script "/path/to/isightcapture -t png /tmp/capture.png"
#
# then save as application to /Applications/Snapshot
#
# download isightcapture at link below
# http://www.intergalactic.de/pages/iSight_files/isightcapture1_1.dmg
open -gW /Applications/Snapshot.app
curl -u user:pass -H 'Expect:' -F image=@'/tmp/capture.png;type=image/png' http://api.twitter.com/1/account/update_profile_image.xml > /dev/null
echo "Profile Pic Updated"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment