<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.7" -->
<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/"
	>

<channel>
	<title>collectivity</title>
	<link>http://collectivity.goof.com</link>
	<description>a modern day renaissance man's thoughts on many things</description>
	<pubDate>Wed, 28 Nov 2007 04:13:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.7</generator>
	<language>en</language>
			<item>
		<title>Select Mail.app sender from iCal Invitations/Responses</title>
		<link>http://collectivity.goof.com/articles/2007/11/27/select-mailapp-sender-from-ical-invitationsresponses/</link>
		<comments>http://collectivity.goof.com/articles/2007/11/27/select-mailapp-sender-from-ical-invitationsresponses/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 04:03:40 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category>Mac OS X</category>

		<category>Software</category>

		<guid isPermaLink="false">http://collectivity.goof.com/articles/2007/11/27/select-mailapp-sender-from-ical-invitationsresponses/</guid>
		<description><![CDATA[One thing that irks me about the iCal.app / Mail.app integration on OS X is that it chooses (based on some unknown criteria) without user input the sending address (and hence account) from which to email invitations and responses to invitations.
Since I have multiple calendars and multiple email accounts, it is often that I want [...]]]></description>
			<content:encoded><![CDATA[<p>One thing that irks me about the iCal.app / Mail.app integration on OS X is that it chooses (based on some unknown criteria) without user input the sending address (and hence account) from which to email invitations and responses to invitations.</p>
<p>Since I have multiple calendars and multiple email accounts, it is often that I want to choose the specific account when sending an invitation or reply to an invitation.  <a title="Leopard iCal Select Sender 20071127" href="http://www.goof.com/~mmead/LeopardiCalSelectSender-20071127.tar">This tar file</a> contains the AppleScript changes necessary to create a selection box prior to sending these emails.  Once a sending address is selected and OK is clicked, Mail.app will proceed with sending the iCal invitation or reply from the account corresponding to the email address.</p>
<p>To use this, follow these instructions:</p>
<p>Quit iCal!</p>
<p>Backup iCal.app!</p>
<ul>
<pre>mkdir ~/Desktop/LeopardiCalBackup</pre>
<pre>sudo rsync -Eav --delete /Applications/iCal.app ~/Desktop/LeopardiCalBackup</pre>
<pre>sudo hdiutil create -format UDRO -srcfolder ~/Desktop/LeopardiCalBackup -volname LeopardiCalBackup ~/Desktop/LeopardiCalBackup.dmg</pre>
<pre>sudo rm -rf ~/Desktop/LeopardiCalBackup/</pre>
</ul>
<p>Copy the dmg file somewhere safe.</p>
<p>Extract the modified AppleScript files:</p>
<p>(assumes iCal.app is in /Applications and LeopardiCalSelectSender-20071127.tar is in ~/Desktop)</p>
<ul>
<pre>cd /Applications</pre>
<pre>tar xvf ~/Desktop/LeopardiCalSelectSender-20071127.tar</pre>
</ul>
<p>Run iCal.app, send an invitation and reply to one, test out the ability to select the sender for the Mail.app outgoing email.
</p>
]]></content:encoded>
			<wfw:commentRss>http://collectivity.goof.com/articles/2007/11/27/select-mailapp-sender-from-ical-invitationsresponses/feed/</wfw:commentRss>
		</item>
		<item>
		<title>new photography post-processing workflow</title>
		<link>http://collectivity.goof.com/articles/2007/05/18/new-photography-post-processing-workflow/</link>
		<comments>http://collectivity.goof.com/articles/2007/05/18/new-photography-post-processing-workflow/#comments</comments>
		<pubDate>Sat, 19 May 2007 02:53:02 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category>Software</category>

		<category>Photography</category>

		<guid isPermaLink="false">http://collectivity.goof.com/articles/2007/05/18/new-photography-post-processing-workflow/</guid>
		<description><![CDATA[One of the challenges with a photography post-processing workflow is not only does it need to be productive for me personally, but it also needs to be an orderly process such that I can pause my work and resume it later.  Life&#8217;s distractions are many and the ability to leave off and pick up [...]]]></description>
			<content:encoded><![CDATA[<p>One of the challenges with a photography post-processing workflow is not only does it need to be productive for me personally, but it also needs to be an orderly process such that I can pause my work and resume it later.  Life&#8217;s distractions are many and the ability to leave off and pick up later is crucial for me.</p>
<p>In rough order, I do the following:</p>
<ol>
<li>Shoot the photos (of course).</li>
<li>Store them in a hierarchical folder structure that fits my organization scheme.</li>
<li>Create a new Adobe Lightroom Library specifically for the photo shoot.</li>
<li>Create a collection (usually named Color4&#215;6) within the library and drag all the &#8220;keepers&#8221; into the collection.</li>
<li>Manipulate each keeper for exposure, tone, contrast/brightness, sharpness, etc.</li>
<li>Crop for 4&#215;6 (1.5:1 is my camera&#8217;s aspect ratio) sized prints.</li>
<li>Make collections for each of the print sizes I intend (Color5&#215;7, Color8&#215;10).</li>
<li>Select all in Color4&#215;6 and choose Make Virtual Copies &#8212; this leaves the newly created virtual copies selected.</li>
<li>Drag virtual copies (left selected by last command) to one of the other collections.</li>
<li>Delete the virtual copies within the source collection.</li>
<li>Select the destination collection and recrop all photos for the new aspect ratio.</li>
<li>Repeat 8, 9, 10 for all other print sizes.</li>
<li>Make collections for each of the print sizes I intend in B&#038;W (B&#038;W4&#215;6, B&#038;W5&#215;7, B&#038;W8&#215;10).</li>
<li>Select all in one of the Color collections and choose Make Virtual Copies.</li>
<li>Drag virtual copies (left selected by last command) to the corresponding B&#038;W collection.</li>
<li>Delete the virtual copies within the source collection.</li>
<li>Select the corresponding B&#038;W collection, select all photos and Convert to Grayscale.</li>
<li>Repeat 14, 15, 16, 17 for all of the other print sizes to be output in B&#038;W.</li>
<li>Output each of the collections to its own directory on the filesystem.  I use TIFF 16bpp color, sRGB 300dpi, no maximum size constraints.</li>
<li>In each of the color output directories, I run a script that either converts the image to JPEG at quality 90 and 8 bpp color or up-samples it to the correct resolution for the dpi desired (e.g. 1200&#215;1800 for a 4&#215;6) and converts to JPEG at quality 90 and 8bpp color.</li>
<li>In each of the B&#038;W output directories, I run a <a title="random b&#038;w image grain" href="http://collectivity.goof.com/articles/2007/05/15/random-bw-image-grain/">script</a> that adds random film grain to the image with a hardlight screen operation.   Subsequently I perform the same up-scale and/or convert to JPEG performed in step 20.</li>
<li>For each of the final JPEG files, I use a script to identify the source NEF image (I shoot all RAW) and call negtags2jpg to migrate the EXIF data into the JPEG, as the ImageMagick command line utilities I use to make my manipulations do not properly migrate the tags from TIFF to JPEG.</li>
<li>Create a web gallery for the color images using <a title="HtmlGallery" href="http://www.goof.com/~mmead/HtmlGallery/">HtmlGallery</a> against the Color4&#215;6 output.</li>
<li>Create a web gallery for the B&#038;W images using <a title="HtmlGallery" href="http://www.goof.com/~mmead/HtmlGallery/">HtmlGallery</a> against the B&#038;W4&#215;6 output.</li>
</ol>
<p>To wrap it all up I upload the final JPEG files to an online printing house and archive the JPEG and web gallery output along with the Adobe Lightroom Library, original NEF files and XMP sidecar files.
</p>
]]></content:encoded>
			<wfw:commentRss>http://collectivity.goof.com/articles/2007/05/18/new-photography-post-processing-workflow/feed/</wfw:commentRss>
		</item>
		<item>
		<title>random b&#038;w image grain</title>
		<link>http://collectivity.goof.com/articles/2007/05/15/random-bw-image-grain/</link>
		<comments>http://collectivity.goof.com/articles/2007/05/15/random-bw-image-grain/#comments</comments>
		<pubDate>Wed, 16 May 2007 03:29:56 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category>Multimedia</category>

		<category>Software</category>

		<category>Photography</category>

		<guid isPermaLink="false">http://collectivity.goof.com/articles/2007/05/15/random-bw-image-grain/</guid>
		<description><![CDATA[When I convert images to B&#038;W, I often add some artificial film grain to the image.  When I do this by hand, I usually just grab a section of the grain source randomly and hardlight screen the original image with it.  Tonight I needed to batch add grain to a number of B&#038;W [...]]]></description>
			<content:encoded><![CDATA[<p>When I convert images to B&#038;W, I often add some artificial film grain to the image.  When I do this by hand, I usually just grab a section of the grain source randomly and hardlight screen the original image with it.  Tonight I needed to batch add grain to a number of B&#038;W images and I didn&#8217;t want the grain to look consistent among them.  After the jump is a perl script that selects a random source-image-sized selection of a grain source and hardlight screens the source image with it.  This is done via imagemagick command line utils.</p>
<p><a id="more-41"></a></p>
<pre>#!/usr/bin/perl
# All of the documentation and software included in this software distribution
# is copyrighted by Matthew C. Mead (m-web@goof.com).
#
# Copyright 2007, Matthew C. Mead.  All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
# This product includes software developed by Matthew C. Mead.
# 4. Neither the name of the author nor the names of any co-contributors
#    may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY MATTHEW C. MEAD ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
# EVENT SHALL MATTHEW C. MEAD OR CO-CONTRIBUTORS  BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

my $portraitGrain = "/Users/mmead/Desktop/grain-portrait.png";
my $landscapeGrain = "/Users/mmead/Desktop/grain-landscape.png";

my $composite = "composite";
my $identify = "identify";

if ($#ARGV != 1) {
print "Usage: addgrain.pl  n";
exit 1;
}

my $source = shift;
my $dest = shift;

my $landscape = 0;
my $grainsource;

open ID, "$identify $source|";
my $id = ;
close ID;

my ($width, $height) = $id =~ /s(d+)x(d+)s/;
if ($width > $height) {
$landscape = 1;
$grainsource = $landscapeGrain;
} else {
$grainsource = $portraitGrain;
}

open ID, "$identify $grainsource|";
$id = ;
close ID;
my ($gwidth, $gheight) = $id =~ /s(d+)x(d+)s/;

if (($width > $gwidth) || ($height > $gheight)) {
print "Grain source not large enough for source image.";
exit 1;
}

my $deltaWidth = $gwidth - $width;
my $deltaHeight = $gheight - $height;
my $offsetWidth = int(rand($deltaWidth));
my $offsetHeight = int(rand($deltaHeight));

system $composite, "-extract", "${width}x${height}+${offsetWidth}+${offsetHeight}", $grainsource, "-compose", "hardlight", $source, "-quality", "90", "-depth", "8", $dest;</pre>
]]></content:encoded>
			<wfw:commentRss>http://collectivity.goof.com/articles/2007/05/15/random-bw-image-grain/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Tech Triumph!</title>
		<link>http://collectivity.goof.com/articles/2007/04/17/tech-triumph/</link>
		<comments>http://collectivity.goof.com/articles/2007/04/17/tech-triumph/#comments</comments>
		<pubDate>Wed, 18 Apr 2007 00:12:39 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category>Culture</category>

		<guid isPermaLink="false">http://collectivity.goof.com/articles/2007/04/17/tech-triumph/</guid>
		<description><![CDATA[Go VT.


]]></description>
			<content:encoded><![CDATA[<p>Go VT.</p>
<p><a href="http://www.lansingcartoons.com/"><img id="image40" alt="Tech Tragedy" src="http://collectivity.goof.com/wp-content/uploads/2007/04/techtragedy.JPG" /></a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://collectivity.goof.com/articles/2007/04/17/tech-triumph/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Digital Cameras and White Balance</title>
		<link>http://collectivity.goof.com/articles/2007/04/14/digital-cameras-and-white-balance/</link>
		<comments>http://collectivity.goof.com/articles/2007/04/14/digital-cameras-and-white-balance/#comments</comments>
		<pubDate>Sat, 14 Apr 2007 14:16:09 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category>Photography</category>

		<guid isPermaLink="false">http://collectivity.goof.com/articles/2007/04/14/digital-cameras-and-white-balance/</guid>
		<description><![CDATA[A friend was asking about white balance on digital cameras on their blog and I took a moment to respond.  Here are some general thoughts on using white balance on digital cameras&#8230;
I&#8217;ve not had much need for a color-based filter for any of my digital cameras. I always use an UV/haze filter for protection [...]]]></description>
			<content:encoded><![CDATA[<p>A friend was asking about white balance on digital cameras on their blog and I took a moment to respond.  Here are some general thoughts on using white balance on digital cameras&#8230;<a id="more-35"></a></p>
<p>I&#8217;ve not had much need for a color-based filter for any of my digital cameras. I always use an UV/haze filter for protection of the front element and take that off to use a circular polarizer when shooting outside or against glass.</p>
<p>From my first digital camera forward I have found it very important to experiment with white balance settings and know how the camera behaves in differently light sources. On some cameras auto works very well in many light sources, on others, not so many, or only specific light sources. One thing has rung true for me across all my cameras, though: using the direct sun white balance preset for sunsets yields colors in the picture that look like the real thing to my eyes.</p>
<p><img id="image38" alt="Sunset on Haleakala" src="http://collectivity.goof.com/wp-content/uploads/2007/04/p8171011_thumbnail.png" /><br />
My general recommendation is to shoot RAW with auto (or preset based on light source). Change the white balance in post processing later if the white balance chosen does not properly capture colors. With RAW the camera&#8217;s white balance setting does not effect your final output because you can adjust it with software without incurring any color sampling loss. Conversely, with JPEG you can also adjust it with software, but you will have some color sampling loss in the conversion as well as JPEG compression generational loss if your ultimate output format is JPEG.</p>
<p>If you&#8217;re really interested in a &#8220;filter&#8221; for a specific setting, get a grey card and take a white-balance reference photo in the lighting where you&#8217;ll be shooting. You can use that to later adjust white balance in post processing by using software to examine the white balance the camera chose based on its exposure of the grey card.  You may be able to tell the camera itself (through its menu) to use the shot of the grey card to preset its white balance (often called custom or reference white balance). Then it should be spot on for the lighting as long as the lighting conditions don&#8217;t change while you&#8217;re shooting.
</p>
]]></content:encoded>
			<wfw:commentRss>http://collectivity.goof.com/articles/2007/04/14/digital-cameras-and-white-balance/feed/</wfw:commentRss>
		</item>
		<item>
		<title>audiotag 0.16 with support for mp4/m4a</title>
		<link>http://collectivity.goof.com/articles/2007/03/13/audiotag-016-with-support-for-mp4m4a/</link>
		<comments>http://collectivity.goof.com/articles/2007/03/13/audiotag-016-with-support-for-mp4m4a/#comments</comments>
		<pubDate>Tue, 13 Mar 2007 14:49:07 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category>Open Source</category>

		<category>Multimedia</category>

		<category>Software</category>

		<guid isPermaLink="false">http://collectivity.goof.com/articles/2007/03/13/audiotag-016-with-support-for-mp4m4a/</guid>
		<description><![CDATA[I updated audiotag 0.15 with support for mp4/m4a.  The original developer has included my changes and made a 0.16 release.  The new release requires AtomicParsley for mp4/m4a tag manipulation to work properly.  It is capable of manipulating tags on all m4a files, including those that contain ALAC.  You can also obtain [...]]]></description>
			<content:encoded><![CDATA[<p>I updated audiotag 0.15 with support for mp4/m4a.  The <a title="ryan at tempestgames" href="http://www.tempestgames.com/ryan/">original developer</a> has included my changes and made a <a title="audiotag-0.16.tar.gz" href="http://www.tempestgames.com/ryan/downloads/audiotag-0.16.tar.gz">0.16 release</a>.  The new release requires AtomicParsley for mp4/m4a tag manipulation to work properly.  It is capable of manipulating tags on all m4a files, including those that contain <a title="ALAC open source decoder" href="http://craz.net/programs/itunes/alac.html">ALAC</a>.  You can also obtain a <a title="audiotag-0.16.tar.gz" href="http://www.goof.com/~mmead/audiotag-0.16.tar.gz">copy of the release</a> on goof.com.
</p>
]]></content:encoded>
			<wfw:commentRss>http://collectivity.goof.com/articles/2007/03/13/audiotag-016-with-support-for-mp4m4a/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Meta Man and Woman</title>
		<link>http://collectivity.goof.com/articles/2007/02/13/meta-man-and-woman/</link>
		<comments>http://collectivity.goof.com/articles/2007/02/13/meta-man-and-woman/#comments</comments>
		<pubDate>Tue, 13 Feb 2007 15:35:00 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category>Culture</category>

		<guid isPermaLink="false">http://collectivity.goof.com/articles/2007/02/13/meta-man-and-woman/</guid>
		<description><![CDATA[Here&#8217;s a neat painting spotted at a Mexican restaurant in Goldsboro, NC


]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a neat painting spotted at a Mexican restaurant in Goldsboro, NC</p>
<p><img id="image32" alt="Neat Painting" src="http://collectivity.goof.com/wp-content/uploads/2007/02/neatpainting.jpg" />
</p>
]]></content:encoded>
			<wfw:commentRss>http://collectivity.goof.com/articles/2007/02/13/meta-man-and-woman/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Migration to WordPress</title>
		<link>http://collectivity.goof.com/articles/2007/01/02/29/</link>
		<comments>http://collectivity.goof.com/articles/2007/01/02/29/#comments</comments>
		<pubDate>Tue, 02 Jan 2007 19:09:50 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category>Software</category>

		<guid isPermaLink="false">http://collectivity.goof.com/articles/2007/01/02/29/</guid>
		<description><![CDATA[collectivity is now hereby migrated to WordPress.
I didn&#8217;t try a newer version of Typo (4.03) before long before migrating.  Typo seems to be consuming way too much RAM and swap for the mix of uses my host performs.

]]></description>
			<content:encoded><![CDATA[<p>collectivity is now hereby migrated to <a title="WordPress" href="http://www.wordpress.org/">WordPress</a>.</p>
<p>I didn&#8217;t try a newer version of Typo (4.03) before long before migrating.  Typo seems to be consuming way too much RAM and swap for the mix of uses my host performs.
</p>
]]></content:encoded>
			<wfw:commentRss>http://collectivity.goof.com/articles/2007/01/02/29/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Relatively Easy NAT for Parallels</title>
		<link>http://collectivity.goof.com/articles/2006/10/23/relatively-easy-nat-for-parallels/</link>
		<comments>http://collectivity.goof.com/articles/2006/10/23/relatively-easy-nat-for-parallels/#comments</comments>
		<pubDate>Mon, 23 Oct 2006 22:41:00 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category>Mac OS X</category>

		<category>Open Source</category>

		<category>Software</category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Parallels for Mac, unlike VMWare, does not offer NAT networking for guest operating systems.  There is a relatively easy way around this, though the way I’ve implemented it requires use of the command line…

First, set the DHCP Options as you desire for the private network.  I use the default of 10.37.129.0/24:

Then configure the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.parallels.com/en/products/workstation/mac/">Parallels for Mac</a>, unlike VMWare, does not offer NAT networking for guest operating systems.  There is a relatively easy way around this, though the way I’ve implemented it requires use of the command line…</p>
<p><em><a id="more-26"></a></em></p>
<p>First, set the DHCP Options as you desire for the private network.  I use the default of 10.37.129.0/24:</p>
<p><img alt="DHCP Options" src="http://www.goof.com/~mmead/DHCPOptions.png" /></p>
<p>Then configure the networking for the Virtual Machine to be Host Only Networking:</p>
<p><img alt="Host Only Networking" src="http://www.goof.com/~mmead/NetworkingOptions.png" /></p>
<p>Finally, boot the VM and configure it to use a static network configuration:</p>
<p>ip: 10.37.129.x</p>
<p>netmask: 255.255.255.0</p>
<p>default router: 10.37.129.1</p>
<p>dns: whatever it’s set to on your Mac’s /etc/resolv.conf</p>
<p><em>For dns</em>, I run a copy of <a href="http://cr.yp.to/dnscache.html">dnscache</a> on my Mac with options that allow for it to serve requests on 10.37.129.0/24, and     specify 10.37.129.1 as the dns server to my VMs.</p>
<p>Create a directory /Library/StartupItems/Firewall and create a file in it called StartupParameters.plist with the following contents:</p>
<pre><code>{
Description     = "Firewall";
Provides        = ("Firewall");
Requires        = ("NetworkExtensions","Resolver");
OrderPreference = "Late";
Messages =
{
start = "Starting firewall";
stop  = "Stopping firewall";
};
}
</code></pre>
<p>Create a file in the same directory called FirewallManual:</p>
<pre><code>#!/bin/sh

##
# Firewall
##

. /etc/rc.common

StartService ()
{
ConsoleMessage "Starting Firewall"
sh /etc/rc.firewall &gt; /dev/null
}

StopService ()
{
ConsoleMessage "Stopping Firewall"
/sbin/ipfw -f -q flush
/usr/bin/killall natd &gt;/dev/null     2&gt;&#038;1
/usr/sbin/sysctl -w     net.inet.ip.forwarding=0
}

RestartService ()
{
StopService
StartService
}

RunService "$1"
</code></pre>
<p>Finally, create /etc/rc.firewall with the following contents:</p>
<pre><code>#!/bin/sh

DEFROUTE_IF=`/usr/sbin/netstat -rn | /usr/bin/awk '/^default/ {print $6;}'`
NATD=/usr/sbin/natd
NATD_OPTIONS="-log -log_denied -use_sockets -same_ports -interface $DEFROUTE_IF"
IPFW=/sbin/ipfw

LOOPBACK="lo*"
PUBLIC_IF="$DEFROUTE_IF"
PARALLELS_IF=en2

PARALLELS_NET="10.37.129.0/24"

# start natd
$NATD $NATD_OPTIONS

# divert traffic before anything else
$IPFW add 01000 divert natd all from $PARALLELS_NET to any out via $PUBLIC_IF
$IPFW add 01010 divert natd all from any to any in via $PUBLIC_IF

# standard mac os x firewall stuff
$IPFW add 02000 allow ip from any to any via $LOOPBACK
$IPFW add 02010 deny ip from 127.0.0.0/8 to any in
$IPFW add 02020 deny ip from any to 127.0.0.0/8 in
$IPFW add 02030 deny ip from 224.0.0.0/3 to any in
$IPFW add 02040 deny tcp from any to 224.0.0.0/3 in
$IPFW add 02050 allow tcp from any to any out
$IPFW add 02060 allow tcp from any to any established
$IPFW add 02070 allow tcp from any to any dst-port 22 in
$IPFW add 02070 allow ip from any to any dst-port 53 in
$IPFW add 02080 allow tcp from any to any dst-port 80 in
$IPFW add 02090 allow tcp from any to any dst-port 427 in
$IPFW add 02100 allow tcp from any to any dst-port 443 in
$IPFW add 02110 allow tcp from any to any dst-port 5297 in
$IPFW add 02120 allow tcp from any to any dst-port 5298 in

#$IPFW add 03000 allow all from $PARALLELS_NET to any via $PARALLELS_IF in
#$IPFW add 03010 allow all from any to $PARALLELS_NET via $PARALLELS_IF out

$IPFW add 12190 deny tcp from any to any
$IPFW add 65535 allow all from any to any

sysctl -w net.inet.ip.forwarding=1
</code></pre>
<p>Make both /Library/StartupItems/FirewallManual and /etc/rc.firewall mode 755.</p>
<p><em>Now all the pieces are in place…</em></p>
<p>In order to use this, you need to start Parallels and bring up the VM you’ve setup above.  Once that is done, open System Preferences, Sharing, Firewall and stop the firewall.  Then from the command line, run:</p>
<pre><code>sudo /Library/StartupItems/Firewall/FirewallManual start
</code></pre>
<p>Your guest VM should now have NAT’d internet access via the default route in place on your Mac.</p>
<p>To tear things down, run</p>
<pre><code>sudo /Library/StartupItems/Firewall/FirewallManual stop
</code></pre>
<p>Then start the firewall in the Sharing pane of System Preferences, and all is normal.</p>
<p><strong><em>Please note</em></strong> that there are a number of rules that open specific ports in the above.  You should ensure those ports are what you’d like to have open if you intend to use this script.</p>
<p>Use how you like at your own risk, there is no warranty provided.  If you’d like to use this as source material to make a nice GUI on top of this, please let me know so I can grab it and use it.  For now this works very efficiently for me, though an on off button that automates most of this and an installer would be cool.  If I were doing it I would:</p>
<ul>
<li>Collect the set of firewall rules in place after starting the Mac OS X default firewall via AppleScript.</li>
<li>Wrap those rules with the rules necessary to allow Guest VM &lt;-> Mac communication, NAT diversion and packet flow.</li>
<li>Perform a similar start process to above when a button was pressed.</li>
<li>Perform a similar stop process to above when a button was pressed (including restart of Mac OS X default firewall via AppleScript).</li>
</ul>
<p>I have not researched to see how much of this is possible, but my guess is most of it is, or the information to implement the same thing can be gleaned by reading plist files that contain the firewall settings.
</p>
]]></content:encoded>
			<wfw:commentRss>http://collectivity.goof.com/articles/2006/10/23/relatively-easy-nat-for-parallels/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MythFrontend 0.20-fixes for OS X Universal</title>
		<link>http://collectivity.goof.com/articles/2006/10/01/mythfrontend-0-20-fixes-for-os-x-universal/</link>
		<comments>http://collectivity.goof.com/articles/2006/10/01/mythfrontend-0-20-fixes-for-os-x-universal/#comments</comments>
		<pubDate>Sun, 01 Oct 2006 17:13:00 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category>Mac OS X</category>

		<category>Apple</category>

		<category>MythTV</category>

		<category>Open Source</category>

		<category>Multimedia</category>

		<category>Software</category>

		<category>Mac OS X Intel</category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[For those of you who jumped the gun and requested a release-0-20 build, then subsequently upgraded your backends…
MythFrontend-MacOSXUniversal-0.20-fixes-20061001.dmg.bz2

]]></description>
			<content:encoded><![CDATA[<p>For those of you who jumped the gun and requested a release-0-20 build, then subsequently upgraded your backends…</p>
<p><a href="http://www.goof.com/~mmead/MythFrontend-MacOSXUniversal-0.20-fixes-20061001.dmg.bz2">MythFrontend-MacOSXUniversal-0.20-fixes-20061001.dmg.bz2</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://collectivity.goof.com/articles/2006/10/01/mythfrontend-0-20-fixes-for-os-x-universal/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
