<?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"
	>

<channel>
	<title>n8blog</title>
	<atom:link href="http://www.n8gray.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.n8gray.org</link>
	<description>distraction in action</description>
	<pubDate>Fri, 13 Jun 2008 05:14:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Printing from OS X 10.5 to Ubuntu</title>
		<link>http://www.n8gray.org/blog/2008/06/12/printing-from-os-x-105-to-ubuntu/</link>
		<comments>http://www.n8gray.org/blog/2008/06/12/printing-from-os-x-105-to-ubuntu/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 02:20:15 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=175</guid>
		<description><![CDATA[This took me waaaay too long to figure out.  A while back I set up printer sharing (with browsing) on my Ubuntu-based server.  My Mac (running Tiger at the time) found the server just fine and it all just worked &#8212; I couldn&#8217;t believe how simple it was!  But then I upgraded [...]]]></description>
			<content:encoded><![CDATA[<p>This took me waaaay too long to figure out.  A while back I set up printer sharing (with browsing) on my Ubuntu-based server.  My Mac (running Tiger at the time) found the server just fine and it all just worked &#8212; I couldn&#8217;t believe how simple it was!  But then I upgraded to Leopard, and among the (numerous) casualties was the shared printer.  No matter what I tried, what protocol I used, what driver I used, the shared printer just wouldn&#8217;t work.  After hours of banging my head against the keyboard I let it go.  About 9 months have passed, and today I decided to take one more swing at.  Can you believe it?  I found the problem!  There were two problems really.</p>

<p>First, to access a shared printer on <strong>another</strong> machine, you have to turn on print sharing on <strong>your</strong> machine.  This defies all logic, but there you go.</p>

<p>Second, for some utterly inscrutable reason <a href="http://docs.info.apple.com/article.html?artnum=306984">Apple decided to *dis*able the <span class="caps">CUPS </span>browsing protocol, leaving only Bonjour browsing working</a>.  ????  Stupid.  Stupid.  Stupid.  It&#8217;s as if they said &#8220;let&#8217;s make sure Mac users will have lots of trouble printing to Linux servers, that&#8217;ll improve our customer satisfaction!&#8221;  To fix this lameness, do the following:</p>

<code> cupsctl BrowseProtocols='&quot;cups dnssd&quot;'</code>

<p>Combining these two tips, the shared printer <strong>finally</strong> appeared in the &#8220;Default&#8221; pane of the new printer dialog and printing to it just worked.  Hopefully Apple makes this more sensible in Snow Leopard&#8230;</p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/06/12/printing-from-os-x-105-to-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Backup Bouncer and Time Machine</title>
		<link>http://www.n8gray.org/blog/2008/06/09/backup-bouncer-and-time-machine/</link>
		<comments>http://www.n8gray.org/blog/2008/06/09/backup-bouncer-and-time-machine/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 00:18:36 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Backup-Bouncer]]></category>

		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=174</guid>
		<description><![CDATA[Oh Mama!  Another Backup Bouncer post!  You might think that I, the author of Backup Bouncer, the crusader for end-user verification of backup tools, would have run BB on Time Machine at some point.  If so, you have seriously underestimated my laziness.  But this morning I got an e-mail from a [...]]]></description>
			<content:encoded><![CDATA[<p>Oh Mama!  Another Backup Bouncer post!  You might think that I, the author of Backup Bouncer, the crusader for end-user verification of backup tools, would have run BB on Time Machine at some point.  If so, you have seriously underestimated my laziness.  But this morning I got an e-mail from a user asking for help testing TM with <span class="caps">BB, </span>and this finally spurred me to do the test myself.</p>

<p>Here&#8217;s how you test Time Machine with Backup Bouncer:</p>



<pre>$ mkdir ~/bb
# We need to trick BB into thinking this is a volume it created
$ touch ~/bb/bbouncer-vol
$ sudo bbouncer create ~/bb
# Now do a Time Machine backup and wait till it's done
$ mv ~/bb ~/bb-orig
# Now restore the ~/bb directory from Time Machine.  
# Try not to catch SPACE MADNESS!!!
$ bbouncer verify -d ~/bb-orig ~/bb
</pre>



<p>On my Leopard 10.5.3 machine here&#8217;s what I get with BB 0.1.3:</p>



<pre>Verifying:    basic-permissions ... ok (Critical)
Verifying:           timestamps ... ok (Critical)
Verifying:             symlinks ... ok (Critical)
Verifying:    symlink-ownership ... FAIL 
Verifying:            hardlinks ... FAIL (Important)
Verifying:       resource-forks ... 
   Sub-test:             on files ... ok (Critical)
   Sub-test:  on hardlinked files ... FAIL (Important)
Verifying:         finder-flags ... ok (Critical)
Verifying:         finder-locks ... ok 
Verifying:        creation-date ... ok 
Verifying:            bsd-flags ... FAIL 
Verifying:       extended-attrs ... 
   Sub-test:             on files ... ok (Important)
   Sub-test:       on directories ... ok (Important)
   Sub-test:          on symlinks ... ok 
Verifying: access-control-lists ... 
   Sub-test:             on files ... ok (Important)
   Sub-test:              on dirs ... ok (Important)
Verifying:                 fifo ... FAIL 
Verifying:              devices ... FAIL 
Verifying:          combo-tests ... 
   Sub-test:  xattrs + rsrc forks ... ok 
   Sub-test:     lots of metadata ... ok 
</pre>



<p>The only annoyance is that hardlinks aren&#8217;t preserved, but that&#8217;s not surprising considering the way hardlinks are used internally by TM to prevent wasted space.  (I should point out that the hardlink failure here is <strong>not</strong> the same as <a href="http://www.n8gray.org/blog/2008/06/09/more-backup-bouncer/">the Apple rsync one I mentioned earlier today</a>, and it&#8217;s not nearly as bad.)  These results are not perfect but I would have no problem recommending TM backups to any less-than-hardcore user.</p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/06/09/backup-bouncer-and-time-machine/feed/</wfw:commentRss>
		</item>
		<item>
		<title>More Backup Bouncer</title>
		<link>http://www.n8gray.org/blog/2008/06/09/more-backup-bouncer/</link>
		<comments>http://www.n8gray.org/blog/2008/06/09/more-backup-bouncer/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 23:09:47 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Backup-Bouncer]]></category>

		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=173</guid>
		<description><![CDATA[I just released Backup Bouncer 0.1.3.  I&#8217;ve changed the output format to print the &#8220;priority&#8221; of a test along with its outcome, which hopefully should clear up some confusion among less experienced users.  On a tip from Patrick Power I&#8217;ve added a new test that combines resource forks and hard links.  Unfortunately, [...]]]></description>
			<content:encoded><![CDATA[<p>I just released <a href="http://www.n8gray.org/code/backup-bouncer/">Backup Bouncer 0.1.3</a>.  I&#8217;ve changed the output format to print the &#8220;priority&#8221; of a test along with its outcome, which hopefully should clear up <a href="http://www.n8gray.org/blog/2008/06/02/backup-bouncer-is-working/">some confusion</a> among less experienced users.  On a tip from <a href="http://www.n8gray.org/blog/2007/11/03/backup-bouncer-012/#comment-20735">Patrick Power</a> I&#8217;ve added a new test that combines resource forks and hard links.  Unfortunately, Apple&#8217;s rsync fails this test in OS X 10.5.3:</p>



<pre>------------------ rsync-apple ------------------
Verifying:    basic-permissions ... ok (Critical)
Verifying:           timestamps ... ok (Critical)
Verifying:             symlinks ... ok (Critical)
Verifying:    symlink-ownership ... ok 
Verifying:            hardlinks ... ok (Important)
Verifying:       resource-forks ... 
   Sub-test:             on files ... ok (Critical)
   Sub-test:  on hardlinked files ... FAIL (Important)
Verifying:         finder-flags ... ok (Critical)
Verifying:         finder-locks ... FAIL 
Verifying:        creation-date ... FAIL 
Verifying:            bsd-flags ... ok 
Verifying:       extended-attrs ... 
   Sub-test:             on files ... ok (Important)
   Sub-test:       on directories ... ok (Important)
   Sub-test:          on symlinks ... FAIL 
Verifying: access-control-lists ... 
   Sub-test:             on files ... ok (Important)
   Sub-test:              on dirs ... ok (Important)
Verifying:                 fifo ... ok 
Verifying:              devices ... ok 
Verifying:          combo-tests ... 
   Sub-test:  xattrs + rsrc forks ... ok 
   Sub-test:     lots of metadata ... ok 
</pre>



<p>If you add a resource fork to a file that&#8217;s hardlinked to another file then only one of the files gets copied.  <img src='http://www.n8gray.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  This, no doubt, is due to the hackery involved to make <span class="caps">HFS</span>+ look like it has a real hardlinks when it actually doesn&#8217;t.</p>

<p>Some of the changes in BB 0.1.3 were a bit invasive and Bash is not the greatest of programming languages, so please keep your eyes open for bugs.  If you see something in your results that doesn&#8217;t make sense just let me know.</p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/06/09/more-backup-bouncer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Backup Bouncer is Working, Confusing, Annoying Developers</title>
		<link>http://www.n8gray.org/blog/2008/06/02/backup-bouncer-is-working/</link>
		<comments>http://www.n8gray.org/blog/2008/06/02/backup-bouncer-is-working/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 20:05:38 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Backup-Bouncer]]></category>

		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=172</guid>
		<description><![CDATA[A friend recently pointed out that BB gets some love on the Carbon Copy Cloner product page.  This is quite satisfying to me, since my indirect goal with BB was to get it into the hands of the folks making the tools.  The primary goal was always to let users validate backup tools [...]]]></description>
			<content:encoded><![CDATA[<p>A friend recently pointed out that BB gets some love on <a href="http://www.bombich.com/software/ccc.html">the Carbon Copy Cloner product page</a>.  This is quite satisfying to me, since my indirect goal with BB was to get it into the hands of the folks making the tools.  The primary goal was always to let users validate backup tools on their own, but it was always clear that this would end up putting pressure on the tool makers.  When a user comes to you and says, &#8220;your tool fails backup bouncer test foo,&#8221; you either pay attention or lose a customer.  This is very empowering for end-users, but one can see how it has the potential to irritate tool developers if they disagree with <span class="caps">BB&#8217;</span>s test methodology.</p>

<p><span id="more-172"></span></p>

<p>So I wasn&#8217;t too surprised when a user forwarded me a somewhat exasperated-sounding note from Shirt Pocket software explaining why SD doesn&#8217;t pass <span class="caps">BB&#8217;</span>s <span class="caps">FIFO </span>and device file tests.  I won&#8217;t paste the note in here, since I feel that would be poor form, but I will pass along their rationale for not copying these files.  They feel that <span class="caps">FIFO</span>s and device files are normally system-created files that are not meant to be preserved across reboots or backups.  For that reason, SD doesn&#8217;t back up these filesystem object types at all.</p>

<p>One can understand how Shirt Pocket arrived at this policy.  Writing a good <i>system-level</i> backup tool is more subtle than it might appear.  There are actually parts of the filesystem that you <strong>don&#8217;t</strong> want to back up, like caches, VM files, and so forth.  You <strong>don&#8217;t</strong> want to back up the device files under <code>/dev</code>, since those get created dynamically depending on what devices are attached.  In short, there are some parts of the filesystem that are tied to the state of the running system, and these should not normally be copied in a backup.</p>

<p>The problem with Shirt Pocket&#8217;s policy is that although it is certainly true that the system-created <span class="caps">FIFO</span>s and device files should not be copied in a system-level backup, there are legitimate reasons a <strong>user</strong> might create <span class="caps">FIFO</span>s or device files, and there&#8217;s every reason to preserve those user-created objects during a backup.  Don&#8217;t get me wrong &#8212; this is obscure stuff that only advanced <span class="caps">UNIX </span>hackers would do, but hey, advanced <span class="caps">UNIX </span>hackers need reliable backups too!  <span class="caps">SD&#8217;</span>s policy is, <span class="caps">IMHO, </span>overly broad.  I would be much more comfortable if SD excluded filesystem <strong>locations</strong> rather than entire classes of filesystem objects.</p>

<p>The Shirt Pocket letter also accused BB of being &#8220;rather misleading to most&#8221; on this issue because it makes people worry about something that won&#8217;t cause them any problems.  Although I vehemently disagree with the &#8220;misleading&#8221; characterization, I agree that not every BB test is equally important in practical terms.  Most end-users will absolutely not care that tool X doesn&#8217;t backup <span class="caps">FIFO</span>s.  This is why BB has <strong>always</strong> had a prioritization feature.  Quoting from the usage string of bbouncer:</p>


<pre>-T &lt;set&gt;     Use the given set of tests.  &lt;set&gt; can be either 
             &quot;critical&quot;, for tests whose failure will cause problems
             for average users, or &quot;important&quot;, for tests whose
             failure may not cause problems for many users, but which
             may be important to power-users or may qualify as 
             critical in the future.
</pre>



<p>The <span class="caps">FIFO</span>/device file tests are not included in either the &#8220;critical&#8221; or &#8220;important&#8221; set of tests.  So I&#8217;m saying (and have always said) that most users, even most power users, won&#8217;t care about them.  So why test for them at all?  Consider the situation before <a href="http://blog.plasticsfuture.org/2006/03/05/the-state-of-backup-and-cloning-tools-under-mac-os-x/">Maurits&#8217; blogged on backups</a> and BB existed.  Most people, myself included, didn&#8217;t even know what the full set of OS X filesystem object types and metadata <strong>was</strong>.  Maurits filled us in on what existed, but knowing how to test for preservation was still a black art.  BB was meant to democratize that testing, but also to act as an <strong>exhaustive</strong> test set.  (I don&#8217;t claim to have achieved even close to 100% coverage, but that&#8217;s the goal.)  So it&#8217;s important to me that BB include tests for any metadatum or filesystem object that can conceivably have a reason to be backed up.</p>

<p>Having said that, I&#8217;ll concede there&#8217;s a usability bug here.  The -T option is unlikely to be discovered by casual users, and they&#8217;re the ones who need it most!  It&#8217;s not used by <code>autopilot</code> and it&#8217;s not even documented in the <span class="caps">README. </span> So I think I&#8217;ll be making the following changes:</p>


<ul>
<li>I&#8217;ll document -T more pervasively</li>
<li>I&#8217;ll have the priority of a test appear in <span class="caps">BB&#8217;</span>s output</li>
<li>I&#8217;ll have BB default to running in &#8220;important&#8221; mode, changing the exhaustive mode to an opt-in option</li>
</ul>



<p>Hopefully this will help prevent confusion for casual users and ease the support burden of tool developers while maintaining <span class="caps">BB&#8217;</span>s goals of providing easy backup tool validation and exhaustive test coverage.</p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/06/02/backup-bouncer-is-working/feed/</wfw:commentRss>
		</item>
		<item>
		<title>WTF is MIPSEL?</title>
		<link>http://www.n8gray.org/blog/2008/05/25/wtf-is-mipsel/</link>
		<comments>http://www.n8gray.org/blog/2008/05/25/wtf-is-mipsel/#comments</comments>
		<pubDate>Sun, 25 May 2008 20:16:22 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Hacking]]></category>

		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=171</guid>
		<description><![CDATA[My Popcorn Hour PCH A-100 media streamer has a mipsel architecture, which led me to wonder, &#8220;what the heck does mipsel mean anyway?&#8221;  As it turns out, the difference between mips and mipsel is that mips is big-endian and mipsel is little-endian.  Mystery solved.]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://www.popcornhour.com/onlinestore/">Popcorn Hour <span class="caps">PCH</span> A-100 media streamer</a> has a mipsel architecture, which led me to wonder, &#8220;what the heck does mipsel mean anyway?&#8221;  As it turns out, the difference between mips and mipsel is that mips is big-endian and mipsel is little-endian.  Mystery solved.</p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/05/25/wtf-is-mipsel/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sad Meal</title>
		<link>http://www.n8gray.org/blog/2008/05/13/sad-meal/</link>
		<comments>http://www.n8gray.org/blog/2008/05/13/sad-meal/#comments</comments>
		<pubDate>Tue, 13 May 2008 19:25:42 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Family]]></category>

		<category><![CDATA[amaya]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=170</guid>
		<description><![CDATA[Wisdom from the mouth of Amaya on a trip to McDonalds (even latte-liberals need fast food every now and then), where she had a Happy Meal:

I think the grownup meal is called a Sad Meal.  It&#8217;s sad because it doesn&#8217;t have a toy.

Mind you, she was completely serious about this statement and delivered it [...]]]></description>
			<content:encoded><![CDATA[<p>Wisdom from the mouth of Amaya on a trip to McDonalds (even latte-liberals need fast food every now and then), where she had a Happy Meal:</p>

<blockquote>I think the grownup meal is called a Sad Meal.  It&#8217;s sad because it doesn&#8217;t have a toy.</blockquote>

<p>Mind you, she was completely serious about this statement and delivered it with a totally straight face.  Had my mouth been full of soda it would have come shooting out of my nose for sure&#8230;</p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/05/13/sad-meal/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Upgraded to Wordpress 2.5.1</title>
		<link>http://www.n8gray.org/blog/2008/05/07/upgraded-to-wordpress-251/</link>
		<comments>http://www.n8gray.org/blog/2008/05/07/upgraded-to-wordpress-251/#comments</comments>
		<pubDate>Thu, 08 May 2008 01:46:34 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Blogging]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/?p=169</guid>
		<description><![CDATA[I just upgraded the blog to Wordpress 2.5.1.  I did some testing, but please let me know if anything&#8217;s busted.]]></description>
			<content:encoded><![CDATA[<p>I just upgraded the blog to Wordpress 2.5.1.  I did some testing, but please let me know if anything&#8217;s busted.</p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/05/07/upgraded-to-wordpress-251/feed/</wfw:commentRss>
		</item>
		<item>
		<title>QLColorCode 1.0</title>
		<link>http://www.n8gray.org/blog/2008/03/26/qlcolorcode-10/</link>
		<comments>http://www.n8gray.org/blog/2008/03/26/qlcolorcode-10/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 06:18:40 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[OS X]]></category>

		<category><![CDATA[QLColorCode]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2008/03/26/qlcolorcode-10/</guid>
		<description><![CDATA[I just put up the latest release of QLColorCode, and it&#8217;s a doozy!  Well, not really, but it does (probably) fix a crash bug that was biting me pretty frequently.  It also adds some more miscellaneous language UTIs and lets you put a cap on the size of rendered files so you don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I just put up the latest release of <span class="caps">QLC</span>olorCode, and it&#8217;s a doozy!  Well, not really, but it does (probably) fix a crash bug that was biting me pretty frequently.  It also adds some more miscellaneous language <span class="caps">UTI</span>s and lets you put a cap on the size of rendered files so you don&#8217;t accidentally render massive 50MB <span class="caps">SQL </span>dumps and such.  All in all, it seems like this project has reached a stable point so I&#8217;ve gone ahead and called it version 1.0.</p>

<p><a href="http://qlcolorcode.googlecode.com/">Get it at the goog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/03/26/qlcolorcode-10/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Garfield Minus Garfield</title>
		<link>http://www.n8gray.org/blog/2008/02/28/garfield-minus-garfield/</link>
		<comments>http://www.n8gray.org/blog/2008/02/28/garfield-minus-garfield/#comments</comments>
		<pubDate>Thu, 28 Feb 2008 23:49:22 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2008/02/28/garfield-minus-garfield/</guid>
		<description><![CDATA[It turns out that the way to make Garfield comics funny is to remove Garfield.]]></description>
			<content:encoded><![CDATA[<p><a href="http://garfieldminusgarfield.tumblr.com/">It turns out that the way to make Garfield comics funny is to remove Garfield.</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/02/28/garfield-minus-garfield/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A slightly less cynical post on photography</title>
		<link>http://www.n8gray.org/blog/2008/02/05/a-slightly-less-cynical-post-on-photography/</link>
		<comments>http://www.n8gray.org/blog/2008/02/05/a-slightly-less-cynical-post-on-photography/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 08:47:58 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2008/02/05/a-slightly-less-cynical-post-on-photography/</guid>
		<description><![CDATA[Sometimes it&#8217;s all worthwhile.



]]></description>
			<content:encoded><![CDATA[<p>Sometimes it&#8217;s all worthwhile.</p>

<p><span id="more-164"></span></p>

<p><center><a href='http://www.n8gray.org/wp-content/uploads/2008/02/amayapiano.jpg' title='The Girl at the Piano'><img src='http://www.n8gray.org/wp-content/uploads/2008/02/amayapiano.jpg' width=500 alt='The Girl at the Piano' /></a></center></p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/02/05/a-slightly-less-cynical-post-on-photography/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Photography Snowball</title>
		<link>http://www.n8gray.org/blog/2008/02/05/the-photography-snowball/</link>
		<comments>http://www.n8gray.org/blog/2008/02/05/the-photography-snowball/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 08:29:06 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2008/02/05/the-photography-snowball/</guid>
		<description><![CDATA[Photography is a dangerous hobby.  You start with &#8220;all I really need is a good entry-level dSLR,&#8221; but right away you realize that a good camera&#8217;s no good without a decent lens.  &#8220;But hey,&#8221; you think, &#8220;that should be enough, right?&#8221;  You grit your teeth and swipe the card, ka-ching, $750, and [...]]]></description>
			<content:encoded><![CDATA[<p>Photography is a dangerous hobby.  You start with &#8220;all I really need is a good entry-level dSLR,&#8221; but right away you realize that a good camera&#8217;s no good without a decent lens.  &#8220;But hey,&#8221; you think, &#8220;that should be enough, right?&#8221;  You grit your teeth and swipe the card, ka-ching, $750, and voilla, you&#8217;re happy for a while.  But this is just the top of the hill.</p>

<p>It doesn&#8217;t take long for you to start feeling the limits of your gear.  Sure, you can get great results when the light&#8217;s good or the subject&#8217;s still, but when your kid&#8217;s running around in the living room and the light&#8217;s bad you&#8217;ve just gotta pop up the flash.  After a few tries you realize that the built-in flash on your fancy dSLR isn&#8217;t a lot better than the one on your old point-n-shoot.  Everything still ends up flattened.  Blagh.  The snowball starts rolling.</p>

<p>Once again you swipe the card &#8212; you pick up a nice, fast 50mm lens (a bargain at $120).  Now you&#8217;ve got a better range, you&#8217;re taking shots where you couldn&#8217;t before, but guess what?  At f/1.8 you&#8217;ve got a 2cm depth of field.  You&#8217;d better hope you can nail the focus just right, or you&#8217;re outta luck.  Plus, there are times when the light&#8217;s just not there, even at f/1.8.  Oh dear, the snowball&#8217;s rolling faster now.</p>

<p>So you pick up a good flash ($190).  But you make the mistake of reading <a href="http://strobist.blogspot.com">strobist</a> and start thinking about off-camera flash, so the snowball grows by another $60 in RF triggers and diffusers.  (We&#8217;ll be generous and assume you didn&#8217;t get the stands, umbrellas, and gels that you wanted so badly but couldn&#8217;t justify to the spousal unit.)</p>

<p>I think you get the picture, but I&#8217;d just like to take a moment to enumerate a few more of the items that will contribute to that snowball&#8217;s mass.  Mind you, I&#8217;m using &#8220;ghetto-gear&#8221; prices here.  Buying actual reputable-brand gear means these prices go up, often significantly.</p>


<ul>
<li>You&#8217;ve gotta have a telephoto lens for birds and trips to the zoo.  Something that at least gets out to 200mm.  ($250 <em>at least</em>.  Probably more like $450.)</li>
<li>It would be nice to have some teleconverters for that lens to give you even more reach on the cheap.  ($60-200)</li>
<li>Ooh, macro&#8217;s fun.  Close-up lenses are reasonably cheap ($40) and so are extension tubes ($85).</li>
<li>Ah yes, the tripod!  All the pros say it&#8217;s critical to have one, and a good one at that.  Why, you&#8217;d be a fool to skimp here!  ($250.  Yes, you&#8217;re skimping.  You&#8217;re poor.  Boo hoo.)</li>
<li>You really need at least a circular polarizing filter (multi-coated, of course) to get those magical cobalt-blue skies.  ($75)</li>
<li>Don&#8217;t forget about software!  Photoshop is &#8220;only&#8221; $300 with the educational discount.  You <em>might</em> be able to make do with Bibble Pro (great stuff, $120) and Krita ($0, thank God for open-source), but you know you&#8217;ll buy PS eventually.</li>
<li>Another thing, if you care about getting good prints you have to have accurate color during your editing.  That means you definitely need a calibrator for your monitors.  ($80)</li>
<li>Oh yeah, those <span class="caps">RAW </span>files?  They take up space.  You&#8217;ll be needing more hard drives at $100 each.  (Yes, drive<b>s</b>.  You <em>do</em> make backups, right?)</li>
</ul>



<p>But do you know what the funny thing is?  You still truly believe that once you have all those things, once that snowball has reached some ideal size, it will just stop!  Really!</p>

<p>Dear friend, the snowball <em>never</em> stops.</p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/02/05/the-photography-snowball/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dictionary attacks, or why log file monitoring is dumb</title>
		<link>http://www.n8gray.org/blog/2008/01/28/dictionary-attacks-or-why-log-file-monitoring-is-dumb/</link>
		<comments>http://www.n8gray.org/blog/2008/01/28/dictionary-attacks-or-why-log-file-monitoring-is-dumb/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 00:59:59 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Hacking]]></category>

		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2008/01/28/dictionary-attacks-or-why-log-file-monitoring-is-dumb/</guid>
		<description><![CDATA[Like most ssh servers on the internet, the Mojave group server gets lots of ssh dictionary attack attempts.  These attacks are carried out by scripts that try to find dumb passwords on a machine by brute force.  There are a few different tactics these scripts use for picking username/password pairs, including:



User: root, Password: [...]]]></description>
			<content:encoded><![CDATA[<p>Like most ssh servers on the internet, the Mojave group server gets lots of ssh dictionary attack attempts.  These attacks are carried out by scripts that try to find dumb passwords on a machine by brute force.  There are a few different tactics these scripts use for picking username/password pairs, including:</p>


<ul>
<li>User: root, Password: aardvark.  (Repeat with various well-known usernames and every word in the English dictionary)</li>
<li>User: abe, Password: abe.  (Repeat with all common first/last names)</li>
</ul>



<p>It&#8217;s not hard to think of simple methods to cut off these attacks without altering or otherwise restricting one&#8217;s ssh service (by, say, running sshd on a non-standard port):  </p>


<ul>
<li>Throttle login attempts on a per-host basis.  i.e. if a host tries and fails to log in N times in M seconds then start making it wait longer and longer between successive logins (or even blacklist the host entirely).</li>
<li>Throttle login attempts on a per-account basis.  i.e. if user bob gets N failed login attempts within M seconds then throttle or blacklist future login attempts on that account.</li>
<li>Auto-blacklist hosts that attempt to log in to accounts that should never be logged in to.  e.g. if somebody tries to ssh in as user &#8220;games&#8221; they&#8217;re toast.</li>
</ul>



<p>Indeed, there are any number of programs out there that aim to provide exactly these capabilities.<sup class="footnote"><a href="#fn1">1</a></sup>  What these techniques have in common is the need to measure the number of failed login attempts associated with a host and/or account over a period of time.  So how do the existing programs do it?  Sadly, a large number do it by scanning log files.  In other words, a scanner will look for a certain pattern (typically using regular expressions) in the logging output for your system and assume that it indicates a failed login attempt.  This is not a great idea.</p>

<p><span id="more-162"></span></p>

<p>What&#8217;s wrong with log file scanning, anyway?  The first (and least important, <span class="caps">IMHO</span>) mark against it is performance.  A typical system has dozens or hundreds of processes running at any time, each generating log output to some degree.  Well-written programs generate a trickle, but it&#8217;s not unusual for a program to accidentally ship (or be misconfigured) with debug-level logging enabled and thus generate a torrent of debug output.  By running a log file scanner you&#8217;ve now got a program that has to sift through <strong>every byte</strong> of that output looking for just one type of event!  This is certainly not the most efficient way to find out about login attempts.</p>

<p>Another bad aspect of log file scanning is that it relies on the specific formatting of log messages from specific programs.  If you replace OpenSSH with BogoSSH and BogoSSH uses a slightly different log output format then your scanner breaks.  Similarly, if the OpenSSH people ever decide to change their logging format (not that this is likely) then your scanner breaks.  If you install some new service that the scanner doesn&#8217;t know about it&#8217;s probably going to be totally unprotected unless it happens to format its log messages just like some other service the scanner understands.</p>

<p>But the worst thing about log file scanning is that sloppy implementations can actually open your system up to denial of service attacks!  I recently came across <a href="http://www.ossec.net/en/attacking-loganalysis.html">this article by Daniel B. Cid</a> that describes vulnerabilities in several popular log scanners that allow remote attackers to cause your machine to falsely blacklist any other machine of their choosing.  Even worse, one scanner allowed attackers to cut a machine off from the network entirely!  I refer you to the article for details, but the root causes of this problem are easy to describe:</p>


<ul>
<li>Regular expression matching is error-prone.  People aren&#8217;t terribly good at understanding the full class of strings that a given <span class="caps">R.E. </span>will match.  I&#8217;ve been doing complicated <span class="caps">R.E. </span>stuff for years now and I still have a terribly hard time writing bug-free regular expressions.</li>
<li>Log files are chock full of strings that come from insecure sources, like, say, random users on your machine and script kiddies all across the internet who want to crack your machine.  You do <strong>not</strong> want to be taking action automatically based on the contents of such an untrusted data source.  The article doesn&#8217;t even begin to mention what an attacker with local access could do by writing and executing a program that mimics sshd&#8217;s log output.  </li>
</ul>



<p>So how <strong>should</strong> this problem be solved?  By going straight to the horse&#8217;s mouth.  If you want to know about authentication attempts, talk to the authentication system.  Every modern *NIX system supports <span class="caps">PAM, </span><a href="http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/Linux-PAM_SAG.html">the Pluggable Authentication Module system</a>.  With a <span class="caps">PAM </span>module you can perform an action on any failed login attempt from <em>any</em> <span class="caps">PAM</span>-enabled service.  This allows you to create a concise, trustworthy authentication log file with a consistent format, which can then be monitored by a very simple (and thus secure) scanner.</p>

<p>One project that takes the <span class="caps">PAM </span>approach is <a href="http://sourceforge.net/projects/pam-abl">pam_abl</a> (auto-blacklist).  While it doesn&#8217;t use the specific strategy I described above (it builds a database rather than producing an authentication log file) it does get its info from the right source and is thus immune to these bogus log message attacks.  Unfortunately pam_abl is a bit inflexible and limited in its capabilities.  It doesn&#8217;t provide any way to blacklist a host if it tries to log in to a bogus account like &#8216;games&#8217;.  It doesn&#8217;t provide a way to throttle rather than blacklist.  And although it effectively ensures that an attacker will never have a chance to guess your account passwords it doesn&#8217;t provide a way of firewalling off a malicious host entirely.  Even worse, the maintainer of pam_abl doesn&#8217;t seem to have time to work on it any longer.  Hopefully somebody else will step up and turn this into <strong>the</strong> tool for stopping dictionary attacks dead in their tracks.</p>

<p class="footnote" id="fn1"><sup>1</sup> Here are a handful:</p>

<ul> <li> <a href="http://denyhosts.sourceforge.net/" title="sourceforge.net">denyhosts</a sourceforge.net></li> <li> <a href="http://www.fail2ban.org/wiki/index.php/Main_Page" title="fail2ban.org">fail2ban</a fail2ban.org></li> <li> <a href="http://www.aczoom.com/cms/blockhosts/" title="aczoom.com">blockhosts</a aczoom.com></li> <li> <a href="http://blocksshd.sourceforge.net/" title="sourceforge.net">blocsshd</a sourceforge.net></li> <li> <a href="http://www.zipcon.net/~sirius/crackblock.html" title="zipcon.net">crackblock</a zipcon.net></li> <li> <a href="http://shellter.sourceforge.net/" title="sourceforge.net">shellter</a sourceforge.net></li> <li> <a href="http://www.csc.liv.ac.uk/~greg/sshdfilter/" title="liv.ac.uk">sshdfilter</a liv.ac.uk></li> <li> <a href="http://anp.ath.cx/sshit/" title="anp.ath.cx">sshit</a anp.ath.cx></li>
<li> <a href="http://www.techfinesse.com/sshutout/sshutout.html" title="techfinesse.com">sshutout</a techfinesse.com></li> </ul>

<p><strong>Updated</strong>:  Removed ssh-faker from the footnote since it effectively alters the sshd service.</p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/01/28/dictionary-attacks-or-why-log-file-monitoring-is-dumb/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RSS Feeds Fixed</title>
		<link>http://www.n8gray.org/blog/2008/01/11/rss-feeds-fixed/</link>
		<comments>http://www.n8gray.org/blog/2008/01/11/rss-feeds-fixed/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 23:38:36 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Blogging]]></category>

		<category><![CDATA[rss]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2008/01/11/rss-feeds-fixed/</guid>
		<description><![CDATA[It turns out that the recent WordPress upgrade broke my RSS feeds because I failed to re-enable a plugin that I disabled.  It was a bit confusing because everything seemed to work without the plugin, so I figured I didn&#8217;t need it.  I&#8217;ve got that one in my notes now.]]></description>
			<content:encoded><![CDATA[<p>It turns out that the recent WordPress upgrade broke my <span class="caps">RSS </span>feeds because I failed to re-enable a plugin that I disabled.  It was a bit confusing because everything seemed to work without the plugin, so I figured I didn&#8217;t need it.  I&#8217;ve got that one in my notes now.</p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/01/11/rss-feeds-fixed/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bling++, Flickr, Wordpress++++++</title>
		<link>http://www.n8gray.org/blog/2008/01/09/bling-flickr-wordpress/</link>
		<comments>http://www.n8gray.org/blog/2008/01/09/bling-flickr-wordpress/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 20:08:49 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Blogging]]></category>

		<category><![CDATA[bling]]></category>

		<category><![CDATA[flickr]]></category>

		<category><![CDATA[nikkor50mm1.8]]></category>

		<category><![CDATA[worldpress]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2008/01/09/bling-flickr-wordpress/</guid>
		<description><![CDATA[Still more Bling comin&#8217; at ya.  Hopefully the site&#8217;s a bit easier on the eyes now.

The photo in the title is one I took while playing around with my new 50mm f/1.8 Nikkor lens.  With the right adapter the lens can be mounted in reverse and used as a pretty decent macro lens. [...]]]></description>
			<content:encoded><![CDATA[<p>Still more Bling comin&#8217; at ya.  Hopefully the site&#8217;s a bit easier on the eyes now.</p>

<p>The photo in the title is one I took while playing around with my new 50mm f/1.8 Nikkor lens.  With the right adapter the lens can be mounted in reverse and used as a pretty decent macro lens.  I didn&#8217;t have the adapter so I just held the lens up to the camera body instead and started goofing around.  When I saw that shot I immediately thought about using it on the site, and it seems to fit perfectly <span class="caps">IMHO. </span> Since then I&#8217;ve bought the reverse adapter ring (they&#8217;re dirt cheap on ebay) so I&#8217;ll be sharing some more of those shots in the near future on <a href="http://www.flickr.com/photos/n8gray/">my Flickr page</a>.</p>

<p>The Flickr page is another &#8220;news&#8221; item.  I&#8217;ve had a Flickr account for a long time now but never really used it because of various limitations in Flickr.  But now I realize that I just don&#8217;t want to deal with maintaining my own photo hosting software.  Flickr is reasonably priced, has unlimited storage/bandwidth, and gets my shots into an environment where real photographers might actually look at them and give feedback.</p>

<p>Finally, I thought I should mention that I upgraded across not 1, not 2, but 3 WordPress versions (from 2.0.something to 2.3.2) in a matter of minutes thanks to subversion.  My installation is a subversion checkout of the WP developers&#8217; repository, so all I needed to do was <code>svn switch</code> to the 2.3.2 tag to upgrade.  I was able to use <code>svn diff</code> to find the minor tweaks I&#8217;d made to some of the WP files and <code>svn revert</code> them once I determined that they weren&#8217;t needed anymore.  This is <strong>definitely</strong> the way to maintain a website.  Happily, my theme only needed one minor adjustment to work in 2.3.  </p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/01/09/bling-flickr-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>QLColorCode 0.4.1</title>
		<link>http://www.n8gray.org/blog/2008/01/07/qlcolorcode-041/</link>
		<comments>http://www.n8gray.org/blog/2008/01/07/qlcolorcode-041/#comments</comments>
		<pubDate>Mon, 07 Jan 2008 23:32:44 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[QLColorCode]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2008/01/07/qlcolorcode-041/</guid>
		<description><![CDATA[QLColorCode 0.4.1 is out now.  I briefly released 0.4 but then realized that it was completely and utterly broken by an untested, last-minute, &#8220;this can&#8217;t possibly break anything&#8221; change.  You think I would&#8217;ve learned by now&#8230;

The change list is short and sweet.  I&#8217;ve added UTIs for a few more languages (Tcl, JSP, [...]]]></description>
			<content:encoded><![CDATA[<p><span class="caps">QLC</span>olorCode 0.4.1 is out now.  I briefly released 0.4 but then realized that it was completely and utterly broken by an untested, last-minute, &#8220;this can&#8217;t possibly break anything&#8221; change.  You think I would&#8217;ve learned by now&#8230;</p>

<p>The change list is short and sweet.  I&#8217;ve added <span class="caps">UTI</span>s for a few more languages (Tcl, <span class="caps">JSP,</span> Lua) and improved some highlighting modes.  But the nicest change <span class="caps">IMHO </span>is the ability to configure the highlighting parameters with &#8220;defaults write &#8230;&#8221; commands.  This means I can finally use my slateGreen theme day-to-day without worrying that I&#8217;m going to accidentally push it out as the default theme for the next release.  It also means you can enable line numbers, wrapping, etc. without hacking on files in the <span class="caps">QLCC </span>bundle and worrying about your changes being overwritten on the next update.</p>

<p><span class="caps">BTW, QLCC </span>has been downloaded over 5,000 times since I first released it.  If only I had a dollar for each download&#8230;  <img src='http://www.n8gray.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

<p>Anyhow, get it at the <a href="http://qlcolorcode.googlecode.com">project page</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2008/01/07/qlcolorcode-041/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Just in time for Christmas: Bling!</title>
		<link>http://www.n8gray.org/blog/2007/12/21/just-in-time-for-christmas-bling/</link>
		<comments>http://www.n8gray.org/blog/2007/12/21/just-in-time-for-christmas-bling/#comments</comments>
		<pubDate>Fri, 21 Dec 2007 19:47:28 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Blogging]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2007/12/21/just-in-time-for-christmas-bling/</guid>
		<description><![CDATA[Those of you browsing the site with Safari or Firefox (or other webkit/gecko-based browsers) may notice a bit of extra bling on the site now.  Safari users get maximum bling, Firefox users get slight bling, others &#8230; no bling for you!  I guess I should post some screenshots to show you what you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>Those of you browsing the site with Safari or Firefox (or other webkit/gecko-based browsers) may notice a bit of extra bling on the site now.  Safari users get maximum bling, Firefox users get slight bling, others &#8230; no bling for you!  I guess I should post some screenshots to show you what you&#8217;re missing, but naah, why ruin a great excuse to try out a new browser? <img src='http://www.n8gray.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

<p>As always, editing <span class="caps">CSS </span>has left me annoyed.  I know that it&#8217;s important for <span class="caps">CSS </span>to be easy to parse and apply, but couldn&#8217;t we have simple variables or even functions?  My <span class="caps">CSS </span>is liberally sprinkled with stuff like <code>background-color: #f60;</code> that says nothing about what the design intent of <code>#f60</code> is.  This from the organization that stresses separation of semantics from presentation?  Imagine instead that I could do something like:</p>



<pre>let border_highlight = #f60
let button_hover = #f60
...
.somebox { border: 1px solid border_highlight }
.somebutton:hover { background-color: button_hover }</pre>



<p>Now if I want to change the border highlight but not the hover color it&#8217;s simple, and there&#8217;s no worries about accidental search/replace errors.  The argument for functions is similar.  If you want to define a bunch of related classes multiple times but with slightly different parameters, you end up defining one set, then overriding values to define the second, again for the third, and so on.  It would be much cleaner <span class="caps">IMHO </span>to be able to define a function to generate these classes and then invoke the function several times.  Possibly not a big win in terms of lines of code, but I think it would be easier to maintain.</p>

<p>It is, of course, possible to use the C pre-processor <code>cpp</code> with <span class="caps">CSS, </span>so that might be a way for me to get my wish, but I&#8217;m reluctant to add a compilation step into my already awkward web-development process.  (Speaking of which, <a href="http://www.css3.info/preview/">css3.info</a>, <a href="http://code.google.com/p/macfuse/">MacFuse</a>, <a href="http://www.sccs.swarthmore.edu/users/08/mgorbach/MacFusionWeb/">MacFusion</a> and <a href="http://fuse.sourceforge.net/sshfs.html"><span class="caps">SSHFS</span></a> rock!)</p>

<p>So anyway, enjoy the bling, variables are good, functions are great.</p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2007/12/21/just-in-time-for-christmas-bling/feed/</wfw:commentRss>
		</item>
		<item>
		<title>QLColorCode 0.2 0.3</title>
		<link>http://www.n8gray.org/blog/2007/12/16/qlcolorcode-02-03/</link>
		<comments>http://www.n8gray.org/blog/2007/12/16/qlcolorcode-02-03/#comments</comments>
		<pubDate>Sun, 16 Dec 2007 19:51:35 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[QLColorCode]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2007/12/16/qlcolorcode-02-03/</guid>
		<description><![CDATA[There&#8217;s a new QLColorCode out.  Two actually!  Soon after releasing 0.2 I found a few annoying problems so I went ahead and released 0.3.

Thumbnailing  is supported now, and the syntax highlighting engine has changed from Pygments to Highlight, mainly because it&#8217;s about 10x faster but also because it covers more languages.  [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a new <a href="http://www.n8gray.org/blog/2007/12/03/announcing-qlcolorcode/"><span class="caps">QLC</span>olorCode</a> out.  Two actually!  Soon after releasing 0.2 I found a few annoying problems so I went ahead and released 0.3.</p>

<p>Thumbnailing <a class="imagelink" href="http://www.n8gray.org/wp-content/uploads/2007/12/thumbnailshot-02.png" title="Thumbnails!"><img id="image157" src="http://www.n8gray.org/wp-content/uploads/2007/12/thumbnailshot-02.thumbnail.png" alt="Thumbnails!" style="float:right; margin: 10px;" /></a> is supported now, and the syntax highlighting engine has changed from <a href="http://pygments.org">Pygments</a> to <a href="http://www.andre-simon.de/index.html">Highlight</a>, mainly because it&#8217;s about 10x faster but also because it covers more languages.  It also has an <code>ide-xcode</code> theme that does a pretty decent job of imitating Xcode&#8217;s default colors!</p>

<p>Get it at <a href="http://code.google.com/p/qlcolorcode/">the Goog</a>.</p>

<div align="center"><img id="image155" src="http://www.n8gray.org/wp-content/uploads/2007/12/previewshot-02.png" alt="The preview window." /></div>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2007/12/16/qlcolorcode-02-03/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Announcing QLColorCode</title>
		<link>http://www.n8gray.org/blog/2007/12/03/announcing-qlcolorcode/</link>
		<comments>http://www.n8gray.org/blog/2007/12/03/announcing-qlcolorcode/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 00:11:50 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Hacking]]></category>

		<category><![CDATA[OS X]]></category>

		<category><![CDATA[QLColorCode]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2007/12/03/announcing-qlcolorcode/</guid>
		<description><![CDATA[One of the features I&#8217;ve really liked in Leopard has been Quick Look.  It&#8217;s a really nice way to browse files quickly, without opening up a bunch of random apps.  However, the QL plugin that Apple provides for reading source code is, well, just plain boring.  You just get the text, in [...]]]></description>
			<content:encoded><![CDATA[<p>One of the features I&#8217;ve really liked in Leopard has been Quick Look.  It&#8217;s a really nice way to browse files quickly, without opening up a bunch of random apps.  However, the QL plugin that Apple provides for reading source code is, well, just plain boring.  You just get the text, in black &#038; white.  We all know how nice syntax highlighting is, so why didn&#8217;t they give us some of that?</p>

<p>Well, it turns out to be trivially easy to do a QL plugin that renders <span class="caps">HTML. </span> Mix in <a href="http://pygments.org/">Pygments</a>, the very capable syntax highlighting engine that can output <span class="caps">HTML, </span>and you&#8217;ve got a syntax highlighting QL plugin in under 100 lines of code!</p>

<p><img id="image153" src="http://www.n8gray.org/wp-content/uploads/2007/12/qlcolorcodeminisnapshot.png" alt="A Small Snapshot of QLColorCode" /></p>

<p>Rather than host this project myself I&#8217;ve decided to try making a Google Code project.  You can find it here:</p>

<p><a href="http://code.google.com/p/qlcolorcode/">http://code.google.com/p/qlcolorcode/</a></p>

<p>Enjoy!</p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2007/12/03/announcing-qlcolorcode/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fixed-Misc 13px</title>
		<link>http://www.n8gray.org/blog/2007/11/12/fixed-misc-13px/</link>
		<comments>http://www.n8gray.org/blog/2007/11/12/fixed-misc-13px/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 02:54:07 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2007/11/12/fixed-misc-13px/</guid>
		<description><![CDATA[Call me old-fashioned, but I really like the Fixed-Misc font that xterm uses by default.  I like it enough that I want to use it in other contexts, like Terminal.app or JEdit.  After a bit of tinkering in FontForge I managed to convert it to an OS X .dfont file.  It&#8217;s still [...]]]></description>
			<content:encoded><![CDATA[<p>Call me old-fashioned, but I really like the Fixed-Misc font that xterm uses by default.  I like it enough that I want to use it in other contexts, like Terminal.app or JEdit.  After a bit of tinkering in <a href="http://fontforge.sourceforge.net/">FontForge</a> I managed to convert it to an OS X .dfont file.  It&#8217;s still bitmapped, and it only looks good at 7&#215;13 pixels per glyph, but that&#8217;s just fine for my needs.  I&#8217;ve included the oblique and bold variants as well.</p>

<p>Get them <a href="/files/misc/FixedMisc13.zip">here</a>.  The standard disclaimers apply.  They work for me and they validate in Font Book, but I don&#8217;t know squat about fonts and <span class="caps">YMMV.</span></p>

<p>Here&#8217;s a screenshot from JEdit:</p>

<p><a class="imagelink" href="http://www.n8gray.org/wp-content/uploads/2007/11/picture-1.png" title="Fixed-Misc 13 in JEdit"><img id="image151" src="http://www.n8gray.org/wp-content/uploads/2007/11/picture-1.thumbnail.png" alt="Fixed-Misc 13 in JEdit" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2007/11/12/fixed-misc-13px/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Backup Bouncer 0.1.2</title>
		<link>http://www.n8gray.org/blog/2007/11/03/backup-bouncer-012/</link>
		<comments>http://www.n8gray.org/blog/2007/11/03/backup-bouncer-012/#comments</comments>
		<pubDate>Sun, 04 Nov 2007 05:58:04 +0000</pubDate>
		<dc:creator>n8</dc:creator>
		
		<category><![CDATA[Backup-Bouncer]]></category>

		<guid isPermaLink="false">http://www.n8gray.org/blog/2007/11/03/backup-bouncer-012/</guid>
		<description><![CDATA[Hi folks,

I just uploaded Backup Bouncer 0.1.2 for your backup-tool-testing pleasure.  Get it at the usual place.  Not a whole lot has changed, but there&#8217;s a fix to extended attribute handling that solves some problems in Leopard.  Andreas Fuchs provided a patch for this and also mentioned that SuperDuper can&#8217;t handle dangling [...]]]></description>
			<content:encoded><![CDATA[<p>Hi folks,</p>

<p>I just uploaded Backup Bouncer 0.1.2 for your backup-tool-testing pleasure.  Get it at <a href="http://www.n8gray.org/code/backup-bouncer/">the usual place</a>.  Not a whole lot has changed, but there&#8217;s a fix to extended attribute handling that solves some problems in Leopard.  Andreas Fuchs provided a patch for this and also mentioned that SuperDuper can&#8217;t handle dangling symlinks!  I haven&#8217;t verified this, but if it&#8217;s true it&#8217;s a pretty huge failure for an otherwise excellent tool.  In any case, I added a case to the symlink test to check for it.</p>

<p>I&#8217;ve also added a check for extended attributes on symlinks.  This is pretty obscure, but a well-written tool shouldn&#8217;t care, since the extended attribute support would be orthogonal to the file type.  If your favorite tool fails that test I wouldn&#8217;t worry about it <strong>too</strong> much, but you might want to file a bug report.</p>

<p>In related news, I read a while back that Apple was using xar for packaging in Leopard.  After installing Leopard on my own machine I was a bit disappointed to find that Apple has installed xar 1.4, which does <strong>not</strong> do a good job of preserving metadata:</p>



<pre>------------------ xar ------------------
Verifying:    basic-permissions ... ok
Verifying:           timestamps ...
   Sub-test:    modification time ... ok
ok
Verifying:             symlinks ... ok
Verifying:    symlink-ownership ... FAIL
Verifying:            hardlinks ... ok
Verifying:       resource-forks ... ok
Verifying:         finder-flags ... ok
Verifying:         finder-locks ... FAIL
Verifying:        creation-date ... FAIL
Verifying:            bsd-flags ... ok
Verifying:       extended-attrs ...
   Sub-test:             on files ... FAIL
   Sub-test:       on directories ... FAIL
   Sub-test:          on symlinks ... FAIL
FAIL
Verifying: access-control-lists ...
   Sub-test:             on files ... FAIL
   Sub-test:              on dirs ... FAIL
FAIL
Verifying:                 fifo ... FAIL
Verifying:              devices ... FAIL
Verifying:          combo-tests ...
   Sub-test:  xattrs + rsrc forks ... FAIL
   Sub-test:     lots of metadata ... FAIL
FAIL
</pre>



<p>This is a crying shame, since xar 1.5 and later do a <strong>great</strong> job.  Hopefully people won&#8217;t pass judgment on xar based on the version shipped with Leopard.</p>

<p>On the other hand, rsync seems to have improved in Leopard:</p>



<pre>------------------ rsync-apple ------------------
Verifying:    basic-permissions ... ok
Verifying:           timestamps ...
   Sub-test:    modification time ... ok
ok
Verifying:             symlinks ... ok
Verifying:    symlink-ownership ... ok
Verifying:            hardlinks ... ok
Verifying:       resource-forks ... ok
Verifying:         finder-flags ... ok
Verifying:         finder-locks ... FAIL
Verifying:        creation-date ... FAIL
Verifying:            bsd-flags ... ok
Verifying:       extended-attrs ...
   Sub-test:             on files ... ok
   Sub-test:       on directories ... ok
   Sub-test:          on symlinks ... FAIL
FAIL
Verifying: access-control-lists ...
   Sub-test:             on files ... ok
   Sub-test:              on dirs ... ok
ok
Verifying:                 fifo ... ok
Verifying:              devices ... ok
Verifying:          combo-tests ...
   Sub-test:  xattrs + rsrc forks ... ok
   Sub-test:     lots of metadata ... ok
ok
</pre>]]></content:encoded>
			<wfw:commentRss>http://www.n8gray.org/blog/2007/11/03/backup-bouncer-012/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
