<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Robert Harder</title>
	<atom:link href="http://blog.iharder.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.iharder.net</link>
	<description>PhD Student</description>
	<lastBuildDate>Wed, 01 Sep 2010 20:44:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>iMovie HD Available Here</title>
		<link>http://blog.iharder.net/2010/08/17/imovie-hd-available-here/</link>
		<comments>http://blog.iharder.net/2010/08/17/imovie-hd-available-here/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 18:19:14 +0000</pubDate>
		<dc:creator>Robert Harder</dc:creator>
				<category><![CDATA[Utility]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[quicktime]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.iharder.net/?p=477</guid>
		<description><![CDATA[The last good version of Apple&#8217;s iMovie was version 6, later called iMovie HD. At least that&#8217;s my opinion, and it&#8217;s shared by a few others. The later versions became more of a video manager (and not a good one), and a very rudimentary editor (and not a good one). Realizing, but not admitting, how [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.iharder.net/wp-content/uploads/2010/08/imoviehd.png"><img class="alignright size-full wp-image-479" title="iMovie HD Icon" src="http://blog.iharder.net/wp-content/uploads/2010/08/imoviehd.png" alt="" width="128" height="128" /></a>The last good version of Apple&#8217;s iMovie was version 6, later called iMovie HD. At least that&#8217;s my opinion, and it&#8217;s <a href="http://www.podcastingnews.com/2007/08/09/imovie-08/">shared</a> <a href="http://forums.macrumors.com/showthread.php?t=659773">by</a> <a href="http://answers.yahoo.com/question/index?qid=20090612112400AA4EDtI">a</a> <a href="http://www.youtube.com/watch?v=K1Y_os9qdSk">few</a> <a href="http://www.viddler.com/explore/sandieman/videos/295/">others</a>. The later versions became more of a video manager (and not a good one), and a very rudimentary editor (and not a good one).</p>
<p>Realizing, but not admitting, how much people hated the new iMovie, there was a period when <a href="http://arstechnica.com/apple/news/2007/08/apple-makes-imovie-hd-6-available-for-download.ars">Apple would let you download</a> the previous and now-abandoned iMovie HD, but it is no longer available from Apple, even on their <a href="http://www.info.apple.com/support/oldersoftwarelist.html">Old Software List</a>, so until I&#8217;m given a Take Down notice, I&#8217;m putting iMovie HD up for grabs here. Of course you&#8217;re trusting that I haven&#8217;t embedded some kind of nasty malware or anything, which I haven&#8217;t.</p>
<p>In the disk image is the &#8220;iMovie HD.app&#8221; application which you&#8217;ll drag to your <tt>/Applications</tt> folder and an &#8220;iMovie&#8221; folder which you&#8217;ll drag to your <tt>/Library/Application Support</tt> folder. Enjoy.</p>
<div style="text-align:center"><a href="http://blog.iharder.net/wp-content/uploads/2010/08/iMovie-HD-6.dmg"><img class="aligncenter size-full wp-image-481" title="Download iMovie HD" src="http://blog.iharder.net/wp-content/uploads/2010/08/Screen-shot-2010-08-17-at-11.04.49-AM.png" alt="Download iMovie HD" border="0" width="300" height="184" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.iharder.net/2010/08/17/imovie-hd-available-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run SpinRite on a Mac</title>
		<link>http://blog.iharder.net/2010/07/29/spinrite-run-spinrite-on-a-mac/</link>
		<comments>http://blog.iharder.net/2010/07/29/spinrite-run-spinrite-on-a-mac/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 21:56:46 +0000</pubDate>
		<dc:creator>Robert Harder</dc:creator>
				<category><![CDATA[Utility]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[spinrite]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://blog.iharder.net/?p=443</guid>
		<description><![CDATA[Yes, I succeeded in running SpinRite 6 on an Intel Mac! Here&#8217;s a screenshot: Here&#8217;s a video: You might notice that it&#8217;s horribly slow: about 1MB/sec if there are no errors. This makes it pretty much useless unfortunately. I&#8217;m just not that patient. How It Is Done Here are the key components for making this [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, I succeeded in running <a href="http://spinrite.info">SpinRite 6</a> on an Intel Mac!</p>
<p>Here&#8217;s a screenshot:</p>
<p style="text-align: center;">
<a href="http://blog.iharder.net/wp-content/uploads/2010/07/spinrite-on-a-mac-sm.jpg"><img class="aligncenter size-full wp-image-444" title="SpinRite on a Mac" src="http://blog.iharder.net/wp-content/uploads/2010/07/spinrite-on-a-mac-sm.jpg" alt="" width="368" height="230" /></a></p>
<p><span id="more-443"></span></p>
<p>Here&#8217;s a video:</p>
<p><object width="440" height="345"><param name="movie" value="http://www.youtube.com/v/rcruTes2YaA&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/rcruTes2YaA&amp;hl=en_US&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="440" height="345"></embed></object></p>
<p>You might notice that it&#8217;s horribly slow: about 1MB/sec if there are no errors. This makes it pretty much useless unfortunately. I&#8217;m just not that patient.</p>
<h2>How It Is Done</h2>
<p>Here are the key components for making this work:</p>
<ul>
<li>Booting from another hard drive.</li>
<li>Installing <a href="http://www.virtualbox.org/">VirtualBox</a>.</li>
<li>Setting up VirtualBox to <a href="http://www.virtualbox.org/manual/ch09.html#rawdisk">point to your raw disk drive</a>.</li>
</ul>
<p>Until recently I had no way to do the raw disk access in a virtualization tool. VM Fusion v2 didn&#8217;t support it (don&#8217;t know about the current version). Sun (now Oracle) VirtualBox didn&#8217;t support it, but starting with v1.4, it does.</p>
<h3>Step 1: Boot from another hard drive</h3>
<p><a href="http://blog.iharder.net/wp-content/uploads/2010/07/Hard-Drive.jpg"><img src="http://blog.iharder.net/wp-content/uploads/2010/07/Hard-Drive-150x150.jpg" alt="" title="Hard Drive" width="150" height="150" class="alignright size-thumbnail wp-image-452" /></a>This isn&#8217;t a small step. Get an external hard drive, a cheap one will do. If you have a spare, bare hard drive lying around, get an enclosure for it (I got some 2.5&#8243; laptop HD enclosures for $7 each, shipped, on eBay).</p>
<p>You&#8217;ll either have to install Mac OS X on the hard drive directly or use something like <a href="http://www.bombich.com/">Carbon Copy Cloner</a> to copy your installation over. There are instructions for this sort of thing around the net.</p>
<p>Restart your Mac and hold down the Option key. That will present you with a choice of bootable volumes (like <a href="http://www.gnu.org/software/grub/">grub</a>, for the geeks out there). Select your external drive.</p>
<h3>Step 2: Install VirtualBox</h3>
<p><a href="http://blog.iharder.net/wp-content/uploads/2010/07/www.virtualbox.png"><img src="http://blog.iharder.net/wp-content/uploads/2010/07/www.virtualbox-140x150.png" alt="" title="VirtualBox logo" width="140" height="150" class="alignright size-thumbnail wp-image-456" /></a>VirtualBox is a free tool from Oracle for running other operating systems in a window inside your computer. If you don&#8217;t know about it yet, you might be pleased to learn you can run Windows applications right there on your Mac without having to reboot using Boot Camp.</p>
<p><a href="http://www.virtualbox.org/wiki/Downloads">Download</a> and install VirtualBox.</p>
<h3>Step 3: Set up raw disk access</h3>
<p>The tricky thing here is that instead of having VirtualBox use a file on your hard drive to represent an entire guest operating system&#8217;s hard drive, you actually want it to have raw access to a real drive on your computer (your internal drive, presumably). <a href="http://www.virtualbox.org/manual/ch09.html#rawdisk">Chapter 9</a> of the user&#8217;s manual describes how to do this but leaves one part out. Perhaps we can get that updated.</p>
<p>First we have to know what to call our raw internal drive. From the Terminal enter this command:</p>
<pre>$ <b>diskutil list</b>
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            999.9 GB   disk0s2
... and so on ...
</pre>
<p>That will list all drives attached to your computer. You&#8217;ll have to look at the sizes probably to determine which one is the drive you&#8217;re interested in. It&#8217;s probably <tt>/dev/disk0</tt>.</p>
<p>A quick look at this device reveals that it is owned by root, not you. In the Terminal:</p>
<pre>$ <b>ls -l /dev/disk0</b>
brw-r-----  1 root  operator   14,   0 Jul 17 18:11 /dev/disk0</pre>
<p>You&#8217;ll have to fix this. I can&#8217;t say that what we&#8217;re about to do is normally a good idea, but presumably we&#8217;re only doing this on our non-production, SpinRite-dedicated, external boot drive. We need to make the device owned by you. In Terminal, and replacing USERNAME with your user account&#8217;s name:</p>
<pre>$ <b>sudo chown USERNAME /dev/disk0</b>
Password:</pre>
<p>You&#8217;ll have to enter your account password.</p>
<p>Now finally we can create a VirtualBox &#8220;disk image&#8221; that actually points to the raw device. All of the following lines should be on one line; I&#8217;ve broken them up for easier reading.</p>
<pre>$ <b>VBoxManage internalcommands createrawvmdk
  -filename /full/not/relative/path/to/file.vmdk
  -rawdisk /dev/disk0
  -register</pre>
<h3>Step 4: Create a VirtualBox virtual machine</h3>
<p>Now in VirtualBox you&#8217;ll go through the normal process of creating a virtual machine, but instead of creating a new virtual hard drive, you&#8217;ll select &#8220;Existing VMDK&#8221; and point to the VMDK file you just created.</p>
<p>You&#8217;ll get a SpinRite ISO image, which presumably you made on a Windows machine when you downloaded SpinRite, and mount that in the virtual machine as well, and when you start the virtual machine, Voila! You have SpinRite running and accessing your Mac HD. Slowly.</p>
<h2>Why Is This Necessary?</h2>
<p>This is painful. Why can&#8217;t you just pop in the SpinRite CD and boot your Mac? You can. Your Mac will boot the SpinRite CD and take you to the title screen where you&#8217;ll sit. And sit. And sit. Forever. Because although the CD boots, the software cannot read your keyboard inputs. Ack!</p>
<p>Who&#8217;s fault is this? Well, that&#8217;s not really the right question. Here is a slightly rough, slightly inaccurate, but generally helpful description of the problem. SpinRite works at a very low level without any operating system support to speak of (except a bit from <a href="http://www.freedos.org/">FreeDOS</a>). To read your keyboard inputs, SpinRite has to monitor actual hardware interrupts, and although these have been the same on PC BIOSes for years, Macs use the newer EFI firmware, and the mappings are different. Thus no keyboard. </p>
<p>Judging from his comments on the <a href="http://twit.tv/sn">Security Now podcast</a>, SpinRite creator Steve Gibson has no plans to update SpinRite, and indeed updating it to account for a new BIOS is no small task. We could perhaps ask him on his <a href="http://www.grc.com/feedback.htm">feedback page</a> to consider making a slight update to SpinRite which would create a SpinRite CD that automatically selected Drive Maintenance on all attached drives and began working without any user input. That way regular maintenance runs that generally don&#8217;t require any intervention could run, and if there was a more serious problem, well, then we&#8217;re simply back to square one.</p>
<p><a href="http://www.grc.com/feedback.htm">Yes, ask him</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iharder.net/2010/07/29/spinrite-run-spinrite-on-a-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Keep Your Radio On When You Start Your Car</title>
		<link>http://blog.iharder.net/2010/07/29/radio-how-to-keep-your-radio-on-when-you-start-your-car/</link>
		<comments>http://blog.iharder.net/2010/07/29/radio-how-to-keep-your-radio-on-when-you-start-your-car/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 20:53:03 +0000</pubDate>
		<dc:creator>Robert Harder</dc:creator>
				<category><![CDATA[Utility]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[tinker]]></category>

		<guid isPermaLink="false">http://blog.iharder.net/?p=421</guid>
		<description><![CDATA[Our car radio has the annoying habit of forgetting what part of a CD it was playing when you turn it off. On long drives this is a real drag; I&#8217;ll leave an audio book playing for my family in the car while I gas up, and when I turn the key from Accessory to [...]]]></description>
			<content:encoded><![CDATA[<p>Our car radio has the annoying habit of forgetting what part of a CD it was playing when you turn it off. On long drives this is a real drag; I&#8217;ll leave an audio book playing for my family in the car while I gas up, and when I turn the key from Accessory to Start, the radio turns off and back on again.</p>
<p>I built a cheap circuit that keeps the radio powered up five seconds after accessory power is interrupted, and this keeps the radio running while the engine turns over. The three key components for this circuit are a diode, a capacitor and a relay.</p>
<h2>Schematic</h2>
<p>Here&#8217;s a simple schematic of the circuit. From the car&#8217;s accessory power, we connect a diode, and from the diode we connect a capacitor and a relay. When the car&#8217;s accessory power is turned on, the capacitor is charged, and the relay is activated (the switch closes). Thus the radio has power. When the accessory power is interrupted, the capacitor continues to power the relay until the capacitor has drained enough that it cannot keep the relay activated. The diode keeps the capacitor&#8217;s energy from leaking back into the car&#8217;s circuitry.</p>
<p><a href="http://blog.iharder.net/wp-content/uploads/2010/03/Car-ACC-Delayed-Power.png"><img class="aligncenter size-full wp-image-432" title="Car ACC Delayed Power Schematic" src="http://blog.iharder.net/wp-content/uploads/2010/03/Car-ACC-Delayed-Power.png" alt="" width="430" height="223" /></a></p>
<p>I should point out that you&#8217;ll want fuses in relevant places. I left them out of the schematic for the sake of making the pertinent parts more clear.</p>
<p><span id="more-421"></span></p>
<h2>Parts</h2>
<p>Someone smarter than I could probably calculate exactly what capacitor size and relay specs you&#8217;d want to hold the relay active for so much time, but I just experimented. I found that I needed a solid state relay because the mechanical, electromagnetic kind drained the capacitor too quickly. Even among the solid state relays I tested, some drained the capacitor faster than others.</p>
<ul>
<li>Diode. I used a simple &#8220;signal&#8221; diode that I had in some old Radio Shack kit.</li>
<li>Capacitor. I think it was 35V, 1000 micro farad.</li>
<li>Solid State Relay. This one is a mystery. It says &#8220;Daytronic solid state relay model 9398,&#8221; but I cannot find out anything about it online.</li>
</ul>
<p style="text-align: center;">
<p style="text-align: center;"><a href="http://blog.iharder.net/wp-content/uploads/2010/07/solid_state_relay-sm.jpg"><img class="size-full wp-image-439  aligncenter" title="Daytronic Solid State Relay Model 9398" src="http://blog.iharder.net/wp-content/uploads/2010/07/solid_state_relay-sm.jpg" alt="" width="316" height="288" /></a><br />
Mystery Relay: Daytronic model 9398</p>
<h2>Extensions</h2>
<p>If your relay doesn&#8217;t support enough current, as my 10A relay did not, you can use that relay to power the coil of another, bigger relay. In my case I got a traditional electromagnetic relay with a 70A limit, or something ridiculous like that, to power an amateur radio.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iharder.net/2010/07/29/radio-how-to-keep-your-radio-on-when-you-start-your-car/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Use CrashPlan for Live Offsite Backup</title>
		<link>http://blog.iharder.net/2010/02/19/crashplan-for-live-offsite-backup/</link>
		<comments>http://blog.iharder.net/2010/02/19/crashplan-for-live-offsite-backup/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 17:37:12 +0000</pubDate>
		<dc:creator>Robert Harder</dc:creator>
				<category><![CDATA[Utility]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.iharder.net/?p=385</guid>
		<description><![CDATA[One of my favorite podcasts SecurityNow had an advertiser that offered an online/offsite backup service and after trying Carbonite, Mozy, JungleDisk, and CrashPlan, I ended up settling with CrashPlan as my favorite to back up my Macs. Unfortunately this all happened a few months ago, so I don&#8217;t remember all the details about why I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.iharder.net/wp-content/uploads/2010/02/crashplan.png"><img class="alignright size-full wp-image-391" title="crashplan" src="http://blog.iharder.net/wp-content/uploads/2010/02/crashplan.png" alt="" width="118" height="66" /></a>One of my favorite podcasts <a href="http://www.grc.com/securitynow.htm">SecurityNow</a> had an advertiser that offered an online/offsite backup service and after trying Carbonite, Mozy, JungleDisk, and CrashPlan, I ended up settling with <a href="http://crashplan.com/">CrashPlan</a> as my favorite to back up my Macs.</p>
<p>Unfortunately this all happened a few months ago, so I don&#8217;t remember all the details about why I liked or disliked each of the products, but here are some brief thoughts on each one.<br />
<span id="more-385"></span></p>
<h2>JungleDisk <img style="vertical-align: text-bottom;" title="ThumbsUp" src="http://blog.iharder.net/wp-content/uploads/2010/02/NoThumbsUp.png" alt="" width="24" height="24" /></h2>
<p><a href="http://blog.iharder.net/wp-content/uploads/2010/02/logo_jd_selected.gif"><img class="alignright size-full wp-image-388" title="jungledisk" src="http://blog.iharder.net/wp-content/uploads/2010/02/logo_jd_selected.gif" alt="" width="242" height="42" /></a>I had been using <a href="http://www.jungledisk.com/">JungleDisk</a> for a year or so, and I liked that I could be confident that my data was being encrypted on my end and that no one else could decrypt the data. The security was my number one concern.</p>
<p>I didn&#8217;t particularly like the way the tool integrated into my life, but that&#8217;s a preference thing. You may like it just fine. JungleDisk essentially makes available to you a network disk that mirrors whatever you&#8217;ve specified that you want to back up. I did find it convenient when I was on my laptop and wanted to retrieve something from my desktop—I could just retrieve it from the network disk.</p>
<p>JungleDisk the software only cost me $20, but it uses Amazon S3 for the backend storage, so my monthly bill came from Amazon. Eventually it just got too expensive for me. My backups grew to 30GB then 50GB then 80GB, and I could see I would want more backed up in the future. The monthly bill was growing to $20. That&#8217;s when I decided to look elsewhere.</p>
<h2>Carbonite <img style="vertical-align: text-bottom;" title="ThumbsDown" src="http://blog.iharder.net/wp-content/uploads/2010/02/NoThumbsDown.png" alt="" width="24" height="24" /></h2>
<p><a href="http://blog.iharder.net/wp-content/uploads/2010/02/logo_main1.gif"><img class="alignright size-full wp-image-389" title="carbonite" src="http://blog.iharder.net/wp-content/uploads/2010/02/logo_main1.gif" alt="" width="259" height="54" /></a>Because <a href="http://www.carbonite.com/">Carbonite</a> was an advertiser on the podcast, I learned that they offered unlimited backup space for about $5 per month, or so they claimed. I checked out Carbonite. It makes me feel dirty. Everything about their business feels creepy to me, and ultimately they were disqualified because I was not satisfied with their encryption technique which, as I recall, involves them having the ability to decrypt my files.</p>
<h2>Mozy <img style="vertical-align: text-bottom;" title="ThumbsDown" src="http://blog.iharder.net/wp-content/uploads/2010/02/NoThumbsDown.png" alt="" width="24" height="24" /></h2>
<p><a href="http://blog.iharder.net/wp-content/uploads/2010/02/Mozy_logo.png"><img class="alignright size-full wp-image-390" title="mozy" src="http://blog.iharder.net/wp-content/uploads/2010/02/Mozy_logo.png" alt="" width="174" height="47" /></a>I had high hopes for <a href="http://mozy.com/">Mozy</a>, because people seemed to think it was Mac-like. Ha. Mozy was OK, but restoring files was a pain, and again I did not trust their encryption techniques.</p>
<h2>CrashPlan <img style="vertical-align: text-bottom;" title="ThumbsUp" src="http://blog.iharder.net/wp-content/uploads/2010/02/NoThumbsUp.png" alt="" width="24" height="24" /></h2>
<p><a href="http://blog.iharder.net/wp-content/uploads/2010/02/crashplan.png"><img class="alignright size-full wp-image-391" title="crashplan" src="http://blog.iharder.net/wp-content/uploads/2010/02/crashplan.png" alt="" width="196" height="110" /></a>Somehow I stumbled onto <a href="http://crashplan.com/">CrashPlan</a>, which doesn&#8217;t seem to be mentioned as often as Mozy and Carbonite. I use it on several of my computers, and I am paying for the family plan (all my computers, unlimited storage) for about $100 per year. Some things I like about CrashPlan:</p>
<ul>
<li>You can use it for free to back up to your own external drives, other computers, etc, so if you don&#8217;t want to pay for online storage, you can still use it as a nice backup solution locally. Near as I can tell, you could also install this on a friend&#8217;s (or your parents&#8217;) computer and have them backup to your computer for free remotely, if you&#8217;re willing to spare some hard drive space. You could have an arrangement with a friend so that each of you backs up each others&#8217; data (encrypted, of course), so as long as your houses don&#8217;t both burn down simultaneously, you should be OK.</li>
<li>You can encrypt your data locally with locally-controlled keys that cannot be decrypted by anyone else. You have the option to choose to have the keys stored with CrashPlan so that if you forget your password, you can still access your data, but that&#8217;s not what I wanted. How nice of them to offer both services.</li>
<li>Truly unlimited backup space. I found people on various forums complaining with all these services (except JungleDisk/Amazon S3) that &#8220;unlimited&#8221; really meant 50GB or so, but CrashPlan&#8217;s stance is unequivocally, &#8220;Unlimited means Unlimited,&#8221; and I appreciate that.</li>
<li>Easy interface, easy restore.</li>
</ul>
<h2>Conclusion</h2>
<p>That was my adventure, trying all these backup plans. I now use my Macs&#8217; built-in TimeMachine backup for local backup and recovering accidentally-deleted files, and I use CrashPlan to backup offsite.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iharder.net/2010/02/19/crashplan-for-live-offsite-backup/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Command Line Capture of Web Pages to PDF, PNG, SVG, etc</title>
		<link>http://blog.iharder.net/2010/01/05/command-line-capture-of-web-pages-to-pdf-png-svg-etc/</link>
		<comments>http://blog.iharder.net/2010/01/05/command-line-capture-of-web-pages-to-pdf-png-svg-etc/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 22:35:59 +0000</pubDate>
		<dc:creator>Robert Harder</dc:creator>
				<category><![CDATA[Utility]]></category>

		<guid isPermaLink="false">http://blog.iharder.net/?p=360</guid>
		<description><![CDATA[If you&#8217;re on a Mac, you probably know that in any application that prints, you can &#8220;print&#8221; to a PDF file &#8212; handy to be sure &#8212; but from the command line, it&#8217;s not so easy. Enter CutyCapt, a cross-platform tool that lets you capture web pages in a variety of formats including SVG, PDF, [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re on a Mac, you probably know that in any application that prints, you can &#8220;print&#8221; to a PDF file &#8212; handy to be sure &#8212; but from the command line, it&#8217;s not so easy. Enter <a href="http://cutycapt.sourceforge.net/">CutyCapt</a>, a cross-platform tool that lets you capture web pages in a variety of formats including SVG, PDF, PS, PNG, JPEG, TIFF, GIF, and BMP using WebKit as the rendering engine.<br />
<span id="more-360"></span><br />
A windows executable is provided on the website, so I had to download the source and compile it. I won&#8217;t be talking about the compilation process here. You can compile it yourself, if you don&#8217;t trust what I&#8217;m about to offer you, or you can download the file from me. I won&#8217;t be offended if you compile it yourself.</p>
<h2>Download</h2>
<p>Here is what I compiled. I have not packaged it as a PKG file. You&#8217;ll get a generic-looking application (.app) and a symbolic link pointing to the executable within the application. I recommend copying both files to /usr/local/bin, if that is in your PATH, or somewhere else that is accessible.</p>
<p style="font-size: larger; text-align: center;"><a href="http://blog.iharder.net/wp-content/uploads/2010/01/CutyCapt.zip">Download CutyCapt.zip</a></p>
<h2>Usage</h2>
<p>Running CutyCapt without arguments gives us the following options:</p>
<pre>-----------------------------------------------------------------------------
Usage: CutyCapt --url=http://www.example.org/ --out=localfile.png
-----------------------------------------------------------------------------
 --help                         Print this help page and exit
 --url=&lt;url&gt;                    The URL to capture (http:...|file:...|...)
 --out=&lt;path&gt;                   The target file (.png|pdf|ps|svg|jpeg|...)
 --out-format=&lt;f&gt;               Like extension in --out, overrides heuristic
 --min-width=&lt;int&gt;              Minimal width for the image (default: 800)
 --max-wait=&lt;ms&gt;                Don't wait more than (default: 90000, inf: 0)
 --delay=&lt;ms&gt;                   After successful load, wait (default: 0)
 --user-styles=&lt;url&gt;            Location of user style sheet, if any
 --header=&lt;name&gt;:&lt;value&gt;        request header; repeatable; some can't be set
 --method=&lt;get|post|put&gt;        Specifies the request method (default: get)
 --body-string=&lt;string&gt;         Unencoded request body (default: none)
 --body-base64=&lt;base64&gt;         Base64-encoded request body (default: none)
 --app-name=&lt;name&gt;              appName used in User-Agent; default is none
 --app-version=&lt;version&gt;        appVers used in User-Agent; default is none
 --user-agent=&lt;string&gt;          Override the User-Agent header Qt would set
 --javascript=&lt;on|off&gt;          JavaScript execution (default: on)
 --java=&lt;on|off&gt;                Java execution (default: unknown)
 --plugins=&lt;on|off&gt;             Plugin execution (default: unknown)
 --private-browsing=&lt;on|off&gt;    Private browsing (default: unknown)
 --auto-load-images=&lt;on|off&gt;    Automatic image loading (default: on)
 --js-can-open-windows=&lt;on|off&gt; Script can open windows? (default: unknown)
 --js-can-access-clipboard=&lt;on|off&gt; Script clipboard privs (default: unknown)
-----------------------------------------------------------------------------
 &lt;f&gt; is svg,ps,pdf,itext,html,rtree,png,jpeg,mng,tiff,gif,bmp,ppm,xbm,xpm
-----------------------------------------------------------------------------
http://cutycapt.sf.net - (c) 2003-2008 Bjoern Hoehrmann - bjoern@hoehrmann.de</pre>
<p>Based on the example provided, try a simple test:</p>
<pre>$ CutyCapt --url=http://blog.iharder.net --out=blog.png</pre>
<p>I get a nice <strong>long</strong> capture of my blog as a PNG file.</p>
<p><a href="http://blog.iharder.net/wp-content/uploads/2010/01/blog.png"><img class="aligncenter size-full wp-image-374" title="Blog page capture" src="http://blog.iharder.net/wp-content/uploads/2010/01/blog.png" alt="" width="50" height="272" /></a></p>
<p>The program does not seem to work if you use a tilde (~) in the path to represent your home folder.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iharder.net/2010/01/05/command-line-capture-of-web-pages-to-pdf-png-svg-etc/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Jam Resistant Communication Without a Shared Key</title>
		<link>http://blog.iharder.net/2009/12/07/bbc-jam-resistant-communication-without-a-shared-key/</link>
		<comments>http://blog.iharder.net/2009/12/07/bbc-jam-resistant-communication-without-a-shared-key/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 19:42:52 +0000</pubDate>
		<dc:creator>Robert Harder</dc:creator>
				<category><![CDATA[Utility]]></category>
		<category><![CDATA[bbc]]></category>
		<category><![CDATA[codes]]></category>
		<category><![CDATA[jamming]]></category>
		<category><![CDATA[radio]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.iharder.net/?p=317</guid>
		<description><![CDATA[Some US Air Force Academy (USAFA) and National Security Agency (NSA) smart guys (Baird, Bahn, and Collins &#8211; BBC) have come up with a way to achieve the kind of jam resistance that shared keys provide (like spread spectrum) but without the need for a shared key. For the crypto guys out there, this would [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.iharder.net/wp-content/uploads/2009/12/bbctree.png"><img class="alignright size-full wp-image-355" title="BBC Decoding Tree" src="http://blog.iharder.net/wp-content/uploads/2009/12/bbctree.png" alt="BBC Decoding Tree" width="224" height="228" /></a>Some <a href="http://www.usafa.edu/df/dfcs/">US Air Force Academy</a> (USAFA) and <a href="http://www.nsa.gov/">National Security Agency</a> (NSA) smart guys (<a href="http://www.leemon.com/">Baird</a>, <a href="http://www.ee-ed.com/bbc/">Bahn</a>, and Collins &#8211; BBC) have come up with a way to achieve the kind of jam resistance that shared keys provide (like spread spectrum) but without the need for a shared key. For the crypto guys out there, this would be analogous to what the Diffie-Hellman key exchange brought to the world of symmetric cryptography. In fact one would probably use such a key exchange over BBC and then revert to traditional jam-resistant communication techniques, just as we do with asymmetric/symmetric crypto. Their ideas extend beyond jam resistance, but that&#8217;s what we&#8217;ll look at here.</p>
<p><span id="more-317"></span>Of course they explain it better than I in two papers and an applet I copied here:</p>
<ul>
<li><a href="http://blog.iharder.net/wp-content/uploads/2009/12/Baird-Jam-Resistant-Communication-Without-Shared-Secrets.pdf">Jam-Resistant Communication Without Shared Secrets Through the Use of Concurrent Codes</a>, Baird, Bahn, Collins.</li>
<li><a href="http://blog.iharder.net/wp-content/uploads/2009/12/Schweitzer-Visually-Understanding-Jam-Resistant-Communication.pdf">Visually Understanding Jam Resistant Communication</a>, Schweitzer, Baird, Bahn</li>
<li><a href="#applet">Visualization Applet further down this page</a></li>
</ul>
<p>Baird has over a dozen papers published on the subject on <a href="http://leemon.com/papers/">his website</a>.</p>
<p>First let&#8217;s understand the kind of attack we&#8217;re fighting. To fight jamming, you want to make your enemy work so hard or expend so many resources that the jamming is ineffective when on or not cost effective to even turn on. We cannot pretend to achieve &#8220;jam proof.&#8221;</p>
<p>Radio jamming adds energy to the spectrum, so a successful jamming adds energy at the specific frequencies that we are trying to read or at the specific moments in time we want to read them. With spread spectrum communication, as one example, successful jamming would require energy to be poured into many, many frequencies on the hope that the particular frequencies specified in the shared key will be covered. This is expensive for a jammer.</p>
<p>Note that a jammer cannot remove energy from the spectrum. This is an additive process, and this will be important.</p>
<h2>Encoding</h2>
<p>To encode a message, we step through the message, hashing each successively-longer piece, and we use the hash value to &#8220;place&#8221; energy in the spectrum. (You can use a time-based pulse method as easily). We scale the hash function (like a modulus operator) to an appropriate width (not discussed here).</p>
<p>Say we&#8217;re passing the (ridiculously-short) four-bit message 1011. We&#8217;ll arbitrarily set our hash width to 50. The hash value  of 1, I&#8217;m making this up, is h(1) = 37. We continue through the message as well as some padding bits on the end which are analogous to a checksum.</p>
<p>h(1) = 37<br />
h(10) = 8<br />
h(101) = 44<br />
h(1011) = 23<br />
h(10110) = 9<br />
h(101100) = 17</p>
<p>We now have an encoded message that will have peaks at the points 8, 9, 17, 23, 37, and 44. Again this could be frequencies, timed pulses, etc. depending on your radio setup.</p>
<p>A jammer comes along but doesn&#8217;t have the energy to jam everything, so he jams points 1-5, 20-29, and 40-49 (for ease of illustration) by turning those points &#8220;on.&#8221;</p>
<h2>Decoding</h2>
<p>The listening end cannot distinguish between the original message and the jamming and so receives &#8220;on&#8221; energy at the points 1-5, 8, 9, 17, 20-29, 37, and 40-49.</p>
<p>We know a message must start with either a zero or a one, so the receiver hashes zero and one to see if their values appear in the received &#8220;on&#8221; list.</p>
<p>h(1) = 37 ON THE LIST<br />
h(0) = 11 NOT ON THE LIST</p>
<p>So far we know the message begins with a one. The second bit must be zero or one.</p>
<p>h(10) = 8 ON THE LIST<br />
h(11) = 28 ON THE LIST</p>
<p>Hmm, both 10 and 11 may be valid messages. We&#8217;ll continue our tree (imagine a tree) and consider adding a zero and one to both 10 and 11. At the end of the four-bit message we know that we add two zeroes, so messages that end with ones can be discarded.</p>
<p>With appropriately chosen hash widths, message lengths, and padding, we&#8217;ve successfully decoded the message, despite the jamming, and we&#8217;ve discovered that we can actually have multiple valid messages overlapping (protection against a sort of &#8220;friendly&#8221; jamming).</p>
<h2><a name="applet"></a>Visualization Applet</h2>
<ol>
<li>Type a short message in the Message box and hit Return.</li>
<li>See the Decoded Message at the bottom.</li>
<li>&#8220;Jam&#8221; the communication channel by drawing all over the message.</li>
<li>See how you can cover up to half the message before the message is degraded.</li>
</ol>
<div style="height: 650px;"><span style="padding: 0 1em; display: inline; position: absolute;"><br />
<applet style="border:double black 4px" width="620" height="600" archive="/wp-content/uploads/2009/12/BBCVis2.jar" code="BBCVisApp" /><br />
</span></div>
<h2>Conclusion</h2>
<p>This new concurrent coding can provide keyless jam resistance. The papers linked above discuss other uses such as for RFID tags and even document searching. Since this is government-developed technology (and it&#8217;s not classified), it is free for use. Go forth and build more secure radios!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iharder.net/2009/12/07/bbc-jam-resistant-communication-without-a-shared-key/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Atlas Shrugged Essay Contest</title>
		<link>http://blog.iharder.net/2009/11/02/atlas-shrugged-essay-contest/</link>
		<comments>http://blog.iharder.net/2009/11/02/atlas-shrugged-essay-contest/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 04:11:57 +0000</pubDate>
		<dc:creator>Robert Harder</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.iharder.net/?p=308</guid>
		<description><![CDATA[Since I&#8217;m a student for a little while again, I posted an essay for this year&#8217;s Atlas Shrugged essay contest. There&#8217;s nothing like writing an essay to really make you feel like a student! [Update: I didn't win. =( ] Atlas Shrugged Essay Topic #2: In Atlas Shrugged, the heroes want to &#8220;make&#8221; money while [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.iharder.net/wp-content/uploads/2009/11/atlasshrugged.jpg"><img class="alignright size-full wp-image-313" title="Atlas Shrugged logo" src="http://blog.iharder.net/wp-content/uploads/2009/11/atlasshrugged.jpg" alt="Atlas Shrugged logo" width="90" height="147" /></a>Since I&#8217;m a student for a little while again, I posted an essay for this year&#8217;s <a href="http://www.aynrand.org/">Atlas Shrugged essay contest</a>. There&#8217;s nothing like writing an essay to really make you feel like a student! [Update: I didn't win. =( ]</p>
<p><span id="more-308"></span></p>
<p><em>Atlas Shrugged Essay Topic #2: In Atlas Shrugged, the heroes want to &#8220;make&#8221; money while the villains want, on the surface at least, to &#8220;have&#8221; money. What is the difference between these two views of money? Explain your answer by reference to actual events in the novel.</em></p>
<p>Distinguishing between &#8220;making&#8221; money and &#8220;having&#8221; money is a key insight highlighted by Ayn Rand, however despite the rational selfishness that the main characters put forward, their view of making money necessarily requires the considerations of other people&#8212;that one person&#8217;s new idea has value only if someone else thinks it has value&#8212;whereas the view of having money pits one man against his neighbor where invariably the only way to have is to take. How ironic that the villains in the book who decry selfish ambition are actually embracing the more selfish of the two views of money.</p>
<p>Making money implies that one can increase wealth by work and mental effort. Strictly speaking this is not making money exactly, and Midas Mulligan even reverts to a gold standard for representing money in the Colorado mountains. In this sense the protagonists actually embrace the &#8220;having&#8221; money point of view, but Hank Rearden acknowledges that it is wealth that is made, and that is the meaning taken here. Gold becomes a means for value exchange enabling wealth to be &#8220;made.&#8221;</p>
<p>With the notion that wealth can be made comes hope, opportunity, and achievement. One can think of what no one has done or of doing something better, and this creates a value difference between what is currently available and what one proposes. Despite the main characters&#8217; insistence that they follow a selfish path, their philosophy depends on other people and how one&#8217;s ideas and actions improve the lives of others. Regarding the desparately-needed new rails for the Rio Norte line, Hank tells Dagny Taggart, &#8220;I intend to make you pay for it,&#8221; and Dagny gladly does.</p>
<p>New ideas may also benefit the creator directly. John Galt explains to Dagny that such innovations give the inventor time, not money, and time can be redeemed to pursue what one desires. In this sense time is a sort of gold standard with oneself. One cannot pay oneself with gold for a new idea, but time&#8212;the ultimate limited resource&#8212;can be &#8220;saved&#8221; by innovation.</p>
<p>The value of a new idea is based on the improvement that it provides another person. It is the recognition of one person&#8217;s achievement by another, but it is not a hollow recognition for the benefit of the creator. It is the acknowledgement of one person&#8217;s genuine contribution to another.  Richard Halley&#8217;s fifth concerto, John Galt&#8217;s motor, even Hugh Akston&#8217;s cooking&#8212;these have value because they improve someone else&#8217;s life, not necessarily that of the creator. Without this understanding, Hank&#8217;s wife Lillian cannot appreciate the significance to the world of the first pouring of Rearden Metal. Instead she offers sarcastically, &#8220;Shall we declare it a national holiday, darling?&#8221;</p>
<p>Allowing individuals to develop their ideas may lead to more good ideas, such as when Hank proposes his new bridge structure to Dagny. She asks if he invented the bridge in the last two days, and he replies, &#8220;I `invented&#8217; it long before I had Rearden Metal. I figured it out while I was making steel for bridges. I wanted a metal with which one would be able to do this, among other things.&#8221; His desire to build a better bridge drove him to invent a better metal.</p>
<p>This view of money provides stability and correction because value can be verified, tempered, adjusted not by a single creator but by the people. In its selfishness, it gives power to the consumers to negotiate their futures and demand something better, but these demands come not in the form of declaring a right but proposing a counter-offer: &#8220;We will pay you more money for something better.&#8221; It respects the creator and creates a lasting relationship among people where respect, not force, is the key ingredient. Everyone benefits, and here the best way to maximize the common good and provide a positive future is to allow individuals to achieve and submit their efforts for peer valuation. In contrast when one views money as something to have, then one must necessarily look around for existing wealth and think of ways to get it, for unless more can be made, the only way to get more of something is to take it.</p>
<p>While it is possible to take money peaceably as with the case of selling goods and services, one might start looking enviously at another person with more money and quickly realize that it is much more efficient to take it by force. One might easily justify it as well, assuming that the person with more money must have in turn gotten it by taking it from someone else.</p>
<p>Without the insight to make money, some characters in the book apply their creativity to inventing ways to take money. Inevitably this leads them to force their ideas on others by law, a common theme among people with this view. Balph Eubanks&#8217;s negative view of humanity convinces him that, &#8220;We ought to place a limit upon their material greed,&#8221; and he suggests that no more than 10,000 copies of a book should be permitted to be sold. James Taggart pushes through the Anti-dog-eat-dog Rule in order to remove the &#8220;destructive competition&#8221; of Dan Conway&#8217;s Phoenix-Durango line. Orren Boyle uses Directive 10-289 and blackmail to force Rearden Metal into the government&#8217;s hands.</p>
<p>Even the fair exchange of money can be warped when one has the wrong view. Consider Hank&#8217;s mother and his brother Philip who decide it is not right that Philip exist only on Hank&#8217;s charity. Her solution is to have Hank give Philip a job instead, &#8220;but a nice clean job, of course, with a desk and an office and a decent salary.&#8221; Hank&#8217;s reply: &#8220;But he knows nothing about the steel business!&#8221;</p>
<p>The two views of making money and having money ultimately affect the value you place on other people. If you believe that you can make money, then you inherently acknowledge that other people have value and that your positive impact on their lives is what makes money, but if you believe that money can only be had, then other people become an impediment to your happiness, and you will seek ways to take from them as the &#8220;looters&#8221; in the book often did.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iharder.net/2009/11/02/atlas-shrugged-essay-contest/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Create Animated GIFs with Mac OS X Preview.app</title>
		<link>http://blog.iharder.net/2009/10/22/gif-create-animated-gifs-with-mac-os-x-preview-app/</link>
		<comments>http://blog.iharder.net/2009/10/22/gif-create-animated-gifs-with-mac-os-x-preview-app/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 17:51:19 +0000</pubDate>
		<dc:creator>Robert Harder</dc:creator>
				<category><![CDATA[Utility]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[gif]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://blog.iharder.net/?p=277</guid>
		<description><![CDATA[If you open an animated GIF in Mac OS X&#8217;s Preview application, the default application for viewing images and PDFs, you may know that you can see individual frames of the animation, but did you know you can also create animated GIFs with Preview? Here&#8217;s how. How To For this example, we will create an [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">If you open an animated GIF in Mac OS X&#8217;s Preview application, the default application for viewing images and PDFs, you may know that you can see individual frames of the animation, but did you know you can also create animated GIFs with Preview? Here&#8217;s how.</p>
<p><a href="http://blog.iharder.net/wp-content/uploads/2009/10/base1.gif"><img src="http://blog.iharder.net/wp-content/uploads/2009/10/base1.gif" alt="All Your Base Are Belong To Us" title="All Your Base Are Belong To Us" width="554" height="282" class="aligncenter size-full wp-image-304" /></a><br />
<span id="more-277"></span></p>
<h2>How To</h2>
<p>For this example, we will create an animated GIF of us typing some text into a text editor. Preview sets the interframe delay to 0.1 seconds, and I have not seen a way to change that. That is a reasonable typing speed for this effect.</p>
<p>Open a text editor such as TextEdit, TextMate, BBEdit, etc. Resize the window so that it&#8217;s a nice, tight size that will look good on a web page.</p>
<p style="text-align: center;"><a href="http://blog.iharder.net/wp-content/uploads/2009/10/1-blank-doc.png"><img class="aligncenter size-full wp-image-285" title="Blank Document" src="http://blog.iharder.net/wp-content/uploads/2009/10/1-blank-doc.png" alt="Blank Document" width="443" height="226" /></a></p>
<p>The first thing you might notice between the screenshot above and the animated GIF at the beginning is that the shadow looks better on this screenshot. That&#8217;s because GIF images can only contain 256 different colors, and that&#8217;s not enough to see the subtle changes in the shadow.</p>
<p>Save this opening shot by typing Command-Shift-4. Release those keys and type Space. Now click on the text editor window. That creates a screen capture of just the window you clicked and saves it to the desktop.</p>
<p>Open that file in Preview. Choose Save As from the File menu. Select GIF as the file type. Name the file something meaningful like animation.gif. You can now delete the original screen capture image so you don&#8217;t accidentally duplicate it during the next steps.</p>
<p style="text-align: center;"><a href="http://blog.iharder.net/wp-content/uploads/2009/10/2-saved-as-gif.png"><img class="aligncenter size-full wp-image-287" title="Saved as GIF" src="http://blog.iharder.net/wp-content/uploads/2009/10/2-saved-as-gif.png" alt="Saved as GIF" width="406" height="277" /></a></p>
<p>We&#8217;ll want to see the sidebar so we can add images to the GIF sequence. Click the Sidebar button in the toolbar.</p>
<p style="text-align: center;"><a href="http://blog.iharder.net/wp-content/uploads/2009/10/3-with-sidebar.png"><img class="aligncenter size-full wp-image-288" title="With Sidebar Showing" src="http://blog.iharder.net/wp-content/uploads/2009/10/3-with-sidebar.png" alt="With Sidebar Showing" width="418" height="277" /></a></p>
<p>Let&#8217;s just add one character &#8216;A&#8217; to the text editor, and add that to the sequence.</p>
<ol>
<li>Type &#8216;A&#8217; in the text editor window.</li>
<li>Type Command-Shift-4.</li>
<li>Type Space.</li>
<li>Click on the text editor window.</li>
<li>Find the captured image on your Desktop, and drag it onto the Preview window, directly over the &#8220;animation.gif&#8221; image in the sidebar.</li>
</ol>
<p style="text-align: center;"><a href="http://blog.iharder.net/wp-content/uploads/2009/10/4-dragging-image-over-first-frame1.png"><img class="aligncenter size-full wp-image-291" title="Dragging Image Over First Frame" src="http://blog.iharder.net/wp-content/uploads/2009/10/4-dragging-image-over-first-frame1.png" alt="Dragging Image Over First Frame" width="398" height="256" /></a></p>
<p>Your Preview window should look something like this now:</p>
<p style="text-align: center;"><a href="http://blog.iharder.net/wp-content/uploads/2009/10/5-after-two-frames.png"><img class="aligncenter size-full wp-image-293" title="After Two Frames" src="http://blog.iharder.net/wp-content/uploads/2009/10/5-after-two-frames.png" alt="After Two Frames" width="418" height="277" /></a></p>
<p>Now let&#8217;s capture several frames at once to speed this along. After each character that we type in the text editor, we&#8217;ll type Command-Shift-4, Space, and click on the text editor window, creating many screenshots saved to the desktop.</p>
<p>Select all of these new screenshots on the desktop, and drag them to the Preview window as shown below so that you tell Preview to add the images to the sequence you began (as opposed to simply opening more files, which it will do if you drag too low on the sidebar).</p>
<p style="text-align: center;"><a href="http://blog.iharder.net/wp-content/uploads/2009/10/6-dragging-several-files.png"><img class="aligncenter size-full wp-image-294" title="Dragging Several Files" src="http://blog.iharder.net/wp-content/uploads/2009/10/6-dragging-several-files.png" alt="Dragging Several Files" width="398" height="264" /></a></p>
<p>You&#8217;ve got it now. Continue with more frames, and save your GIF. Drag the GIF image to Safari or other animated GIF-enabled viewer, and enjoy. Unfortunately I haven&#8217;t found a way to loop the animation in Preview.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iharder.net/2009/10/22/gif-create-animated-gifs-with-mac-os-x-preview-app/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Stream iTunes over SSH</title>
		<link>http://blog.iharder.net/2009/09/28/itunes-stream-itunes-over-ssh/</link>
		<comments>http://blog.iharder.net/2009/09/28/itunes-stream-itunes-over-ssh/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 21:08:41 +0000</pubDate>
		<dc:creator>Robert Harder</dc:creator>
				<category><![CDATA[Utility]]></category>
		<category><![CDATA[bonjour]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[dns-sd]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[mdns]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://blog.iharder.net/?p=257</guid>
		<description><![CDATA[After (mostly unsuccessful) Googling for how to stream iTunes over SSH, I finally tracked down the difficult bits myself and put together a four-line script (five if you count &#8220;shebang&#8221;): #!/bin/sh dns-sd -P "Home iTunes" _daap._tcp local 3689 localhost.local. 127.0.0.1 "Arbitrary text record" &#38; PID=$! ssh -C -N -L 3689:localhost:3689 myusername@blahblahblah.dyndns.org kill $PID Multicast DNS [...]]]></description>
			<content:encoded><![CDATA[<p>After (mostly unsuccessful) Googling for how to stream iTunes over SSH, I finally tracked down the difficult bits myself and put together a four-line script (five if you count &#8220;shebang&#8221;):</p>
<pre>#!/bin/sh
dns-sd -P "Home iTunes" _daap._tcp local 3689 localhost.local. 127.0.0.1 "Arbitrary text record" &amp;
PID=$!
ssh -C -N -L 3689:localhost:3689 myusername@blahblahblah.dyndns.org
kill $PID</pre>
<p style="text-align: center;"><a href="http://blog.iharder.net/wp-content/uploads/2009/09/itunes-sharing.png"><img class="aligncenter size-full wp-image-264" title="itunes-sharing" src="http://blog.iharder.net/wp-content/uploads/2009/09/itunes-sharing.png" alt="itunes-sharing" width="468" height="301" /></a></p>
<p><span id="more-257"></span></p>
<h2>Multicast DNS (mDNS) and DNS Service Discovery (DNS-SD) Test Tool</h2>
<p>We need to trick iTunes into thinking our home computer is on our local network, because if you&#8217;re sitting in Starbucks, then your home computer is <strong>not</strong> on your local network (and if it is, then you need to address your caffeine addiction). For that we use a tool quietly sitting at <tt>/usr/bin/dns-sd</tt> that provides a command line interface to the DNS-SD libraries which is normally accessible to programmers via <tt>/usr/include/dns_sd.h</tt>. Like all good libraries, it helps to have a command line reference tool for scripters, and <tt>dns-sd</tt> works great for us.</p>
<p>iTunes uses Multicast DNS (mDNS) and DNS Service Discovery (DNS-SD) to announce its presence and to look for other iTunes instances. Apple calls this technology Bonjour (formerly Rendezvous), but it is also known as <a href="http://www.zeroconf.org/">Zero Configuration Networking (www.zeroconf.org)</a>.</p>
<p>The <tt>dns-sd</tt> <tt>man</tt> page only gives a few of the many options available. Typing <tt>dns-sd</tt> at the command line shows you more options but without much explanation.</p>
<pre>$ dns-sd
dns-sd -E                  (Enumerate recommended registration domains)
dns-sd -F                      (Enumerate recommended browsing domains)
dns-sd -B        &lt;Type&gt; &lt;Domain&gt;        (Browse for services instances)
dns-sd -L &lt;Name&gt; &lt;Type&gt; &lt;Domain&gt;           (Look up a service instance)
dns-sd -R &lt;Name&gt; &lt;Type&gt; &lt;Domain&gt; &lt;Port&gt; [&lt;TXT&gt;...] (Register a service)
dns-sd -P &lt;Name&gt; &lt;Type&gt; &lt;Domain&gt; &lt;Port&gt; &lt;Host&gt; &lt;IP&gt; [&lt;TXT&gt;...]  (Proxy)
dns-sd -Z        &lt;Type&gt; &lt;Domain&gt;   (Output results in Zone File format)
dns-sd -Q &lt;FQDN&gt; &lt;rrtype&gt; &lt;rrclass&gt; (Generic query for any record type)
dns-sd -C &lt;FQDN&gt; &lt;rrtype&gt; &lt;rrclass&gt;   (Query; reconfirming each result)
dns-sd -X udp/tcp/udptcp &lt;IntPort&gt; &lt;ExtPort&gt; &lt;TTL&gt;   (NAT Port Mapping)
dns-sd -G v4/v6/v4v6 &lt;Hostname&gt;  (Get address information for hostname)
dns-sd -V    (Get version of currently running daemon / system service)
dns-sd -A                      (Test Adding/Updating/Deleting a record)
dns-sd -U                                  (Test updating a TXT record)
dns-sd -N                             (Test adding a large NULL record)
dns-sd -T                            (Test creating a large TXT record)
dns-sd -M      (Test creating a registration with multiple TXT records)
dns-sd -I   (Test registering and then immediately updating TXT record)
dns-sd -S                 (Test multiple operations on a shared socket)</pre>
<p>We&#8217;ll use the Proxy option <tt>-P</tt> to indicate that the service we&#8217;re advertising will be rerouted, in our case through an SSH tunnel.</p>
<pre>dns-sd -P &lt;Name&gt; &lt;Type&gt; &lt;Domain&gt; &lt;Port&gt; &lt;Host&gt; &lt;IP&gt; [&lt;TXT&gt;...]  (Proxy)</pre>
<p>Looking at the relevant line in our script we see how we match up the fields.</p>
<pre>dns-sd -P "Home iTunes" _daap._tcp local 3689 localhost.local. 127.0.0.1 "Arbitrary text record" &amp;
  PID=$!</pre>
<p><i>Note:</i> Some people need &#8220;localhost&#8221; and others need &#8220;localhost.local.&#8221; for this to work. Not sure what&#8217;s different about people&#8217;s systems. Try both. <i>Updated 1 Sept 2010</i></p>
<p>The <tt>Name</tt> parameter will show up in iTunes as the name of the iTunes library we&#8217;re sharing. It doesn&#8217;t have to be the actual name of the library, so we&#8217;ll just use <tt>Home iTunes</tt> as a convenient placeholder.</p>
<p>Port 3689 is the port used by iTunes for sharing music.</p>
<p>The &#8220;Arbitrary text record&#8221; is just that—an arbitrary chunk of text that&#8217;s required for <tt>dns-sd</tt> to properly process the command.</p>
<p>The next line of our command, <tt>PID=$!</tt> saves the process id of the command we just executed into a variable <tt>$PID</tt> which we&#8217;ll need in order to neatly shutdown the proxy when our SSH tunnel closes.</p>
<h2>The SSH Tunnel</h2>
<p>We use SSH to connect to our home machine and forward connections from our remote machine&#8217;s port 3689 (in Starbucks) to our home machine&#8217;s port 3689, where you left iTunes up and running before you left this morning (right?).</p>
<pre>ssh -C -N -L 3689:localhost:3689 myusername@blahblahblah.dyndns.org</pre>
<p>The <tt>-C</tt> option turns on compression, which may not do much good for streaming MP3&#8242;s but a) it doesn&#8217;t hurt, and processors are much, much faster than your bandwidth, and b) don&#8217;t forget that you&#8217;ll be receiving a description of your home iTunes library, which is probably a rather sizable XML file.</p>
<p>The <tt>-N</tt> option says we&#8217;re not executing an SSH command but rather just sitting here port forwarding until the connection is broken (like when you leave Starbucks).</p>
<p>The <tt>-L</tt> &#8220;listen&#8221; option is covered extensively in tutorials all over the Internet, but in short it says, &#8220;listen for local connections to port 3689 and forward them to the other end and try connecting to <tt>localhost</tt> on its port 3689.&#8221;</p>
<p>The <tt>myusername@blahblahblah.dyndns.org</tt> portion will be dependent on how you connect to your home computer over SSH. Again, that&#8217;s covered in detail all over the Internet. If your remote computer is secured, you might consider using SSH keys to allow automatic login. Then you can put this script in <tt>~/Library/Scripts</tt> and launch it from the global scripts menu, if you have that activated.</p>
<h2>Cleanup</h2>
<p>When the SSH connection eventually closes, such as when you close your laptop or disconnect from the network, the <tt>ssh</tt> command will exit, and <tt>kill $PID</tt> will run which closes down the <tt>dns-sd</tt> proxy, so you won&#8217;t see it in iTunes anymore.</p>
<h2>Packaging</h2>
<p>I find it helpful to put this script in <tt>~/Library/Scripts</tt> so that I can execute from my global Scripts menu in my menubar, but it&#8217;s up to you how you want to launch it. Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iharder.net/2009/09/28/itunes-stream-itunes-over-ssh/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>ImageSnap: Capturing a Video Image with QTKit on Snow Leopard</title>
		<link>http://blog.iharder.net/2009/09/14/imagesnap-capturing-a-video-image-with-qtkit-on-snow-leopard/</link>
		<comments>http://blog.iharder.net/2009/09/14/imagesnap-capturing-a-video-image-with-qtkit-on-snow-leopard/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 16:32:28 +0000</pubDate>
		<dc:creator>Robert Harder</dc:creator>
				<category><![CDATA[Utility]]></category>
		<category><![CDATA[capture]]></category>
		<category><![CDATA[isight]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[qtkit]]></category>
		<category><![CDATA[quicktime]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.iharder.net/?p=230</guid>
		<description><![CDATA[ImageSnap is a Public Domain command-line tool that lets you capture still images from an iSight or other video source. You might remember Axel Bauer&#8217;s original isightcapture tool (that is no longer supported but still works on most systems). I wanted a similar tool with source available so I could make feature changes or at [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://iharder.sourceforge.net/current/macosx/imagesnap/">ImageSnap</a> is a Public Domain command-line tool that lets you capture still images from an iSight or other video source. You might remember Axel Bauer&#8217;s original <a href="http://www.intergalactic.de/pages/iSight.html">isightcapture</a> tool (that is no longer supported but still works on most systems). I wanted a similar tool with source available so I could make feature changes or at least recompile with Apple&#8217;s ever-changing architectures.</p>
<p>At some point Apple introduced QTKit, a new and oh-so-welcome abstraction bringing QuickTime programming into the 21st century. Nothing against die-hard ANSI C programming, but it fits awkwardly into what are otherwise clean Objective-C Cocoa programs.</p>
<p>Rather than provide a detailed tutorial about using QTKit (sorry if you wanted one), I&#8217;ll just point you to the <a href="http://iharder.sourceforge.net/current/macosx/imagesnap/">ImageSnap</a> code so you can take a look at a few useful things like starting a <tt>QTCaptureSession</tt>, capturing output with <tt>QTCaptureDecompressedVideoOutput</tt>, and saving an <tt>NSImage</tt> to disk.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iharder.net/2009/09/14/imagesnap-capturing-a-video-image-with-qtkit-on-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>
