Skip to content

Instantly share code, notes, and snippets.

@schacon
Forked from maddox/showme
Created February 17, 2011 18:26
Show Gist options
  • Select an option

  • Save schacon/832317 to your computer and use it in GitHub Desktop.

Select an option

Save schacon/832317 to your computer and use it in GitHub Desktop.

Revisions

  1. schacon revised this gist Feb 17, 2011. 1 changed file with 18 additions and 10 deletions.
    28 changes: 18 additions & 10 deletions showme
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/sh
    #!/usr/bin/env ruby
    #
    # SHOW ME
    # Takes 2 pictures of you via your iSight, animates them, uploads them to CloudApp, and puts
    # Takes X pictures of you via your iSight, animates them, uploads them to CloudApp, and puts
    # the url in your clipboard
    #
    # This uses a bunch of projects to make the magic happen, mostly thanks
    @@ -20,16 +20,24 @@
    # isightcapture - http://www.intergalactic.de/pages/iSight.html
    # download isightcapture and put it in your path
    #
    # Now you can take 2 shots from your iSight and push them to the clowd
    # Now you can take X shots from your iSight and push them to the clowd
    #
    # Ex: $ showme

    printf "\a"
    echo "\nPREPARE FOR FIRST SHOT"
    isightcapture /tmp/isightcapture-1.jpg > /dev/null
    shots = ARGV[0].to_i
    exit if !shots

    printf "\a"
    echo "\nPREPARE FOR SECOND SHOT"
    isightcapture /tmp/isightcapture-2.jpg > /dev/null
    puts "Taking #{shots} shots.."

    gifme /tmp/isightcapture-1.jpg /tmp/isightcapture-2.jpg
    output = []

    1.upto(shots) do |shot|
    puts "\nPREPARE FOR SHOT #{shot}"
    filenm = "/tmp/isightcap-#{shot}.jpg"
    `isightcapture #{filenm} > /dev/null`
    output << filenm
    end

    files = output.join(' ')
    puts files
    puts `gifme #{files}`
  2. @maddox maddox revised this gist Feb 17, 2011. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions showme
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,8 @@
    # Takes 2 pictures of you via your iSight, animates them, uploads them to CloudApp, and puts
    # the url in your clipboard
    #
    # This uses a bunch of projects to make the magic happen, mostley thanks to Zach Holman: https://github.com/holman
    # This uses a bunch of projects to make the magic happen, mostly thanks
    # to Zach Holman: https://github.com/holman
    #
    #
    # required software:
    @@ -19,7 +20,7 @@
    # isightcapture - http://www.intergalactic.de/pages/iSight.html
    # download isightcapture and put it in your path
    #
    # Now you can take 2 snaps from your sight and push them to the clowd
    # Now you can take 2 shots from your iSight and push them to the clowd
    #
    # Ex: $ showme

  3. @maddox maddox created this gist Feb 17, 2011.
    34 changes: 34 additions & 0 deletions showme
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    #!/bin/sh
    #
    # SHOW ME
    # Takes 2 pictures of you via your iSight, animates them, uploads them to CloudApp, and puts
    # the url in your clipboard
    #
    # This uses a bunch of projects to make the magic happen, mostley thanks to Zach Holman: https://github.com/holman
    #
    #
    # required software:
    #
    # ImageMagick
    # CloudApp - http://www.getcloudapp.com/
    # cloudapp script: https://github.com/holman/dotfiles/blob/master/bin/cloudapp
    # gifme script: https://github.com/holman/dotfiles/blob/master/bin/gifme
    #
    # Make sure each of those are set up correctly
    #
    # isightcapture - http://www.intergalactic.de/pages/iSight.html
    # download isightcapture and put it in your path
    #
    # Now you can take 2 snaps from your sight and push them to the clowd
    #
    # Ex: $ showme

    printf "\a"
    echo "\nPREPARE FOR FIRST SHOT"
    isightcapture /tmp/isightcapture-1.jpg > /dev/null

    printf "\a"
    echo "\nPREPARE FOR SECOND SHOT"
    isightcapture /tmp/isightcapture-2.jpg > /dev/null

    gifme /tmp/isightcapture-1.jpg /tmp/isightcapture-2.jpg