<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: apple code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sat, 26 Jul 2008 18:01:04 GMT</pubDate>
    <description>DZone Snippets: apple code</description>
    <item>
      <title>Repair Spy</title>
      <link>http://snippets.dzone.com/posts/show/3586</link>
      <description>Takes a screenshot and a webcam snapshot and emails them to flickr. Requires &lt;a href="http://www.intergalactic.de/hacks.html"&gt;isightcapture&lt;/a&gt;. Hacked up to spy on the Apple repair team as they try to repair my Mac Book Pro's backlight for the second time.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;# requires isightcapture http://www.intergalactic.de/hacks.html&lt;br /&gt;&lt;br /&gt;# path to save the images&lt;br /&gt;PATH=/Users/default/&lt;br /&gt;&lt;br /&gt;# flickr email address&lt;br /&gt;EMAIL="yourflickremail+private@photos.flickr.com"&lt;br /&gt;&lt;br /&gt;# tags to attach to each picture uploaded&lt;br /&gt;TAGS="repair_spy"&lt;br /&gt;&lt;br /&gt;TIMESTAMP=`/bin/date "+%y%m%d%H%M%S"`&lt;br /&gt;FRIENDLY_TIMESTAMP=`/bin/date "+%Y/%m/%d %H:%M"`&lt;br /&gt;&lt;br /&gt;#take pics&lt;br /&gt;/usr/sbin/screencapture -mxC $PATHscreen_$TIMESTAMP.png&lt;br /&gt;/usr/local/bin/isightcapture -t png $PATHisight_$TIMESTAMP.png&lt;br /&gt;&lt;br /&gt;#post to flickr&lt;br /&gt;/usr/bin/uuencode $PATHscreen_$TIMESTAMP.png $PATHscreen_$TIMESTAMP.png | /usr/bin/mail -s "Repair Spy Screenshot - $FRIENDLY_TIMESTAMP tags: $TAGS" $EMAIL&lt;br /&gt;/usr/bin/uuencode $PATHisight_$TIMESTAMP.png $PATHisight_$TIMESTAMP.png | /usr/bin/mail -s "Repair Spy iSight Cature - $FRIENDLY_TIMESTAMP tags: $TAGS" $EMAIL&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Toss this in your crontab like so, making sure to run it as the user that you provide to the Apple Techs&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;*/1    *       *       *       *       default /Users/default/repair_spy &gt;&amp; /dev/null&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 26 Feb 2007 16:38:54 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3586</guid>
      <author>jnewland (Jesse Newland)</author>
    </item>
  </channel>
</rss>
