<?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>Postpostmodern</title>
	<atom:link href="http://postpostmodern.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://postpostmodern.com</link>
	<description>Speaking of web development.</description>
	<pubDate>Tue, 06 Jan 2009 22:08:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Global AJAX Cursor Change</title>
		<link>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Finstructional%2Fglobal-ajax-cursor-change%2F&amp;seed_title=Global+AJAX+Cursor+Change</link>
		<comments>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Finstructional%2Fglobal-ajax-cursor-change%2F&amp;seed_title=Global+AJAX+Cursor+Change#comments</comments>
		<pubDate>Tue, 06 Jan 2009 22:08:54 +0000</pubDate>
		<dc:creator>Jason Johnson</dc:creator>
		
		<category><![CDATA[Instructional]]></category>

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

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

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

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

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

		<guid isPermaLink="false">http://postpostmodern.com/?p=290</guid>
		<description><![CDATA[Two snippets to let users know when your web app is busy AJAXing.]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know if I&#8217;ve ever mentioned this before, but in case I haven&#8217;t:</p>

<h2>Something to this effect should be used on all AJAX web pages:</h2>

<pre><code lang="javascript">function globalAjaxCursorChange() 
  {
    $("body").bind("ajaxSend", function(){
       $(this).addClass('busy');
     }).bind("ajaxComplete", function(){
       $(this).removeClass('busy');
     });
  }</code></pre>

<p>Along with:</p>

<pre><code lang="css">body.busy * {
  cursor: wait !important;
}</code></pre>

<p>The javascript above is jQuery, but I used to do the same type of thing back when I used Prototype.</p>

<p>Developers sometimes go to great lengths to supplement the native behavior of a system with custom &#8216;busy&#8217; indicators. And that&#8217;s great, but don&#8217;t forget what&#8217;s built-in. Users instinctively know that something&#8217;s working when they see the old hourglass/watch cursor.</p>
]]></content:encoded>
			<wfw:commentRss>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Finstructional%2Fglobal-ajax-cursor-change%2F&amp;seed_title=Global+AJAX+Cursor+Change/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Leopard-Style iTerm Icon, Take 2</title>
		<link>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Fdownloadable%2Fleopard-style-iterm-icon-take-2%2F&amp;seed_title=Leopard-Style+iTerm+Icon%2C+Take+2</link>
		<comments>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Fdownloadable%2Fleopard-style-iterm-icon-take-2%2F&amp;seed_title=Leopard-Style+iTerm+Icon%2C+Take+2#comments</comments>
		<pubDate>Fri, 19 Dec 2008 01:56:11 +0000</pubDate>
		<dc:creator>Jason Johnson</dc:creator>
		
		<category><![CDATA[Downloadable]]></category>

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

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

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

		<guid isPermaLink="false">http://postpostmodern.com/?p=279</guid>
		<description><![CDATA[The newer, bluer version of the iTerm icon.]]></description>
			<content:encoded><![CDATA[<p>Several days ago, I <a href="http://postpostmodern.com/downloadable/leopard-style-iterm-icon/">posted a suggestion for a new icon</a> for <a href="http://iterm.sourceforge.net/">iTerm</a>, a terminal app that many developers prefer over the standard Terminal app. The first version was just a few standard Leopard icons thrown together. A few days later, I updated the icon with a more balanced, albeit less-colorful, version featuring a vectory globe.</p>

<p>At the developers&#8217; request, I have updated it once again. The color has been brought back to the globe, and the smaller versions (32px and 16px) have been simplified a bit for a cleaner appearance. I encourage you to try the new version. You can click it to download the .icns file, which may be placed inside iTerm.app/Contents/Resources. Enjoy.</p>

<p><a class="img" href="/wp-content/media/iterm.icns"><img src="/wp-content/media/iterm.png" alt="iTerm Icon" title="iTerm icon" width="128" height="128" class="size-medium wp-image-286" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Fdownloadable%2Fleopard-style-iterm-icon-take-2%2F&amp;seed_title=Leopard-Style+iTerm+Icon%2C+Take+2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Leopard-Style iTerm Icon</title>
		<link>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Fdownloadable%2Fleopard-style-iterm-icon%2F&amp;seed_title=Leopard-Style+iTerm+Icon</link>
		<comments>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Fdownloadable%2Fleopard-style-iterm-icon%2F&amp;seed_title=Leopard-Style+iTerm+Icon#comments</comments>
		<pubDate>Sat, 06 Dec 2008 03:28:12 +0000</pubDate>
		<dc:creator>Jason Johnson</dc:creator>
		
		<category><![CDATA[Downloadable]]></category>

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

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

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

		<guid isPermaLink="false">http://postpostmodern.com/?p=251</guid>
		<description><![CDATA[An updated, Leopard-style icon for iTerm.]]></description>
			<content:encoded><![CDATA[<div style="padding: 10px 15px; background: #EBC29A; border: double 3px #CE6701;">This article has been superceded. <a href="http://postpostmodern.com/downloadable/leopard-style-iterm-icon-take-2/">See here.</a></div>

<p><a href="http://postpostmodern.com/editorial/more-usable-mac-finder-toolbar/">Speaking</a> of <a href="http://iterm.sourceforge.net/">iTerm</a>, isn&#8217;t it about time we had an updated icon? I&#8217;ve cobbled one together using bits of the Terminal icon with elements from the previous iTerm icons. Not exactly original. Same concept as the old icon. It&#8217;s just more Leopardy now. <del datetime="2008-12-08T21:14:13+00:00">Click it to download the .icns file.</del> <em>I recommend downloading the revised version below.</em></p>

<p><a href="/wp-content/media/iterm-old.icns" class="img" title="Download .icns file"><img src="/wp-content/media/iterm-128.png" alt="iTerm Icon"  width="128" height="128" class="size-medium wp-image-252" /></a></p>

<p>Let me know what you think.</p>

<ins>
<h2>Update – Dec 7</h2>
<p>Here is an updated version that&#8217;s a little more balanced, and looks better at small sizes. Click it to download the .icns file.</p>
<p><a class="img" href="/wp-content/media/iterm-gray.icns"><img src="/wp-content/media/iterm-gray.png" alt="Gray iTerm Icon" title="iterm-gray" width="128" height="128" class="size-medium wp-image-281" /></a></p>
</ins>
]]></content:encoded>
			<wfw:commentRss>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Fdownloadable%2Fleopard-style-iterm-icon%2F&amp;seed_title=Leopard-Style+iTerm+Icon/feed/</wfw:commentRss>
		</item>
		<item>
		<title>More Usable Mac: Finder Toolbar</title>
		<link>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Feditorial%2Fmore-usable-mac-finder-toolbar%2F&amp;seed_title=More+Usable+Mac%3A+Finder+Toolbar</link>
		<comments>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Feditorial%2Fmore-usable-mac-finder-toolbar%2F&amp;seed_title=More+Usable+Mac%3A+Finder+Toolbar#comments</comments>
		<pubDate>Fri, 05 Dec 2008 22:29:31 +0000</pubDate>
		<dc:creator>Jason Johnson</dc:creator>
		
		<category><![CDATA[Editorial]]></category>

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

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

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

		<guid isPermaLink="false">http://postpostmodern.com/?p=235</guid>
		<description><![CDATA[I find it useful to keep a few extra items in my Finder toolbar.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been meaning to write a few short posts about how I use my Mac. I think it would be helpful for everyone if we knew more about the way others work. This is the first. Please share your tips in the comments.</p>

<h2>What&#8217;s in your Finder toolbar?</h2>

<p>I find it useful to keep a few extra items in my Finder toolbar. Anything to which you would drag files and folders would be appropriate to put in your Finder toolbar. Here&#8217;s mine:</p>

<p><a href="/wp-content/media/finder-toolbar.jpg" class="img"><img src="/wp-content/media/finder-toolbar-502x152.jpg" alt="Finder Toolbar" title="finder-toolbar" width="502" height="152" class="size-medium wp-image-239" /></a></p>

<h3>From left to right:</h3>

<ol>
<li><strong>Path Button</strong> is one of those buttons that is not in the default set. It&#8217;s pretty handy, though. You can click it to see a list of the parent folders for upward navigation. <em>I&#8217;ve recently discovered you can get the same functionality by right-clicking on the name of the folder in the title bar. So, I might remove the path button.</em></li>
<li><strong>CleanArchiver</strong> is an essential app for creating clean zip (or gzip, bzip, Disk Image, etc) files without the pesky .DS_Store files. Every time I need to send a zip file to a Windows user, I just drag the file to this icon. You can find CleanArchiver at <a href="http://www.sopht.jp/cleanarchiver/">Sopht Square</a>.</li>
<li><strong>TextMate</strong>, everybody&#8217;s favorite text editor, is handy to have here because you can drag a folder to open a project.</li>
<li><strong>Transmit</strong> is a nice SFTP app that has a feature called &#8216;Dock Send&#8217; which allows you to upload files to certain places based on the location of the file on your computer. Just drag the file to its dock icon (or, in this case, it&#8217;s toolbar icon).</li>
<li><strong>Transmit Droplets</strong> allow you to upload files to a specific server directory.</li>
<li><strong>AppZapper</strong> is a popular app for removing applications including all related files. </li>
</ol>

<p>That&#8217;s about it for my Finder toolbar. <strong><em>What&#8217;s in yours?</em></strong></p>

<ins>
<h2>Update</h2>
<p> I&#8217;ve merged Trey&#8217;s buttons into my toolbar. But, instead of &#8216;Open in Terminal&#8217;, mine is &#8216;Open in iTerm&#8217;, using <a href="http://snippets.dzone.com/posts/show/961">this script</a> and <a href="http://henrik.nyh.se/2007/10/open-terminal-here-and-glob-select-in-leopard-finder">henrik&#8217;s icon</a>.</p>
<p>I should also mention that I keep a divider between any icons to which I drag files/folders so I don&#8217;t accidentally drop on the wrong icon. And AppZapper stays well away from everything else.</p>
<h3>The Result:</h3>
<p><a href="/wp-content/media/finder-toolbar-v2.jpg" class="img"><img src="/wp-content/media/finder-toolbar-v2-501x59.jpg" alt="Finder Toolbar v2" title="finder-toolbar-v2" width="440" class="size-medium wp-image-245" /></a></p>
</ins>
]]></content:encoded>
			<wfw:commentRss>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Feditorial%2Fmore-usable-mac-finder-toolbar%2F&amp;seed_title=More+Usable+Mac%3A+Finder+Toolbar/feed/</wfw:commentRss>
		</item>
		<item>
		<title>No Multiple-Class Support in IE6</title>
		<link>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Feditorial%2Fno-multiple-class-support-in-ie6%2F&amp;seed_title=No+Multiple-Class+Support+in+IE6</link>
		<comments>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Feditorial%2Fno-multiple-class-support-in-ie6%2F&amp;seed_title=No+Multiple-Class+Support+in+IE6#comments</comments>
		<pubDate>Wed, 19 Nov 2008 00:42:34 +0000</pubDate>
		<dc:creator>Jason Johnson</dc:creator>
		
		<category><![CDATA[Editorial]]></category>

		<category><![CDATA[IE6 CSS Bugs]]></category>

		<guid isPermaLink="false">http://postpostmodern.com/?p=231</guid>
		<description><![CDATA[IE6 doesn't respond to multiple class selectors.]]></description>
			<content:encoded><![CDATA[<p>IE6 was mean to me again today.</p>

<p>For the past few years, I haven&#8217;t had too much trouble out of IE &#8212; only because I&#8217;ve become familiar with its quirks. I know that floats need <strong>display: inline</strong> to fix the margins, <strong>position: relative</strong> or <strong>zoom: 1</strong> needs to be added to misbehaving elements to trigger hasLayout, and <strong>height: 1%</strong> will make boxes stretch to contain their floated children. That&#8217;ll fix IE6 90% of the time. But today, I struggled with something I hadn&#8217;t run into before: <a href="http://www.quirksmode.org/bugreports/archives/2004/12/IE_CSS_rendering_bug_with_multiple_classnames.html">Lack of Multiple Class Support</a></p>

<p>I was trying to reference elements with multiple classes in my CSS:</p>

<pre><code lang="css">.aside.login {
  properties: values;
  ...
}</code></pre>

<p>All the other browsers (including IE7) work with this just fine. IE6, however, only sees one class. I wish I had known about this before I spent most of my afternoon trying to figure out why rules were getting applied to things they shouldn&#8217;t have.</p>
]]></content:encoded>
			<wfw:commentRss>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Feditorial%2Fno-multiple-class-support-in-ie6%2F&amp;seed_title=No+Multiple-Class+Support+in+IE6/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rails Tip: Default Scope</title>
		<link>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Finstructional%2Frails-tip-default-scope%2F&amp;seed_title=Rails+Tip%3A+Default+Scope</link>
		<comments>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Finstructional%2Frails-tip-default-scope%2F&amp;seed_title=Rails+Tip%3A+Default+Scope#comments</comments>
		<pubDate>Tue, 04 Nov 2008 16:27:30 +0000</pubDate>
		<dc:creator>Jason Johnson</dc:creator>
		
		<category><![CDATA[Instructional]]></category>

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

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

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

		<guid isPermaLink="false">http://postpostmodern.com/?p=221</guid>
		<description><![CDATA[An easy way to designate default options for find(:all)]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started using the <a href="http://www.railsbrain.com/api/rails-2.1.2/doc/index.html?a=M003687&#038;name=all"><strong>all</strong></a> method instead of <strong>find(:all)</strong> for fetching records – mainly because it&#8217;s shorter to type, but it&#8217;s also easy to override with a named scope. Just create a named_scope called <strong>all</strong> to set whatever default conditions and order you want. You can always use <strong>find(:all)</strong> if you want the non-scoped records.</p>

<pre><code lang="ruby">named_scope :all, { 
  :order => 'last_name',
  :conditions => 'activated_at IS NOT NULL'
}</code></pre>

<p>Thoughts, corrections and objections welcome in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Finstructional%2Frails-tip-default-scope%2F&amp;seed_title=Rails+Tip%3A+Default+Scope/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Smarter MAMP</title>
		<link>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Finstructional%2Fa-smarter-mamp%2F&amp;seed_title=A+Smarter+MAMP</link>
		<comments>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Finstructional%2Fa-smarter-mamp%2F&amp;seed_title=A+Smarter+MAMP#comments</comments>
		<pubDate>Wed, 22 Oct 2008 16:08:44 +0000</pubDate>
		<dc:creator>Jason Johnson</dc:creator>
		
		<category><![CDATA[Instructional]]></category>

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

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

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

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

		<guid isPermaLink="false">http://postpostmodern.com/?p=170</guid>
		<description><![CDATA[Create a whole new site on your Mac just by creating a new folder thanks to BIND and Apache's dynamic virtual hosts.]]></description>
			<content:encoded><![CDATA[<p>This past weekend, I was cleaning up my ~/Sites folder, and I started thinking, &#8220;There&#8217;s got to be a better way!&#8221; And I wasn&#8217;t referring to <a href="http://www.adultswim.com/video/?episodeID=8a25c3921a8130c6011a8249afab001b">baby hammock</a>. I was talking about having to set up all those virtual hosts and whatnot. Well, a little research quickly brought me to the <em>&#8220;how did I not know this before?!&#8221;</em> point. And now, I will share it with you.</p>

<p>(Editor&#8217;s Note: <em>This article turned out to be a little longer than I expected. The whole process is really quite simple. It should only take about 10 minutes, at the most.</em>)</p>

<p>The first thing I didn&#8217;t realize is that Apache supports something called dynamic virtual hosts. That means you don&#8217;t have to create a virtual host in your conf files and restart Apache every time you want to create a new site. This is incredibly handy for development. Combine that with a real DNS server (BIND), and you have a much smarter system. I can now create a whole new site on my MacBook just by creating a new folder! Much simpler than the old way.</p>

<h2>The Old Way?</h2>

<p>To put this in context, let&#8217;s quickly review the old way. For years, I&#8217;ve developed websites on Mac OS X using the standard &#8216;MAMP&#8217; setup: Mac/Apache/MySQL/PHP. When starting a new site, the first thing I do is set up a virtual host for Apache. If you&#8217;re like me, you know this as a 4-step process:</p>

<ol>
<li>Create a directory for the site&#8217;s files. Something like:
<kbd>mkdir -p ~/Sites/domain.com/public</kbd></li>
<li>Create a line in /etc/hosts for the domain:
<kbd>127.0.0.1 domain.dev</kbd></li>
<li>Add a few lines to my Apache conf file to configure the virtual host:
<pre><code lang="conf">&lt;VirtualHost *&gt;
    ServerName domain.dev
    DocumentRoot /Users/jason/Sites/domain.com/public
&lt;/VirtualHost&gt;
</code></pre>
</li>
<li>Restart Apache:
<kbd>sudo apachectl graceful</kbd>
</li>
</ol>

<h2>The New Way!</h2>

<ol>
<li>Create a directory for the site&#8217;s files. Something like:
<kbd>mkdir -p ~/Sites/domain.com/public</kbd></li>
</ol>

<p>Done.</p>

<p>Not only that, but I also decided to set up a few TLDs to separate my sites. I use <strong>.ppm</strong> for my personal and freelance sites, <strong>.dev</strong> for my experimental stuff, and <strong>.bsi</strong> for my company work. This allows me to separate sites like so:</p>

<pre><code>Sites
|-- bsi
|   |-- this
|   |-- that
|   `-- theother
|-- dev
|   |-- experiment1
|   |-- experiment2
|   |-- youget
|   `-- thepoint
`-- ppm
    |-- postpostmodern
    `-- littlebeestudio</code></pre>

<p>These would be:</p>

<ul>
<li>this.bsi</li>
<li>that.bsi</li>
<li>theother.bsi</li>
<li>postpostmodern.ppm</li>
<li>littlebeestudio.ppm</li>
<li>experiment1.dev</li>
<li>experiment2.dev</li>
<li>youget.dev</li>
<li>thepoint.dev</li>
</ul>

<h2>First, let&#8217;s talk about the hosts file.</h2>

<p>The first thing you need for an Apache virtual host is a unique hostname. As can be seen in step 2, above, this is usually accomplished via the /etc/hosts file. The only problem is the hosts file doesn&#8217;t support any wildcards. So, you can&#8217;t say:</p>

<pre><code>127.0.0.1    *.dev</code></pre>

<p>Instead, you have to have this:</p>

<pre><code>127.0.0.1    postpostmodern.dev
127.0.0.1    littlebeestudio.dev
...
...</code></pre>

<p>&#8230;and eventually, you end up with a hosts file a mile long.</p>

<h2>Enter BIND — the built-in, but inactive DNS server</h2>

<p><a href="http://en.wikipedia.org/wiki/BIND">BIND (named)</a> comes with Mac OS X. We just need to configure it and turn it on.</p>

<p><em>I should mention here that DNS server stuff falls outside of my comfort zone. I just followed a few articles (on <a href="http://www.macosxhints.com/article.php?story=2005110220352084">macosxhints</a> and <a href="http://ubuntuforums.org/showpost.php?p=2220686&#038;postcount=20">Ubuntu Forums</a>) to get this working. I&#8217;m not sure how it impacts the vulnerability of your Mac from a security standpoint.</em> All I know is that it works and provides a few advantages over the hosts file:</p>

<ul>
<li>You can set up TLDs to resolve to your local IP address. So, anything.dev and anything.test will automatically stay local.</li>
<li>Apparently, since BIND will be caching DNS info, it will make web browsing faster. I haven&#8217;t formally tested this, but if it&#8217;s true, it&#8217;s a nice bonus. It does seem a little quicker.</li>
</ul>

<h3>Setting up rndc</h3>

<p>This creates a configuration file and key for rndc, which controls named.</p>

<p>Get into sudo, and make it stick.</p>

<p><kbd>sudo -s</kbd></p>

<p>Generate the conf file.</p>

<p><kbd>rndc-confgen > /etc/rndc.conf</kbd></p>

<p>Copy the key to the key file.</p>

<p><kbd>head -n 6 /etc/rndc.conf > /etc/rndc.key</kbd></p>

<p>Exit sudo.</p>

<p><kbd>exit</kbd></p>

<h3>Creating your DNS zone files</h3>

<p>DNS zones are created via files in /var/named. Create a new file in there called dev.zone and fill it with this:</p>

<pre><code>;
; BIND data file for dev sites
;
$TTL    604800
@       IN      SOA     dev. root.dev. (
                     2008101920         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      dev.
@       IN      A       127.0.0.1
*.dev.  14400   IN      A       127.0.0.1</code></pre>

<p>Repeat the above for each TLD you want to set up, replacing &#8216;dev&#8217; of course.</p>

<h3>Configuring named.conf</h3>

<p>Now, open /etc/named.conf. The first thing you want to do here is to show named where to get its DNS info (for the rest of the internet), i.e. forwarding servers. Let&#8217;s use OpenDNS. Add these lines in the <strong>options</strong> section of named.conf (after &#8216;directory &#8220;/var/named&#8221;;&#8217;):</p>

<pre><code>forwarders {
    208.67.222.222;
    208.67.220.220;
};</code></pre>

<p>Now, we just need to let named know about those zone files we created a minute ago. For each of the zone files, create a section like this:</p>

<pre><code>zone "dev" IN {
  type master;
  file "dev.zone";
};</code></pre>

<p>You&#8217;ll see where to put it. There&#8217;s a &#8216;localhost&#8217; section already there. Just put yours below that.</p>

<h3>Configuring and loading the LaunchDaemon</h3>

<p>Okay. One last thing. Tell Mac OS X to activate named. Open the LaunchDaemon plist file for named (I had to use Textmate because Property List Editor didn&#8217;t let me save a file belonging to root.):</p>

<p><kbd>/System/Library/LaunchDaemons/org.isc.named.plist</kbd></p>

<p>Change &#8216;disabled&#8217; from true to false, and save the file.</p>

<p>Now, load it:</p>

<p><kbd>sudo launchctl load /System/Library/LaunchDaemons/org.isc.named.plist</kbd></p>

<p>If everything went well, your DNS server should be up and running, and your personalized TLDs should resolve to your local machine. Try visiting something.dev and see if it resolves correctly. You might want to comment out all those custom lines from your /etc/hosts file too.</p>

<h2>Now for the Apache Magic!</h2>

<p>Now that the DNS stuff is out of the way, it&#8217;s just a matter of setting that magic directive in your Apache conf file. The directive is called <a href="http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html">VirtualDocumentRoot</a>.</p>

<p>I don&#8217;t know how you have your Apache configured, but personally, I like to keep all of my custom configuration in my own file (the one in /etc/apache2/users). Here is what my /etc/apache2/users/jason.conf file looks like:</p>

<pre><code>DocumentRoot &quot;/Users/jason/Sites/default/public/&quot;

NameVirtualHost 127.0.0.1

&lt;VirtualHost 127.0.0.1&gt;
    VirtualDocumentRoot /Users/jason/Sites/%-1/%-2+/public
&lt;/VirtualHost&gt;</code></pre>

<p>The DocumentRoot directive is for the default site — the site that comes up when you visit http://localhost. The NameVirtualHost should be the reverse IP for your local machine. Finally, the VirtualDocumentRoot is an interpolated path for finding your sites. &#8216;%-1&#8217; means the last part of the domain name (the TLD). &#8216;%-2+&#8217; means everything before that. So, http://example.dev/ would load files from /Users/jason/Sites/dev/example/public. If you want a different scheme, read more about <a href="http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html#interpol">directory name interpolation on Apache&#8217;s web site</a>.</p>

<p>Now, restart Apache!</p>

<p><kbd>sudo apachectl graceful</kbd></p>

<p>You should be good to go!</p>

<p>Please let me know your thoughts and corrections in the comments.</p>

<ins>
<h2>Update – 28 Oct, 2008</h2>
<p>As Brian Toth mentioned in the comments, it&#8217;s probably also necessary to add 127.0.0.1 in your DNS settings in the Network System Pref pane.</p>
</ins>
]]></content:encoded>
			<wfw:commentRss>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Finstructional%2Fa-smarter-mamp%2F&amp;seed_title=A+Smarter+MAMP/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wheels Keep on Spinning ‘Round</title>
		<link>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Finstructional%2Fwheels-keep-on-spinning-round%2F&amp;seed_title=Wheels+Keep+on+Spinning+%E2%80%98Round</link>
		<comments>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Finstructional%2Fwheels-keep-on-spinning-round%2F&amp;seed_title=Wheels+Keep+on+Spinning+%E2%80%98Round#comments</comments>
		<pubDate>Sun, 19 Oct 2008 02:37:52 +0000</pubDate>
		<dc:creator>Jason Johnson</dc:creator>
		
		<category><![CDATA[Instructional]]></category>

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

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

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

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

		<guid isPermaLink="false">http://postpostmodern.com/?p=133</guid>
		<description><![CDATA[Spinning wheels means fun with geometry and ActionScript.]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I was working on a Flash animation for a client. Part of the animation involved an automobile driving over the client&#8217;s product as a display of structural integrity. That meant spinning wheels. That meant a little fun with geometry and ActionScript.</p>

<p>I threw together some ActionScript 2 to rotate the wheels based on the movement of the vehicle. Not sure if it&#8217;s perfect, but it seemed to work okay.</p>

<p>The ActionScript to calculate the rotation of each wheel depends on two formulae:</p>

<div style="margin: 20px 0;">
<p style="text-align: center;"><a href="/wp-content/media/pythagorean_theorem.png" class="img"><img src="/wp-content/media/pythagorean_theorem.png" alt="Pythagorean Theorem" title="Pythagorean Theorem" width="133" height="23" class="size-full wp-image-152" /></a></p>
<p style="text-align: center;"> -and- </p>
<p style="text-align: center;"><a href="http://en.wikipedia.org/wiki/Circumference" class="img"><img src="/wp-content/media/circumference.png" alt="Circumference" title="Circumference" width="133" height="23" class="size-full wp-image-154" /></a></p>
</div>

<p><em>Thanks, Pythagoras and Pi.</em> <strong><em>Thorasandpi.</em></strong></p>

<p>Here is the resulting ActionScript (attached to the wheel movie clip):</p>

<pre><code lang="javascript">
onEnterFrame = function() {

    // _parent is the vehicle clip. It's what's moving.
    // Figure out its x and y coordinates relative to last time.
    dx = _parent._x - this.lastx;
    dy = _parent._y - this.lasty;

    // The sum of the square of the two sides (horiz. and vert. change)
    sum = Math.pow(dx, 2) + Math.pow(dy, 2)

    // The hypotenuse
    dist = Math.sqrt(Math.abs(sum));

    // The direction is determined by whether dx is positive or negative
    dist = dx &lt; 0 ? -1 * dist : dist;

    _rotation = _rotation + ( (360 / (_width * Math.PI) ) * dist );

    // Store the vehicle's x and y coordinates for next time.
    this.lastx = _parent._x;
    this.lasty = _parent._y;

}
</code></pre>

<p>And here is an example:</p>

<div id="wheel" style="border: solid 2px #CECCC7; width: 490px; margin: 10px auto;">This Flash animation requires Javascript and Flash 9.</div>

<script type="text/javascript" charset="utf-8">
  var so_wheel = new SWFObject("/wp-content/media/wheeltest.swf", "flash-wheel", "490", "250",  "9", "#EFEDE6");
  so_wheel.write('wheel');
</script>

<p>I&#8217;m sure this is basic stuff for most ActionScript people, but I don&#8217;t work with it that often. Sometimes I wish I did. I&#8217;ve always loved geometry, and I know there are all kinds of fun puzzles like this when you combine animation with math. Ah well&#8230; just not enough hours in the day.</p>
]]></content:encoded>
			<wfw:commentRss>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Finstructional%2Fwheels-keep-on-spinning-round%2F&amp;seed_title=Wheels+Keep+on+Spinning+%E2%80%98Round/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New Skin for the Old Blogish</title>
		<link>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Feditorial%2Fnew-skin-for-the-old-blogish%2F&amp;seed_title=New+Skin+for+the+Old+Blogish</link>
		<comments>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Feditorial%2Fnew-skin-for-the-old-blogish%2F&amp;seed_title=New+Skin+for+the+Old+Blogish#comments</comments>
		<pubDate>Tue, 07 Oct 2008 19:24:31 +0000</pubDate>
		<dc:creator>Jason Johnson</dc:creator>
		
		<category><![CDATA[Editorial]]></category>

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

		<guid isPermaLink="false">http://postpostmodern.com/?p=107</guid>
		<description><![CDATA[This blogish is finally back online after an extended period of http silence.]]></description>
			<content:encoded><![CDATA[<p>This blogish is finally back online after an extended period of http silence. I took it down because I was tired of looking at a half-assed site hacked together with a stock WordPress theme and disorganized content.</p>

<h2>So, how is this any better?</h2>

<p>Well, for starters, there is no white. How is that better? Well&#8230; it just&#8230; it just is. Secondly, I&#8217;ve removed a lot of the old posts that were completely useless. I&#8217;ve also put together this here design from scratch. So, I have a little more control over the layout and the markup. It&#8217;s still a WordPress theme, which is a little limiting, but I&#8217;m slowly learning to bend it to my will.</p>

<h2>Why are the articles here so old?</h2>

<p>All of the articles prior to this one are from the old blog to which I hadn&#8217;t posted in over a year. But there is plenty of fresh content on the way. I have been maintaining a list of articles I plan to write. I&#8217;ll also be writing about the <a href="http://github.com/postpostmodern/">Github projects and scripts to which I&#8217;m slowly adding</a>.</p>

<h2>Some stuff doesn&#8217;t seem to work.</h2>

<p>It&#8217;s sort of a work-in-progress. There are probably some broken links and possibly some bugs. If you find anything, just let me know in the comments below.</p>

<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Feditorial%2Fnew-skin-for-the-old-blogish%2F&amp;seed_title=New+Skin+for+the+Old+Blogish/feed/</wfw:commentRss>
		</item>
		<item>
		<title>We Are Living in the Future</title>
		<link>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Feditorial%2Fwe-are-living-in-the-future%2F&amp;seed_title=We+Are+Living+in+the+Future</link>
		<comments>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Feditorial%2Fwe-are-living-in-the-future%2F&amp;seed_title=We+Are+Living+in+the+Future#comments</comments>
		<pubDate>Wed, 10 Jan 2007 03:38:19 +0000</pubDate>
		<dc:creator>Jason Johnson</dc:creator>
		
		<category><![CDATA[Editorial]]></category>

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

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

		<guid isPermaLink="false">http://blog.postpostmodern.com/2007/01/09/we-are-living-in-the-future/</guid>
		<description><![CDATA[Initial thoughts on the iPhone]]></description>
			<content:encoded><![CDATA[<blockquote><p>&#8230;tell you how I know.<br />
I read it in the paper<br />
15 years ago.<br />
<cite>John Prine</cite>
</p></blockquote>
<p>I try not to get to obsessive about techy gadgets, but man, that <a href="http://www.apple.com/iphone/">iPhone</a> is just brilliant &#8212; and not as much for what it does, but for how it works. It&#8217;s like those seamless, intuitive, nice-to-look-at interfaces that futuristic sci-fi movie makers design, but that electronics companies never seem to be able to make.<sup><a href="#footnote-1-47" id="footnote-link-1-47" title="See the footnote.">1</a></sup> </p>
<p>
<ol class="footnotes">
<li id="footnote-1-47">That&#8217;s what frustrates me about most electronics companies (and most companies in general): they&#8217;re not really trying to innovate; they&#8217;re just hacking together stuff. Movie makers design cool gadgets because those gadgets are based on how they look and feel; not the underlying electronics and technology. Real-life technology companies, on the other hand, have their engineers put together some electronic components. Then, a programmer builds software on top of that. Then a crappy UI gets designed. Finally, it&#8217;s all just thrown together as cheaply as possible into a plastic box that&#8217;s designed to be easy to manufacture. So, you get a mediocre device that was designed from the <em>wrong direction</em> by a bunch of engineers/designers/etc.</p>
<p>Some of those tradespeople may have been able to do some great things if their role in the design process wasn&#8217;t so limited by every other part of the process. Picture 25 people all holding a pencil above a piece of paper. It&#8217;s only one pencil and everyone has a firm grip on it, so they all have to move in the same direction. Think about how hard it would be to draw something creative when you have to completely coordinate every movement with 24 other people. Even if each person was a fantastic artist, you&#8217;d be lucky to get a simple smiley face on that piece of paper. It&#8217;s like the old &#8220;weakest link in the chain&#8221; scenario, except exponentially worse because the limitations of each member are compounded. So, when an electronics company manages to create even the slightest improvement (the equivalent of eyebrows on the aforementioned smiley face), it&#8217;s considered a &#8220;groundbreaking innovation.&#8221; Nobody seems to care that they&#8217;re just squeezing a little more paint out of the same old tube.</p>
<p>So, why this creative gridlock? It seems to me that there are two types of technology companies: The first being the type that have lots of money and resources for product development and marketing, but are <a href="http://moishelettvin.blogspot.com/2006/11/windows-shutdown-crapfest.html">stymied by big committees and giant development teams</a>. The second being the type of company that has great ideas but much more limited resources. (I remember seeing info on the <a href="http://www.artlebedev.com/everything/optimus/">Optimus Keyboard</a> over a year ago, and it still hasn&#8217;t made it to market.)</p>
<p>I think the big companies think that larger development teams mean more-bigger-better ideas. When, in fact, big development teams usually handicap the brightest minds. Democratic teamwork is crippling. The only way you can take advantage of a large group of minds is to have one genius overseeing the whole thing, cherry picking the best ideas and integrating them into a single, brilliant, focused vision.</p>
<p>Apple is one of the few companies that I know of which has the resources to produce expensive things, yet is able to rest its fate in the hands (and minds) of a tiny handful of <a href="http://en.wikipedia.org/wiki/Jonathan_Ive">brilliant</a> <a href="http://en.wikipedia.org/wiki/Steve_Jobs">people</a>. I just hope there is always at least one company like Apple to lead us into the technological future.  <a href="#footnote-link-1-47">&#8593; back up there</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://postpostmodern.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fpostpostmodern.com%2Feditorial%2Fwe-are-living-in-the-future%2F&amp;seed_title=We+Are+Living+in+the+Future/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
