Skip to content

Instantly share code, notes, and snippets.

@cddr
Created April 7, 2014 17:08
Show Gist options
  • Save cddr/10024258 to your computer and use it in GitHub Desktop.
Save cddr/10024258 to your computer and use it in GitHub Desktop.
Infinite selfie power
# Lets thank Arnold for the headphones!
#
# Next time you're doing coding hours, get your headphones on and
# run this script in a terminal.
#
# Usage:
#
# 1. Download imagesnap from here: https://github.com/rharder/imagesnap
# 2. Update the global variables below according to where you put imagesnap
# and where you'd like the images to show up
# 3. We'll figure out how to assemble them later
OUTPUT=~/Pictures/coding-hours
IMAGESNAP_EXE=~/dev/imagesnap/imagesnap
DELAY=300
mkdir -p $OUTPUT
function start {
while true;
do
$IMAGESNAP_EXE $OUTPUT/$(date +'%s').jpg
sleep $DELAY
done
}
echo "Starting selfied: Will take a photo every $DELAY seconds"
start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment