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

<channel>
	<title>fnokd! &#187; OSX</title>
	<atom:link href="http://www.fnokd.com/tag/osx/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fnokd.com</link>
	<description>Bob Blogs</description>
	<lastBuildDate>Mon, 18 May 2009 17:42:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Elasticfox, OSX and iTerm</title>
		<link>http://www.fnokd.com/2008/10/01/elasticfox-osx-and-iterm/</link>
		<comments>http://www.fnokd.com/2008/10/01/elasticfox-osx-and-iterm/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 14:51:53 +0000</pubDate>
		<dc:creator>Bob McWhirter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[elasticfox]]></category>
		<category><![CDATA[osa]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://www.fnokd.com/?p=540</guid>
		<description><![CDATA[Elasticfox is a nice extension for managing your relationship with EC2 from within Firefox.  It&#8217;s XUL-based, somewhat homely and odd.  But it&#8217;s so much nicer than dealing with the ec2-* scripts directly and copying Amazon&#8217;s wacky hash identifiers hither and thither.
But on OSX, the &#8220;ssh to this instance&#8221; button is wired up to Terminal.app.  I [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Elasticfox" href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=609">Elasticfox</a> is a nice extension for managing your relationship with <a title="Amazon EC2" href="http://aws.amazon.com/ec2/">EC2</a> from within Firefox.  It&#8217;s XUL-based, somewhat homely and odd.  But it&#8217;s so much nicer than dealing with the <code>ec2-*</code> scripts directly and copying Amazon&#8217;s wacky hash identifiers hither and thither.</p>
<p>But on OSX, the &#8220;ssh to this instance&#8221; button is wired up to Terminal.app.  I can&#8217;t stand Terminal.app.  I much prefer iTerm.</p>
<p>So, a little AppleScript hacking, and Elasticfox now uses iTerm to connect to instances through ssh.</p>
<p>Instead of jamming it all into a dozen <code>-e</code> options on <code>osascript</code>, I just put it in a file, and changed my configuration.</p>
<dl id="attachment_542" class="wp-caption aligncenter" style="width: 448px;">
<dt class="wp-caption-dt"><a href="http://www.fnokd.com/wp-content/uploads/2008/10/picture-26.png"><img class="size-full wp-image-542" title="Elasticfox configuration" src="http://www.fnokd.com/wp-content/uploads/2008/10/picture-26.png" alt="Elasticfox configuration" width="438" height="265" /></a></dt>
</dl>
<p>And the script itself:</p>
<pre style="overflow:auto;font-size:90%;"><code>
on run argv
  tell application "iTerm"
    activate
    set cmd to "ssh -i " &amp; item 1 of argv &amp; " " &amp; item 2 of argv
    set myterm to the last terminal
    tell myterm
      launch session "Default Session"
      tell the last session
        write text the cmd
      end tell
    end tell
  end tell
end run
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.fnokd.com/2008/10/01/elasticfox-osx-and-iterm/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Multiple instances of AS on OSX</title>
		<link>http://www.fnokd.com/2008/09/29/multiple-instances-of-as-on-osx/</link>
		<comments>http://www.fnokd.com/2008/09/29/multiple-instances-of-as-on-osx/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 17:22:38 +0000</pubDate>
		<dc:creator>Bob McWhirter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://www.fnokd.com/?p=524</guid>
		<description><![CDATA[Rysiek asked me to elucidate my clustering on OSX&#8230;
By default, it seems that OSX provides exactly 1 localhost address, unlike RHEL.  I normally make use of 127.0.0.1/24 when I&#8217;m deploying on Linux, and figured I&#8217;d do the same on OSX.
To accomplish this, you need to create some new localhost IPs to play with.

sudo ifconfig lo0 [...]]]></description>
			<content:encoded><![CDATA[<p>Rysiek asked me to elucidate my clustering on OSX&#8230;</p>
<p>By default, it seems that OSX provides exactly 1 localhost address, unlike RHEL.  I normally make use of 127.0.0.1/24 when I&#8217;m deploying on Linux, and figured I&#8217;d do the same on OSX.</p>
<p>To accomplish this, you need to create some new localhost IPs to play with.</p>
<pre><code>
sudo ifconfig lo0 alias 127.0.0.10 up
sudo ifconfig lo0 alias 127.0.0.11 up
sudo ifconfig lo0 alias 127.0.0.12 up
</code></pre>
<p>Now, when you run your AS with <code>./run.sh</code>, just pass <code>-b 127.0.0.10</code> or <code>-b 127.0.0.11</code> etc, and the entire stack will bind to that IP address.</p>
<p>At this point, I&#8217;m allowing each AS instance to share a work directory and such, which is probably not exactly the safest thing to be doing.  Normally each cluster node would be a discrete machine with its own <code>JBOSS_HOME</code>.</p>
<p>For the apache config, in <code>/private/etc/apache2/httpd.conf</code>, I uncommented the line to allow vhost file loading:</p>
<pre><code>
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf
</code></pre>
<p>Then, in the <code>httpd-vhosts.conf</code> file I fixed it up to include my virtual host for the head-end load-balancing stuff.</p>
<p>The <code>&lt;VirtualHost&gt;</code> is only barely conformant, and even the <code>DocumentRoot</code> is gratuitous, really.  It looks like this:</p>
<pre style="overflow:auto;font-size:90%"><code>
&lt;VirtualHost *:80&gt;
  ServerName app.local.ballast
  DocumentRoot "/Users/bob/public_html"

  RewriteEngine on

  RewriteMap    lb      'prg:/Users/bob/bin/load_balancer local.ballast 1 3'
  RewriteRule   ^/(.*)$ ${lb:$1}           [P,L]
&lt;/VirtualHost&gt;
</code></pre>
<p>What that is doing is passing each requested path to the <code>load_balancer</code> script I&#8217;ve borrowed from I-don&#8217;t-know-&#8217;where.  It returns an augmented URL pointing to one of my localhost-bound nodes.</p>
<pre style="overflow:auto;font-size:90%"><code>
#!/usr/bin/env perl
##
##  lb.pl -- load balancing script
##

$| = 1;

$name   = $ARGV[0];         # the hostname base
$first  = $ARGV[1];         # the first server (not 0 here, because 0 is myself)
$last   = $ARGV[2];         # the last server in the round-robin

$cnt = 0;
while (&lt;STDIN&gt;) {
    $server = sprintf("node%d.%s", $cnt+$first, $name);
    $cnt = (($cnt+1) % ($last+1-$first));
    print "http://$server:8080/$_";
}
</code></pre>
<p>If a path of <code>/foo/bar</code> is handed to it on STDIN, it&#8217;ll return something in the format of <code>http://node1.local.ballast:8080/foo/bar</code> or <code>http://node2.local.ballast:8080/foo/bar</code>.</p>
<p>Through the magic of <code>/etc/hosts</code> those friendly names point to the localhost bound AS cluster nodes, along with <code>app.local.ballast</code> pointing to good old traditional 127.0.0.1, where httpd is normally listening.  That&#8217;s my head-end from the <code>httpd-vhosts.conf</code>.</p>
<pre><code>
127.0.0.1       localhost app.local.ballast

127.0.0.10      node1.local.ballast
127.0.0.11      node2.local.ballast
127.0.0.12      node3.local.ballast
</code></pre>
<p>Fire up a browser and I surf to <code>http://app.local.ballast/</code>, apache answers, and immediately and invisibly proxies the request to port 8080 of one of my localhost-bound JBoss AS instances.</p>
<p>Nice.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fnokd.com/2008/09/29/multiple-instances-of-as-on-osx/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Boxy To Go</title>
		<link>http://www.fnokd.com/2006/12/05/boxy-to-go/</link>
		<comments>http://www.fnokd.com/2006/12/05/boxy-to-go/#comments</comments>
		<pubDate>Tue, 05 Dec 2006 19:45:59 +0000</pubDate>
		<dc:creator>Bob McWhirter</dc:creator>
				<category><![CDATA[Culture]]></category>
		<category><![CDATA[Opensource]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.fnokd.com/2006/12/05/boxy-to-go/</guid>
		<description><![CDATA[Being an OSX user, I&#8217;ve felt massive amounts of unlove from TiVo, in terms of the TiVoDesktop, TiVoToGo, etc.Â  But now, man, the guys behind tivodecode have come to my rescue.Â  While playing with it, I also discovered that the TiVo actually produces a nice XML feed, and mine at least attempts to serve up [...]]]></description>
			<content:encoded><![CDATA[<p><img width="119" height="110" align="left" alt="Picture 11.png" id="image105" title="Picture 11.png" src="http://www.fnokd.com/wp-content/uploads/2006/12/Picture%2011.png" />Being an OSX user, I&#8217;ve felt massive amounts of unlove from TiVo, in terms of the TiVoDesktop, TiVoToGo, etc.Â  But now, man, the guys behind <a href="http://tivodecode.sourceforge.net/">tivodecode</a> have come to my rescue.Â  While playing with it, I also discovered that the TiVo actually produces a nice XML feed, and mine at least attempts to serve up some RSS (but it ultimately fails).</p>
<p><strong>tivodecode</strong> spews out MPEG-2, which QuickTime can&#8217;t handle natively.Â  You can <a href="http://www.apple.com/quicktime/mpeg2/">spend $19.99 at the Apple Store</a> to get the MPEG codec pack, or use <a href="http://darwinports.opendarwin.org/">DarwinPorts</a> to install <a href="http://www.mplayerhq.hu/design7/news.html">MPlayer</a>, which handles MPEG-2 just fine.Â  For free.</p>
<p>Bless all those opensouce geeks out there in the world.Â  Bless each and every one of you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fnokd.com/2006/12/05/boxy-to-go/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Knobs</title>
		<link>http://www.fnokd.com/2006/07/11/knobs/</link>
		<comments>http://www.fnokd.com/2006/07/11/knobs/#comments</comments>
		<pubDate>Tue, 11 Jul 2006 07:06:54 +0000</pubDate>
		<dc:creator>Bob McWhirter</dc:creator>
				<category><![CDATA[Culture]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.fnokd.com/2006/07/11/knobs/</guid>
		<description><![CDATA[I&#8217;ve recently started using iTunes on the G5 hooked to the speakers, instead of the iPod connected to them.  Today I realized that I hadn&#8217;t been listening to anything at all, because iTunes simply never made it to the front of my stack of windows. With the physical iPod situated in front of me, [...]]]></description>
			<content:encoded><![CDATA[<p><img align="right" title="Picture 49.png" id="image60" alt="Picture 49.png" src="http://www.fnokd.com/wp-content/uploads/2006/07/Picture%2049.png" />I&#8217;ve recently started using iTunes on the G5 hooked to the speakers, instead of the iPod connected to them.  Today I realized that I hadn&#8217;t been listening to anything at all, because iTunes simply never made it to the front of my stack of windows. With the physical iPod situated in front of me, I&#8217;m more apt to pick something to listen to.</p>
<p>Digital isn&#8217;t always better.  Sometimes a big-ass knob on a distinct device is functionally better than a whizzy-bang brushed metal UI without a dedicated knob.</p>
<p>Yes, I know the iPod doesn&#8217;t have a knob.  It has an iKnob (aka, the clickwheel with the nipple in the middle).Â  But it&#8217;s knobesque nonetheless.Â  And the screen is always visible.Â  No repeated command-tab to find it.Â  It&#8217;s just right there.Â  On the desk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fnokd.com/2006/07/11/knobs/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Menu Bling</title>
		<link>http://www.fnokd.com/2006/05/19/menu-bling/</link>
		<comments>http://www.fnokd.com/2006/05/19/menu-bling/#comments</comments>
		<pubDate>Sat, 20 May 2006 02:49:00 +0000</pubDate>
		<dc:creator>Bob McWhirter</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.fnokd.com/2006/05/19/menu-bling/</guid>
		<description><![CDATA[How much have you got? (Click to enlarge)

]]></description>
			<content:encoded><![CDATA[<p>How much have you got? (Click to enlarge)<br />
<a title="Picture 4.png" class="imagelink" href="http://www.fnokd.com/wp-content/uploads/2006/05/Picture%204.png"><img width="454" height="12" alt="Picture 4.png" id="image44" src="http://www.fnokd.com/wp-content/uploads/2006/05/Picture%204.png" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fnokd.com/2006/05/19/menu-bling/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
