<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">]>
<rss version="2.0" xml:base="http://diaryproducts.net">
<channel>
 <title>Hannes Schmidt&#039;s blog</title>
 <link>http://diaryproducts.net/blog/hannes_schmidt</link>
 <description></description>
 <language>en</language>
<item>
 <title>NSTreeController&#039;s add, addChild, insert and insertChild methods</title>
 <link>http://diaryproducts.net/nstreecontrollers_add_addchild_insert_and_insertchild_methods</link>
 <description>&lt;p&gt;I had a hard time interpreting Apple&#039;s documentation of NSTreeController&#039;s mutator methods and their corresponding &lt;code&gt;canXyz&lt;/code&gt; methods. My experiments did reveal symmetry in and consistency among the semantics of these methods, it&#039;s just that their naming is a bit odd (I say that coming from a strong Java background). The docs didn&#039;t help much either. I only investigated NSTreeController in entity mode, but I would guess that these methods behave identically in object mode as far as the pre-conditions and the position of the new node are concerned.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;add&lt;/code&gt;: Creates a new entity and makes it the last sibling of the selected entity. IOW, the new entity becomes the last child of the selected entity&#039;s parent. Without a selection, the entity becomes the last top-level (orphan) entity. Think &lt;code&gt;appendSibling&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;canAdd&lt;/code&gt;: Have never observed it to be false.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;insert&lt;/code&gt;: Creates a new entity and makes it a sibling of the selected entity, immediately preceding it. Without a selection, the entity becomes the first top-level entity. Think &lt;code&gt;prependSibling&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;canInsert&lt;/code&gt;: Have never observed it to be false.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;addChild&lt;/code&gt;: Does nothing if the selected entity is a leaf. Otherwise, creates a new entity and adds it as the last child of the selection. Think &lt;code&gt;appendChild&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;canAddChild&lt;/code&gt;: False if selection is a leaf.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;insertChild&lt;/code&gt;: Does nothing if the selected entity is a leaf. Otherwise, creates a new entity and adds it as the first child of the selection.Think &lt;code&gt;prependChild&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;canInsertChild&lt;/code&gt;: False if selection is a leaf.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please not that these are empirical findings. I am pretty confident that they are accurate for the mutators, I am pretty sure that they are incomplete for the &lt;code&gt;canXyz&lt;/code&gt; methods. In other words, even if &lt;code&gt;canAdd&lt;/code&gt; seems to be true all the time, I wouldn&#039;t assume that &lt;code&gt;add&lt;/code&gt; always succeeds and still bind to &lt;code&gt;canAdd&lt;/code&gt;.&lt;/p&gt;
</description>
 <pubDate>Fri, 09 Jul 2010 21:59:00 +0200</pubDate>
</item>
<item>
 <title>Debian/Ubuntu packages for Hudson CI </title>
 <link>http://diaryproducts.net/about/operating_systems/unix/debian_ubuntu_packages_for_hudson_ci</link>
 <description>&lt;p&gt;The awesome &lt;a href=&quot;http://hudson-ci.org/&quot;&gt;Hudson Continuous Integration&lt;/a&gt; project seems to be undergoing some organizational changes at the moment. Its leader, &lt;a href=&quot;http://kohsuke.org/&quot;&gt;Kohsuke Kawaguchi&lt;/a&gt; has left Sun/Oracle and started up his own company revolving around professional services for Hudson, it seems. Let&#039;s hope this is not going to be one of those messy &quot;open-source project going commercial&quot; scenarios. Anyways, one of the more immediate problems caused by the changes is that the Debian package repository did not get any updates since late March. In a Hudson mailing list Kohsuke casually announced that he&#039;d be pushing packages to this &lt;a href=&quot;http://pkg.hudson-labs.org/debian/&quot;&gt;Hudson CI Debian and Ubuntu package repository&lt;/a&gt; but this fact isn&#039;t reflected on the official Hudson website yet which is why I am mentioning it here, putting all of my SEO weight behind the link&amp;nbsp;;-).&lt;/p&gt;
</description>
 <category domain="http://diaryproducts.net/exactly/about/operating_systems/unix">Unix</category>
 <pubDate>Wed, 05 May 2010 19:19:32 +0200</pubDate>
</item>
<item>
 <title>Installing Bind9 with DLZ and MySQL backend on Ubuntu Jaunty (9.04) and Lucid (10.04)</title>
 <link>http://diaryproducts.net/about/operating_systems/unix/installing_bind9_with_dlz_and_mysql_backend_on_ubuntu_jaunty_9_04</link>
 <description>&lt;p class=&quot;meta&quot;&gt;Update 06/27/2010: This is still necessary for Lucid (10.04 LTS) and these instructions still work with minor adjustments.&lt;/p&gt;
&lt;p&gt;This &lt;a href=&quot;http://ubuntuforums.org/showthread.php?t=823578&quot;&gt;forum post&lt;/a&gt; got me started but I got stuck in various places and thought I&#039;d summarize what worked for me. I&#039;m not going to explain much but if you&#039;re going to work with Bind and DLZ you probably know what you&#039;re dealing with. I also won&#039;t go into configuring DLZ because that depends on your particular DB schema and there is sufficient documentation on the &lt;a href=&quot;http://bind-dlz.sourceforge.net/&quot;&gt;DLZ&lt;/a&gt; website.&lt;/p&gt;
&lt;p&gt;We need MySQL of course:&lt;/p&gt;
</description>
 <category domain="http://diaryproducts.net/exactly/about/operating_systems/unix">Unix</category>
 <pubDate>Thu, 24 Dec 2009 23:48:59 +0100</pubDate>
</item>
<item>
 <title>Domain Name (Dis)service</title>
 <link>http://diaryproducts.net/domain_name_dis_service</link>
 <description>&lt;p&gt;There are plenty of openly accessible DNS servers available that do name resolution for you. Most Internet providers run them for their customers. There are also DNS providers that encourage you to replace your ISP&#039;s name server with theirs. OpenDNS is one example. They even do it without charging you! But remember, hardly anything on the Internet is free. Someone will have to pay the bill. AFAIK, OpenDNS&#039; business model is based on advertising revenue, so the advertiser pays the bill. This is how it works: If you accidentally type a URL with a nonexistent domain name, OpenDNS will resolve it to one of their web servers instead of returning an NXDOMAIN error. The web server will then serve a page with web search results related to the mistyped domain name and some advertisements.&lt;/p&gt;
</description>
 <category domain="http://diaryproducts.net/exactly/for/administrator">Administrator</category>
 <pubDate>Fri, 18 Sep 2009 18:41:07 +0200</pubDate>
</item>
<item>
 <title>Installing dbd-mysql for 64-bit binary installation of MySQL</title>
 <link>http://diaryproducts.net/installing_dbd_mysql_for_64_bit_binary_installation_of_mysql</link>
 <description>&lt;p&gt;The dbd-mysql gem assumes (?) an i386 architecture when building the native component of the driver. You&#039;ll need to set ARCHFLAGS appropriately and point the build at the installation of MySQL.&lt;/p&gt;
&lt;pre&gt;
sudo env ARCHFLAGS=&quot;-arch x86_64&quot; \
     gem install mysql -- \
     --with-mysql-config=/usr/local/mysql/bin/mysql_config
&lt;/pre&gt;&lt;p&gt;
That should fix it.&lt;/p&gt;
</description>
 <category domain="http://diaryproducts.net/exactly/about/operating_systems/mac_os_x">Mac OS X</category>
 <category domain="http://diaryproducts.net/exactly/for/administrator">Administrator</category>
 <pubDate>Sun, 21 Jun 2009 03:02:44 +0200</pubDate>
</item>
<item>
 <title>Multiple Google Notifier instances for multiple accounts on Mac OS X</title>
 <link>http://diaryproducts.net/about/operating_systems/mac_os_x/multiple_google_notifier_instances_for_multiple_accounts</link>
 <description>&lt;p&gt;I use &lt;a href=&quot;http://toolbar.google.com/gmail-helper/notifier_mac.html&quot;&gt;Google Notifier&lt;/a&gt; to have my Gmail account checked for new mail periodically and automatically. I have a secondary Gmail account that I don&#039;t use that often but that I would like to have notifier check as well. Unfortunately, Google Notifier currently supports a single Gmail account only. Here&#039;s a simple hack that works well for a few gmail accounts. In a nutshell, you need to clone the application package and modify the bundle id in the clone&#039;s &lt;code&gt;Contents/Info.plist&lt;/code&gt; file.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Copy the Google Notifier application from &lt;code&gt;Applications&lt;/code&gt; to a temporary location.&lt;/li&gt;
</description>
 <category domain="http://diaryproducts.net/exactly/about/operating_systems/mac_os_x">Mac OS X</category>
 <category domain="http://diaryproducts.net/exactly/for/geek">Geek</category>
 <pubDate>Fri, 19 Jun 2009 21:29:22 +0200</pubDate>
</item>
<item>
 <title>Overriding DHCP- or VPN-assigned DNS servers in Mac OS X Leopard</title>
 <link>http://diaryproducts.net/about/operating_systems/mac_os_x/overriding_dhcp_or_vpn_assigned_dns_servers_in_mac_os_x_leopard</link>
 <description>&lt;p&gt;I&#039;ll have to break sad news to you: /etc/resolv.conf has been made redundant in Mac OS X. The dig and nslookup utilities still read it but most applications use a different mechanism for picking DNS servers when resolving host names. They generally go through Darwin&#039;s resolver library which instead of reading /etc/resolv.conf looks up DNS servers via the SystemConfiguration framework backed by configd. Survival of the fittest, I guess, or, Darwin&#039;s intelligent design.&lt;/p&gt; 

&lt;p&gt;Ok, ok, I&#039;ll stop trying to be funny ... Anyways, this would be all swell if there wasn&#039;t the occasional need for manually specifying DNS servers. For me this need typically arises when I connect to a VPN managed by an operator from hell. After hours and hours of hard work (my fingertips still hurt from all the googling) I present to you a solution:&lt;p&gt;

&lt;p&gt;With the VPN connected, launch scutil with root privileges:&lt;p&gt;

&lt;pre&gt;hannes-mbp:~ Sysop$ sudo scutil
Password:&lt;/pre&gt;

List all network services with DNS configuration:

&lt;pre&gt;&amp;gt; list State:/Network/Service/[^/]+/DNS
  subKey [0] = State:/Network/Service/A3551F2D-62CE-1234-B79A-6EE50CA7AE30/DNS
  subKey [1] = State:/Network/Service/F194302A-846C-4321-9325-6813DAE148F2/DNS&lt;/pre&gt;

Pick one and show its contents.

&lt;pre&gt;&amp;gt; show State:/Network/Service/A3551F2D-62CE-1234-B79A-6EE50CA7AE30/DNS
&amp;lt;dictionary&amp;gt; {
  SupplementalMatchDomains : &amp;lt;array&amp;gt; {
    0 : 
  }
  ServerAddresses : &amp;lt;array&amp;gt; {
    0 : 192.168.1.74
    1 : 217.0.43.81
  }
  SupplementalMatchOrders : &amp;lt;array&amp;gt; {
    0 : 100000
  }
}&lt;/pre&gt;

Ahh, this is the one! So let&#039;s get rid of those pesky servers. Obtain a working copy of the DNS configuration entry. It&#039;s called ... drum roll ... well, obviously: &quot;d&quot; (rolls eyes).

&lt;pre&gt;&amp;gt; d.init
&amp;gt; get State:/Network/Service/A3551F2D-62CE-1234-B79A-6EE50CA7AE30/DNS
&amp;gt; d.show
&amp;lt;dictionary&amp;gt; {
  SupplementalMatchDomains : &amp;lt;array&amp;gt; {
    0 : 
  }
  ServerAddresses : &amp;lt;array&amp;gt; {
    0 : 192.168.1.74
    1 : 217.0.43.81
  }
  SupplementalMatchOrders : &amp;lt;array&amp;gt; {
    0 : 100000
  }
}&lt;/pre&gt;

Reset the ServerAddresses entry to an empty array: 

&lt;pre&gt;&amp;gt; d.add ServerAddresses *
&amp;gt; d.show
&amp;lt;dictionary&amp;gt; {
  ServerAddresses : &amp;lt;array&amp;gt; {
  }
  SupplementalMatchDomains : &amp;lt;array&amp;gt; {
    0 : 
  }
  SupplementalMatchOrders : &amp;lt;array&amp;gt; {
    0 : 100000
  }
}&lt;/pre&gt;

Write the working copy back:

&lt;pre&gt;&amp;gt; set State:/Network/Service/A3551F2D-62CE-1234-B79A-6EE50CA7AE30/DNS&lt;/pre&gt;

Note, that the line

&lt;pre&gt;d.add ServerAddresses *&lt;/pre&gt;

clears the ServerAddresses array, thereby removing all DNS-servers tied to that particular connection (&quot;service&quot; in Apple-talk). Without service-specific DNS servers, Mac OS will fall back to DNS servers from other network services. Not sure how exactly that works. If you want to specify particular DNS servers, use

&lt;pre&gt;d.add ServerAddresses * 10.0.1.2 112.21.44.66&lt;/pre&gt;

&lt;p&gt;By the way, the &quot;*&quot; signifies array values, so it&#039;s not some kind of wild card.&lt;/p&gt;</description>
 <category domain="http://diaryproducts.net/exactly/about/operating_systems/mac_os_x">Mac OS X</category>
 <category domain="http://diaryproducts.net/exactly/for/administrator">Administrator</category>
 <pubDate>Sun, 03 May 2009 22:13:55 +0200</pubDate>
</item>
<item>
 <title>Pimp Da Kitty</title>
 <link>http://diaryproducts.net/about/operating_systems/mac_os_x/pimp_my_leopard</link>
 <description>&lt;p&gt;I have been converted. After having preferred Windows on the desktop for the past 15 years, after six generations of&lt;/p&gt;
&lt;p style=&quot;text-align: center&quot;&gt;Yet Another Way To Screw Up The Control Panel,&lt;sup&gt;&amp;trade;&lt;/sup&gt;&lt;/p&gt;
I felt the urge to try something else. Something that&lt;br /&gt;
&lt;p style=&quot;text-align: center&quot;&gt;Just Works.&lt;sup&gt;&amp;trade;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Those fifteen years were an interesting ride but for some reason the pride and satisfaction of finding just the right combination of registry settings that would let me mount a Samba share had worn off. I want to spend my time on something creative. Defragmenting the registry, scanning regularly for malware, and trying to find anti-virus software that doesn&#039;t take five minutes to load is fun and all, but how about an operating system that doesn&#039;t need any of that? You guessed right, I have become a Mac user. Enough of the trivialities, in this article I would like to list a handful of very useful Mac OS X applications and utilities I couldn&#039;t live without anymore.&lt;/p&gt;
</description>
 <category domain="http://diaryproducts.net/exactly/about/operating_systems/mac_os_x">Mac OS X</category>
 <pubDate>Sat, 13 Dec 2008 08:46:59 +0100</pubDate>
</item>
<item>
 <title>Increase Wireshark Font Size on Mac OS X</title>
 <link>http://diaryproducts.net/for/administrator/increase_wireshark_font_size_on_mac_os_x</link>
 <description>&lt;p&gt;Wireshark has a preference setting for the font of the capture display but it won&#039;t let you change the main font used for other UI elements such as like menu, toolbar and dialog windows. The default for the main font is illegibly small on my Mac OS X Leopard system -- I used Macports to install Wireshark and its dependencies. To fix it you need to add the &lt;code&gt;gtk-font-name&lt;/code&gt; setting to your &lt;code&gt;.gtkrc-2.0&lt;/code&gt; preference file:&lt;/p&gt;
&lt;pre&gt;echo &#039;gtk-font-name = &quot;Sans 14&quot;&#039; &gt;&gt; ~/.gtkrc-2.0&lt;/pre&gt;
&lt;p&gt;This will affect all applications using the GTK 2.0 toolkit but I guess that&#039;s ok.&lt;/p&gt;
</description>
 <category domain="http://diaryproducts.net/exactly/about/operating_systems/mac_os_x">Mac OS X</category>
 <category domain="http://diaryproducts.net/exactly/for/administrator">Administrator</category>
 <category domain="http://diaryproducts.net/exactly/for/geek">Geek</category>
 <pubDate>Mon, 08 Dec 2008 02:58:21 +0100</pubDate>
</item>
<item>
 <title>Drupal vs. Wordpress</title>
 <link>http://diaryproducts.net/about/cms/drupal/drupal_vs_wordpress</link>
 <description>&lt;p&gt;A close relative of mine asked me to help him with choosing, installing and maintaining a blog for him. I am a big fan of Drupal (the software behind this blog, in case you were wondering) but just couldn&#039;t bring myself to recommend it. Don&#039;t get me wrong, Drupal is IMHO superior in almost all technical aspects but its user interface is just not as easy to use as WordPress. The person in question being a fairly inexperienced user of web technologies, usability was a major concern. The result can be admired at &lt;a href=&quot;http://hartwigschmidt.name/&quot;&gt;Hartwig Schmidt&lt;/a&gt;&#039;s blog.&lt;/p&gt;
</description>
 <category domain="http://diaryproducts.net/exactly/about/cms/drupal">Drupal</category>
 <category domain="http://diaryproducts.net/exactly/for/webmaster">Webmaster</category>
 <pubDate>Mon, 01 Dec 2008 02:46:55 +0100</pubDate>
</item>
<item>
 <title>&quot;No DBD Authn configured!&quot; with Apache, Digest Auth and DBD</title>
 <link>http://diaryproducts.net/no_dbd_authn_configured</link>
 <description>&lt;p&gt;I use mod_authn_dbd to check HTTP authentication credentials against a MySQL database. After switching from Basic to Digest authentication I got 500 errors and &lt;code&gt;No DBD Authn configured!&lt;/code&gt; in the server&#039;s error log. It took me a while to realize that it wasn&#039;t enough to change&lt;/p&gt;
</description>
 <category domain="http://diaryproducts.net/exactly/about/operating_systems/unix">Unix</category>
 <category domain="http://diaryproducts.net/exactly/about/web_servers">Web Servers</category>
 <category domain="http://diaryproducts.net/exactly/for/administrator">Administrator</category>
 <pubDate>Sat, 02 Feb 2008 22:10:26 +0100</pubDate>
</item>
<item>
 <title>Sending DNS notify messages (update notifications) using Ruby</title>
 <link>http://diaryproducts.net/dns_notify_ruby</link>
 <description>&lt;p&gt;&amp;hellip; is actually easy thanks to &lt;a href=&quot;https://rubyforge.org/projects/dnsruby/&quot;&gt;Dnsruby&lt;/a&gt;. The following code illustrates that:&lt;/p&gt;</description>
 <category domain="http://diaryproducts.net/exactly/about/programming_languages/ruby">Ruby</category>
 <category domain="http://diaryproducts.net/exactly/about/operating_systems/unix">Unix</category>
 <category domain="http://diaryproducts.net/exactly/about/web_servers">Web Servers</category>
 <category domain="http://diaryproducts.net/exactly/about/operating_systems/windows">Windows</category>
 <pubDate>Sun, 20 Jan 2008 23:49:12 +0100</pubDate>
</item>
<item>
 <title>Quickly enable/disable default gateway for VPN on Windows</title>
 <link>http://diaryproducts.net/about/operating_systems/windows/enable_disable_default_gateway_vpn_windows</link>
 <description>&lt;p&gt;Whether a VPN connection has the &quot;Use default gateway on remote network&quot; option enabled has big impact on how network traffic from your machine is routed.&lt;/p&gt;
</description>
 <category domain="http://diaryproducts.net/exactly/about/operating_systems/windows">Windows</category>
 <category domain="http://diaryproducts.net/exactly/for/administrator">Administrator</category>
 <category domain="http://diaryproducts.net/exactly/for/dummy">Dummy</category>
 <pubDate>Thu, 10 Jan 2008 22:53:46 +0100</pubDate>
</item>
<item>
 <title>Windows Vista&#039;s DNS server priority issues in VPNs</title>
 <link>http://diaryproducts.net/about/operating_systems/windows/vista_dns_name_server_priority_vpn_tunnel</link>
 <description>&lt;p&gt;Today I ran into a subtle issue regarding the order in which Windows Vista queries connection-specific DNS servers. I tested a setup with a PPTP VPN server that also provides DNS name resolution services to its VPN clients. For that purpose I ran both a BIND 9 name server and a Poptop PPPD daemon on the same box. It is dual-homed, i.e. one interface is the private interface of the VPN tunnel endpoint and the other one is the public Ethernet interface through which the server is linked to the internet. I configured BIND to listen on both interfaces. &lt;/p&gt;
</description>
 <category domain="http://diaryproducts.net/exactly/about/operating_systems/unix">Unix</category>
 <category domain="http://diaryproducts.net/exactly/about/operating_systems/windows">Windows</category>
 <category domain="http://diaryproducts.net/exactly/for/administrator">Administrator</category>
 <pubDate>Fri, 28 Dec 2007 02:27:31 +0100</pubDate>
</item>
<item>
 <title>Ubuntu 6.01.1 &quot;Dapper Drake&quot; DVD Torrents</title>
 <link>http://diaryproducts.net/about/operating_systems/unix/ubuntu_6_01_1_dapper_drake_dvd_torrents</link>
 <description>&lt;p&gt;It took me sometime to find Ubuntu torrents that work. I noticed that the .torrent files on the official Ubuntu server and its mirrors point to dead torrents. After some digging, I found &lt;a href=&quot;http://torrent.ubuntu.com:6969/&quot;&gt;this tracker&lt;/a&gt; to be most up to date. In case you&#039;re stumbling over this problem too, give it a try. It seems to be the official Ubuntu tracker.&lt;/p&gt;
</description>
 <category domain="http://diaryproducts.net/exactly/about/operating_systems/unix">Unix</category>
 <category domain="http://diaryproducts.net/exactly/for/administrator">Administrator</category>
 <category domain="http://diaryproducts.net/exactly/for/geek">Geek</category>
 <pubDate>Sat, 02 Sep 2006 09:57:27 +0200</pubDate>
</item>
</channel>
</rss>

