<?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>//extrabright</title>
	<atom:link href="http://extrabright.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://extrabright.com/blog</link>
	<description>//pat's blog</description>
	<lastBuildDate>Sun, 15 Nov 2009 16:57:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>NFS Automount with Snow Leopard</title>
		<link>http://extrabright.com/blog/2009/11/15/nfs-automount-with-snow-leopard/</link>
		<comments>http://extrabright.com/blog/2009/11/15/nfs-automount-with-snow-leopard/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 16:57:54 +0000</pubDate>
		<dc:creator>pajai</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[pat]]></category>

		<guid isPermaLink="false">http://extrabright.com/blog/?p=203</guid>
		<description><![CDATA[Before upgrading to Snow Leopard, I was using the NFS automount capability of Mac OS X. It was a handy way for my laptop to connect to my home NAS server (a linux box running Ubuntu).
Unfortunately I had to redo the NFS config after upgrading and I noticed that Directory Utility was not present anymore [...]]]></description>
			<content:encoded><![CDATA[<p>Before upgrading to Snow Leopard, I was using the NFS automount capability of Mac OS X. It was a handy way for my laptop to connect to my home NAS server (a linux box running Ubuntu).</p>
<p>Unfortunately I had to redo the NFS config after upgrading and I noticed that Directory Utility was not present anymore in Snow Leopard.</p>
<p>Here is what I found out after some research:</p>
<li>the NFS automount configuration is now done directly in Disk Utility (under File > NFS Mounts&#8230;) and not in Directory Utility like in Leopard (which does not exist anymore).</li>
<li>the configuration that worked for me was the following one (for accessing a read-write NFS share):
<pre>
Remote NFS URL: nfs://[server]/[path]
Mount location: [path to local mount folder]
Advanced Mount Parameters: -i,-s,-w=32768,-r=32768
</pre>
</li>
<li> for automount to reload its configuration, I had to run the following command:
<pre>sudo automount -vc</pre>
</li>
<p>That&#8217;s it. The NFS share should now be accessible.</p>
<p>References:</p>
<li><a href="http://discussions.apple.com/thread.jspa?threadID=2137675" onclick="javascript:urchinTracker ('/outbound/article/discussions.apple.com');">http://discussions.apple.com/thread.jspa?threadID=2137675</a></li>
]]></content:encoded>
			<wfw:commentRss>http://extrabright.com/blog/2009/11/15/nfs-automount-with-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time Machine: Handy but Bitchy!</title>
		<link>http://extrabright.com/blog/2009/06/30/time-machine-handy-but-bitchy/</link>
		<comments>http://extrabright.com/blog/2009/06/30/time-machine-handy-but-bitchy/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 21:10:12 +0000</pubDate>
		<dc:creator>pajai</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[pat]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[timemachine]]></category>

		<guid isPermaLink="false">http://extrabright.com/blog/?p=183</guid>
		<description><![CDATA[I have been spending the last couple of days of my spare time performing a simple operation with my mac, yet slightly more complicated than expected: merge the two partitions of my hard drive into one. This was necessary since I did a mapping, quite usual on Linux, where my system was sitting on the [...]]]></description>
			<content:encoded><![CDATA[<p>I have been spending the last couple of days of my spare time performing a simple operation with my mac, yet slightly more complicated than expected: merge the two partitions of my hard drive into one. This was necessary since I did a mapping, quite usual on Linux, where my system was sitting on the first partition (50 GB) while my user data was on the second one (the rest of 300 GB). But this mapping was not making me happy, since the system partition was always almost full (Mac OS X is not well suited for a multi partition disk drive, I find).</p>
<p>Although you can resize a live partition with Disk Utility (great feature, even if you booted with it), you cannot move the base position of a partition. You can merely resize it, if more space is available. So I had to back my second partition up for later restoring it. I went for Time Machine, since I was already using it for backing up my laptop.</p>
<h3>Time Machine Caveats</h3>
<p>Unfortunetely I noticed a couple of caveats during the restore operation:</p>
<li>When using the Time Machine restore utility shipped with the OS X install DVD, you can only restore the partition where the system is, but not other ones. This was quite of a surpise to me. Although you can choose on which partition you want to restore your system (the target, not the source).</li>
<li>Although your data is actually sitting on the Time Machine backup drive, you cannot use it directly (i.e. copy it back using the Finder or a shell). The reason for that is the ACLs that Leopard is putting on each and every file and folder to protect changing the Time Machine backup. In addition the ACL system (which is a parralel access control to the Unix one, which I did not know the existence of beforehand) is deeply flawed: you cannot reliably remove recursively the ACLs from a directory structure (you will still find files scattered within the structure having ACLs) and you even cannot remove the ACL permissions on symbolic links (this seems to be a bug of chmod on Leopard, although ACLs on a symlink do not seem to have any effect)</li>
<h3>Solution for merging two partitions</h3>
<p>I finally found a solution to restore the second partition or to merge them: I had to fiddle directly with the Time Machine backup, copying manually the files I wanted from the second partition to the first, and did a restore of the first partition using Time Machine restore utility.</p>
<p>Here are the details of the steps I took:</p>
<li>Plug my external drive where I have my Time Machine backup, open a terminal and sudo as root:<br />
<code>sudo -s</code>
</li>
<li>Deactivate on that drive the ACL checks, so that I can modify directly the Time Machine backup:<br />
<code>fsaclctl -p /Volumes/[backup drive] -d</code>
</li>
<li>Move the folders from the second partition to the first one with<br />
<code>mv [from] [to]</code>
</li>
<li>Reactivate the ACL checks on the external drive:<br />
<code>fsaclctl -p /Volumes/[backup drive] -e</code>
</li>
<li>Do the restore of the first partition with the Time Machine restore utility (located on the Leopard install DVD).</li>
<p>This worked for me. You should now have a merged partition on your drive, the restore utility having removed the ACLs during the operation. Phew! This was not a straight forward action! I still cannot believe that Apple did not take into account that people can have more than 1 partition on their drive (I might still have missed the way to do it, did not find it so far though).</p>
<h3>Links/Info</h3>
<li><a href="http://www.macosxhints.com/article.php?story=20090213071015789" onclick="javascript:urchinTracker ('/outbound/article/www.macosxhints.com');">Macosxhint: reconnect Time Machine backup after a drive swap</a></li>
<li>Inspect the ACLs of your file with ls:<br />
<code>ls -le</code></p>
<p>For the record, this will yield the following listing when ACLs are present (pay attention to the lines starting with &#8216;0: &#8216; and &#8216;1: &#8216;:<br />
<code>drwxrwxr-x@ 138 root   admin  4692 Sep 13  2008 Applications<br />
 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown<br />
 1: group:everyone deny delete<br />
drwxr-xr-x@   2 pat    staff    68 May  9 22:12 DeveloperSDK3<br />
 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown<br />
drwxr-xr-x@   5 pat    staff   170 Oct 23  2008 VirtualBox<br />
 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown</code></p>
<p>You can also do that recursively using the following command:<br />
<code>ls -lateR > filelist</code>
</li>
<li>You can remove ACLs on a file with this command (not working properly for a recursive operation with the option <code>-R</code>)<br />
<code>chmod -a# 0 [file]</code><br />
where 0 is the ACL entry to remove.</p>
]]></content:encoded>
			<wfw:commentRss>http://extrabright.com/blog/2009/06/30/time-machine-handy-but-bitchy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Geekiest Hello World</title>
		<link>http://extrabright.com/blog/2009/06/11/the-geekiest-hello-world/</link>
		<comments>http://extrabright.com/blog/2009/06/11/the-geekiest-hello-world/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 17:55:32 +0000</pubDate>
		<dc:creator>pajai</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[pat]]></category>
		<category><![CDATA[geek groovy]]></category>

		<guid isPermaLink="false">http://extrabright.com/blog/?p=180</guid>
		<description><![CDATA[Folks, I think that I have found (one of) the geekiest hello world out there. Implemented in Groovy using the dynamic interception of method calls. Here it goes:

class Hello {
  Object invokeMethod(String name, Object arguments) {
    System.out.println "hello $name!"
  }
}

def hello = new Hello()
hello.john()
hello.you()

Which produce the following output:

hello john!
hello you!

I [...]]]></description>
			<content:encoded><![CDATA[<p>Folks, I think that I have found (one of) the geekiest hello world out there. Implemented in Groovy using the dynamic interception of method calls. Here it goes:</p>
<pre>
class Hello {
  Object invokeMethod(String name, Object arguments) {
    System.out.println "hello $name!"
  }
}

def hello = new Hello()
hello.john()
hello.you()
</pre>
<p>Which produce the following output:</p>
<pre>
hello john!
hello you!
</pre>
<p>I suppose the same mechanism can be used with Ruby (and some other dynamic languages).</p>
]]></content:encoded>
			<wfw:commentRss>http://extrabright.com/blog/2009/06/11/the-geekiest-hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Self-Reproducing Program in Groovy</title>
		<link>http://extrabright.com/blog/2009/06/07/self-reproducing-program-in-groovy/</link>
		<comments>http://extrabright.com/blog/2009/06/07/self-reproducing-program-in-groovy/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 15:00:07 +0000</pubDate>
		<dc:creator>pajai</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[pat]]></category>

		<guid isPermaLink="false">http://extrabright.com/blog/?p=171</guid>
		<description><![CDATA[I had this in mind since yesterday: how to write a self-reproducing program in Groovy, or a Quine, a program which prints out its source code. It&#8217;s actually a fun exercise.
Here is my version:

a = 'c = (char)39; println "a = $c$a$c"; println "$a"'
c = (char)39; println "a = $c$a$c"; println "$a"
It looks scary, but [...]]]></description>
			<content:encoded><![CDATA[<p>I had this in mind since yesterday: how to write a self-reproducing program in Groovy, or a Quine, a program which prints out its source code. It&#8217;s actually a fun exercise.</p>
<p>Here is my version:</p>
<pre>
a = 'c = (char)39; println "a = $c$a$c"; println "$a"'
c = (char)39; println "a = $c$a$c"; println "$a"</pre>
<p>It looks scary, but it is actually not that terrible. The first line is the definition of a variable a of the form:</p>
<pre>
a = '[some string]'
</pre>
<p>The second line is first the definition of the single quote character assigned to c. We then print out the first line (including the variable definition), where we replace the single quote by our character c, and where $a is the content of a. This part looks like:</p>
<pre>
println "a = $c$a$c";
</pre>
<p>Finally we print out a.</p>
<p>The only thing that we need now to do, is to replace [some string] in the first line. It happens that if we take the complete second line and assign it to &#8216;a&#8217; in the first line, we will get the desired output. We see here that if we had not used $c in the first println of the second line instead of the single quote, the string assigned to a in the first line would not be legal, since it would contain inside the string a string delimiter (and if we escape it, we don&#8217;t get the same output as the program code).</p>
<p>That&#8217;s it. It was fun.</p>
<p>Links:</p>
<li><a href="http://en.wikipedia.org/wiki/Quine_(computing)" onclick="javascript:urchinTracker ('/outbound/article/en.wikipedia.org');">A quine on Wikipedia</a></li>
<li><a href="http://devslab.blogspot.com/2007/07/program-that-prints-itself.html" onclick="javascript:urchinTracker ('/outbound/article/devslab.blogspot.com');">Interesting blog post about a self-reproducing program</a></li>
]]></content:encoded>
			<wfw:commentRss>http://extrabright.com/blog/2009/06/07/self-reproducing-program-in-groovy/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Annoying &#8217;screen&#8217; Backspace Problem</title>
		<link>http://extrabright.com/blog/2009/02/21/annoying-screen-backspace-problem/</link>
		<comments>http://extrabright.com/blog/2009/02/21/annoying-screen-backspace-problem/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 23:28:30 +0000</pubDate>
		<dc:creator>pajai</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[pat]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://extrabright.com/blog/?p=168</guid>
		<description><![CDATA[Already a long time that this issue is bugging me. The great &#8217;screen&#8217; unix command has a problem, at least on ubuntu: the backspace key produces the same effect than delete (first char on the right of the cursor gets deleted). Very annoying. Hopefully the solution is easy. Edit your file &#8216;~/.bashrc&#8217; and add the [...]]]></description>
			<content:encoded><![CDATA[<p>Already a long time that this issue is bugging me. The great &#8217;screen&#8217; unix command has a problem, at least on ubuntu: the backspace key produces the same effect than delete (first char on the right of the cursor gets deleted). Very annoying. Hopefully the solution is easy. Edit your file &#8216;~/.bashrc&#8217; and add the following line:</p>
<pre>alias screen='TERM=screen screen'</pre>
]]></content:encoded>
			<wfw:commentRss>http://extrabright.com/blog/2009/02/21/annoying-screen-backspace-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Mix: Electro-rock to Minimal</title>
		<link>http://extrabright.com/blog/2008/09/15/new-mix-electro-rock-to-minimal/</link>
		<comments>http://extrabright.com/blog/2008/09/15/new-mix-electro-rock-to-minimal/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 19:34:11 +0000</pubDate>
		<dc:creator>pajai</dc:creator>
				<category><![CDATA[SoUnd]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[pat]]></category>
		<category><![CDATA[mix]]></category>

		<guid isPermaLink="false">http://extrabright.com/blog/?p=152</guid>
		<description><![CDATA[Check out my new mix in the sound section! I did something a bit different than the previous time, as I wanted to explore the electro-rock style, which is really a great and energetic combination.

Extrabright Mix 02: From electro-rock to minimal, with an electronica introduction and a new age epilogue. Calvin Harris remixed by Mr. [...]]]></description>
			<content:encoded><![CDATA[<p>Check out my new mix in the <a href="/blog/sound">sound section</a>! I did something a bit different than the previous time, as I wanted to explore the electro-rock style, which is really a great and energetic combination.</p>
<ul>
<li><a href="http://extrabright.com/blog/../mixes/Extrabright_Mix_02.mp3" >Extrabright Mix 02</a>: From electro-rock to minimal, with an electronica introduction and a new age epilogue. Calvin Harris remixed by Mr. Oizo, Ellen Alien, Justice, Miss Kittin, Love Motel and a couple of other great tracks.<br />
<a href="http://extrabright.com/blog/../mixes/Extrabright_Mix_02.mp3" >Download audio file (Extrabright_Mix_02.mp3)</a><br /></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://extrabright.com/blog/2008/09/15/new-mix-electro-rock-to-minimal/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://extrabright.com/blog/../mixes/Extrabright_Mix_02.mp3" length="134098117" type="audio/mpeg" />
		</item>
		<item>
		<title>WPtouch Plug-in</title>
		<link>http://extrabright.com/blog/2008/09/03/wptouch-plug-in/</link>
		<comments>http://extrabright.com/blog/2008/09/03/wptouch-plug-in/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 21:50:52 +0000</pubDate>
		<dc:creator>pajai</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[pat]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://extrabright.com/blog/?p=149</guid>
		<description><![CDATA[Just installed a Wordpress plug-in that aims at providing a good rendering on the iPhone. It&#8217;s called WPtouch. Neat.
]]></description>
			<content:encoded><![CDATA[<p>Just installed a Wordpress plug-in that aims at providing a good rendering on the iPhone. It&#8217;s called <a href="http://wordpress.org/extend/plugins/wptouch/" onclick="javascript:urchinTracker ('/outbound/article/wordpress.org');">WPtouch</a>. Neat.</p>
]]></content:encoded>
			<wfw:commentRss>http://extrabright.com/blog/2008/09/03/wptouch-plug-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Database Issue</title>
		<link>http://extrabright.com/blog/2008/08/06/database-issue/</link>
		<comments>http://extrabright.com/blog/2008/08/06/database-issue/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 16:49:48 +0000</pubDate>
		<dc:creator>pajai</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[pat]]></category>
		<category><![CDATA[database blog]]></category>

		<guid isPermaLink="false">http://extrabright.com/blog/?p=136</guid>
		<description><![CDATA[I had some database issues 2 weeks ago, therefore I lost a couple of comments. Sorry guys. I hope it will stay stable now.
Cheers!
]]></description>
			<content:encoded><![CDATA[<p>I had some database issues 2 weeks ago, therefore I lost a couple of comments. Sorry guys. I hope it will stay stable now.</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://extrabright.com/blog/2008/08/06/database-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pidgin Status Update from Twitter</title>
		<link>http://extrabright.com/blog/2008/08/06/pidgin-status-update-from-twitter/</link>
		<comments>http://extrabright.com/blog/2008/08/06/pidgin-status-update-from-twitter/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 16:37:22 +0000</pubDate>
		<dc:creator>pajai</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[pat]]></category>
		<category><![CDATA[twitter pidgin gtalk]]></category>

		<guid isPermaLink="false">http://extrabright.com/blog/?p=133</guid>
		<description><![CDATA[Just figured out how to get Twitter update the pidgin status (e.g. GTalk, Jabber, ICQ, MSN, etc.). For that, you need to install a pidgin plug-in written in Perl. Here is a small howto about it (as the Perl stuff was a bit tricky):
Download and install the multi-network Pidgin client
Install Perl. On Windows (yeah, I [...]]]></description>
			<content:encoded><![CDATA[<p>Just figured out how to get Twitter update the pidgin status (e.g. GTalk, Jabber, ICQ, MSN, etc.). For that, you need to install a pidgin plug-in written in Perl. Here is a small howto about it (as the Perl stuff was a bit tricky):</p>
<li>Download and install the multi-network <a href="http://www.pidgin.im/" onclick="javascript:urchinTracker ('/outbound/article/www.pidgin.im');">Pidgin</a> client</li>
<li>Install Perl. On Windows (yeah, I know. It&#8217;s at work. <img src='http://extrabright.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ), install <a href="http://www.activestate.com/downloads/index.mhtml" onclick="javascript:urchinTracker ('/outbound/article/www.activestate.com');">Active Perl</a> version 5.8.8.X. Don&#8217;t take the last one, the 5.10.0, as Pidgin does not support it yet.</li>
<li>Install the Package XML:XPath, either using the CPAN console (install XML:XPath) or using the package manager of Active Perl.</li>
<li>Restart Pidgin and check that Perl is enabled. (Help -> About -> at the bottom of the page, you should see &#8216;Perl: Enabled&#8217;).</li>
<li>Download the <a href="http://code.google.com/p/pidgin-twitterstatus/wiki/Installation" onclick="javascript:urchinTracker ('/outbound/article/code.google.com');">twitter plugin</a> and put it in the plugin folder of Pidgin. (For instance on Windows in &#8216;C:\Program Files\Pidgin\plugins&#8217;)</li>
<li>Configure the plug-in and enjoy!</li>
]]></content:encoded>
			<wfw:commentRss>http://extrabright.com/blog/2008/08/06/pidgin-status-update-from-twitter/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Posting from the iphone</title>
		<link>http://extrabright.com/blog/2008/07/25/posting-from-the-iphone/</link>
		<comments>http://extrabright.com/blog/2008/07/25/posting-from-the-iphone/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 20:56:59 +0000</pubDate>
		<dc:creator>pajai</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[pat]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://extrabright.com/blog/2008/07/25/posting-from-the-iphone/</guid>
		<description><![CDATA[Testing the wordpress application on the iPhone. It seems quite easy to post something. Apparently it works also on a self-hosted wordpress instance.
]]></description>
			<content:encoded><![CDATA[<p>Testing the wordpress application on the iPhone. It seems quite easy to post something. Apparently it works also on a self-hosted wordpress instance.</p>
]]></content:encoded>
			<wfw:commentRss>http://extrabright.com/blog/2008/07/25/posting-from-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
