<?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>Divide and Conquer &#187; Off-topic</title>
	<atom:link href="http://www.divideandconquer.se/category/off-topic/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.divideandconquer.se</link>
	<description>David's Software Development Blog</description>
	<lastBuildDate>Thu, 24 Jun 2010 13:47:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Letting Go (of domain names) Is Never Easy</title>
		<link>http://www.divideandconquer.se/2009/09/30/letting-go-of-domain-names-is-never-easy/</link>
		<comments>http://www.divideandconquer.se/2009/09/30/letting-go-of-domain-names-is-never-easy/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 06:28:52 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Off-topic]]></category>
		<category><![CDATA[domain names]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=555</guid>
		<description><![CDATA[So, I have registered a few more domain names than I really need. The domain names are usually a result of this:

I get a good (or bad) idea for a web site project
I think of good (and bad) domain names for the project
I register a domain name for the web site
But, because I already have [...]]]></description>
			<content:encoded><![CDATA[<p>So, I have registered a few more domain names than I really need. The domain names are usually a result of this:</p>
<ol>
<li>I get a good (or bad) idea for a web site project</li>
<li>I think of good (and bad) domain names for the project</li>
<li>I register a domain name for the web site</li>
<li>But, because I already have work, family and a whole bunch of existing projects to attend to, I never get very far with implementing the web site</li>
</ol>
<p>Then, a year later, the domain name needs to be renewed. One possible action:</p>
<p style="padding-left: 30px;">A slight hope of continuing the project and some squirreling tendencies makes me renew the domain registration.</p>
<p>Another possible action:</p>
<p style="padding-left: 30px;">Let the domain name registration expire.</p>
<p>But it does not feel good at all:</p>
<p style="padding-left: 30px;">No! Not one of my domain names! They are part of the family! If I let them expire they will be bought by someone running a parked domain monetization scheme!</p>
<p>I actually counted to three domains of mine that will expire during the months to come. And then there are a couple of domain names I want to register if they become available&#8230; Letting Go Is Never Easy!</p>
<p>Btw, have you tried my <a href="http://google-apps-test.2good.com/" onclick="pageTracker._trackPageview('/outgoing/google-apps-test.2good.com/?referer=');">Google Apps™ Test</a> service? It checks if a domain name is connected to Google Apps, the Google Apps mail service, Google Sites or Blogger.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2009/09/30/letting-go-of-domain-names-is-never-easy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Network printer power-on when needed</title>
		<link>http://www.divideandconquer.se/2009/05/07/network-printer-power-on-when-needed/</link>
		<comments>http://www.divideandconquer.se/2009/05/07/network-printer-power-on-when-needed/#comments</comments>
		<pubDate>Thu, 07 May 2009 19:50:32 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Off-topic]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=385</guid>
		<description><![CDATA[My FreeBSD server is now equipped with a TellStick for control of  433.92 Mhz wireless remote switches. Our home is not (yet :-) fully controlled by remote switches but we have a few of them now. One of the features I wanted was to control some lights but for some reason the TellStick in [...]]]></description>
			<content:encoded><![CDATA[<p>My FreeBSD server is now equipped with a <a href="http://www.telldus.se/" onclick="pageTracker._trackPageview('/outgoing/www.telldus.se/?referer=');">TellStick</a> for control of  433.92 Mhz wireless remote switches. Our home is not (yet :-) fully controlled by remote switches but we have a few of them now. One of the features I wanted was to control some lights but for some reason the TellStick in the server closet does not reach one of the remote switches so I might get an <a href="http://www.nexa.se/SignalforstarkareExender.htm" onclick="pageTracker._trackPageview('/outgoing/www.nexa.se/SignalforstarkareExender.htm?referer=');">extender</a> for that later on.</p>
<p>Something that seems to work very well is remote control of a 230V fan (actually an old dual-fan PSU, but it&#8217;s a temporary solution) in the server closet. The server closet is next to our bedroom so in order to get rid of some noise at night I now use the TellStick to turn off the fan at 22:00 and start it again at 8:00.</p>
<p>The hack that this blog post is about is meant to power-on my networked HP LaserJet 2200 on demand.  We seldom print everyday so it&#8217;s rather pointless to have the printer on all the time. I implemented this solution for fun and I&#8217;m not sure that I&#8217;m going to keep it.</p>
<p>I thought for a while about how to detect when any computer on the network was trying to print, and I decided to try to listen for ARP <em>who-has</em> requests. This is (almost) the script I use:</p>
<blockquote>
<pre>#!/bin/sh
/usr/sbin/tcpdump -i em0 -q -l -n arp dst host 172.16.0.96 2&gt;/dev/null |
while read line; do
  /home/david/bin/printer.sh 1 &gt; /dev/null 2&gt;&amp;1
done</pre>
</blockquote>
<p>As you might deduce from the script it will try to turn on the printer for every ARP request for the printer IP address. This will cause more power-on signals to be sent than necessary, but I call that a feature! :-)</p>
<p>The printer.sh script looks like this:</p>
<blockquote>
<pre>#!/bin/sh
`dirname $0`/nexa.sh D 2 $1</pre>
</blockquote>
<p>And this is the nexa.sh script:</p>
<blockquote><pre>#!/bin/sh
/usr/local/bin/sudo `dirname $0`/rfcmd LIBUSB NEXA $1 $2 $3</pre>
</blockquote>
<p><a href="http://www.telldus.se/wiki/index.php?title=Rfcmd" onclick="pageTracker._trackPageview('/outgoing/www.telldus.se/wiki/index.php?title=Rfcmd&amp;referer=');">Rfcmd</a> is a command line tool for interfacing with the TellStick. I run it as root and I use libusb for the USB support.</p>
<p>A future improvement could be to turn off the printer after it&#8217;s been unused for a certain time, but now I simply call printer.sh to turn it off at midnight.</p>
<p>I don&#8217;t know if it is bad for the printer to cut the power but it already has a serious smear issue so I&#8217;ll only keep it until the toner runs out and then buy a new printer. Brand new networked laser printers with duplex start at €200 here in .se so it shouldn&#8217;t be too expensive to get one with good Linux support when the time comes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2009/05/07/network-printer-power-on-when-needed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving IMAP accounts from Courier to Google Mail</title>
		<link>http://www.divideandconquer.se/2009/05/06/moving-imap-accounts-from-courier-to-google-mail/</link>
		<comments>http://www.divideandconquer.se/2009/05/06/moving-imap-accounts-from-courier-to-google-mail/#comments</comments>
		<pubDate>Wed, 06 May 2009 20:11:19 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Off-topic]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=376</guid>
		<description><![CDATA[I ran imapsync on my mail server like this to move a couple of accounts away from my server:
imapsync  &#8211;syncinternaldates &#8211;host1 localhost &#8211;user1 user &#8211;password1 secret  &#8211;host2 imap.gmail.com &#8211;port2 993 &#8211;ssl2 &#8211;user2 user@gmail.com &#8211;password2 secret  &#8211;authmech1 LOGIN &#8211;authmech2 LOGIN &#8211;split2 100
(Wordpress is a bit too clever, so &#8212; above means two hyphens. Sorry.)
Parts of the [...]]]></description>
			<content:encoded><![CDATA[<p>I ran imapsync on my mail server like this to move a couple of accounts away from my server:</p>
<blockquote><p>imapsync  &#8211;syncinternaldates &#8211;host1 localhost &#8211;user1 user &#8211;password1 secret  &#8211;host2 imap.gmail.com &#8211;port2 993 &#8211;ssl2 &#8211;user2 user@gmail.com &#8211;password2 secret  &#8211;authmech1 LOGIN &#8211;authmech2 LOGIN &#8211;split2 100</p></blockquote>
<p>(Wordpress is a bit too clever, so &#8212; above means two hyphens. Sorry.)</p>
<p>Parts of the output looks weird but everything seems to work anyway. For example:</p>
<blockquote><p>Host imap.gmail.com says it has NO CAPABILITY for AUTHENTICATE LOGIN<br />
Success login on [imap.gmail.com] with user [user@gmail.com] auth [LOGIN]</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2009/05/06/moving-imap-accounts-from-courier-to-google-mail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spotify Mixer DJ Software</title>
		<link>http://www.divideandconquer.se/2009/04/28/spotify-mixer-dj-software/</link>
		<comments>http://www.divideandconquer.se/2009/04/28/spotify-mixer-dj-software/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 16:34:29 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Off-topic]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=363</guid>
		<description><![CDATA[This is not a new idea. A Swedish forum has a discussion thread Dj:a med Spotify that suggested the same thing months ago.
With both despotify and libspotify available, someone with time and interest could make something like UltraMixer but with Spotify as the main source of music. A DJ with this application would have the [...]]]></description>
			<content:encoded><![CDATA[<p>This is not a new idea. A Swedish forum has a discussion thread <a href="http://forum.studio.se/index.php?showtopic=59830" onclick="pageTracker._trackPageview('/outgoing/forum.studio.se/index.php?showtopic=59830&amp;referer=');">Dj:a med Spotify</a> that suggested the same thing months ago.</p>
<p>With both <a href="/2009/02/24/open-source-client-for-spotify/">despotify</a> and <a href="/2009/04/07/libspotify-the-official-spotify-library/">libspotify</a> available, someone with time and interest could make something like <a href="http://www.ultramixer.com/index.php?cn=products&amp;c2=ultramixer" onclick="pageTracker._trackPageview('/outgoing/www.ultramixer.com/index.php?cn=products_amp_c2=ultramixer&amp;referer=');">UltraMixer</a> but with Spotify as the main source of music. A DJ with this application would have the world&#8217;s biggest record crate!</p>
<p>Some possible obstacles:</p>
<ul>
<li>Playing more than one song at a time. Could be solved with multiple Spotify accounts.</li>
<li>How does streaming affect BPM and changing pitch? Use a big cache?</li>
<li>Maybe the libspotify Terms of Use has some restriction affecting this</li>
</ul>
<p>I will also suggest Spotify integration to the UltraMixer developers. Maybe that could earn me a &#8220;Professional&#8221; license? :-)</p>
<p>By the way, has anyone made a uniform interface to <a href="/2009/02/24/open-source-client-for-spotify/">despotify</a> and <a href="/2009/04/07/libspotify-the-official-spotify-library/">libspotify</a> so that they can be used interchangeably?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2009/04/28/spotify-mixer-dj-software/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SSL certificate anguish revisted</title>
		<link>http://www.divideandconquer.se/2009/04/23/ssl-certificate-anguish-revisted/</link>
		<comments>http://www.divideandconquer.se/2009/04/23/ssl-certificate-anguish-revisted/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 06:12:09 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Off-topic]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=352</guid>
		<description><![CDATA[About one year and one month ago I wrote about  SSL certificate anguish. Recently the certificate has expired so I wanted to create a new one. Unfortunately the apache2-ssl-certificate tool went missing and as my server runs Ubuntu 8.04.2 (Hardy) it&#8217;s simply not there!
I did this to create the new self-signed certificate:

Download the apache2-common [...]]]></description>
			<content:encoded><![CDATA[<p>About one year and one month ago I wrote about  <a href="http://www.divideandconquer.se/2008/03/21/ssl-certificate-anguish/">SSL certificate anguish</a>. Recently the certificate has expired so I wanted to create a new one. Unfortunately <a href="https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/77675/" onclick="pageTracker._trackPageview('/outgoing/bugs.launchpad.net/ubuntu/+source/apache2/+bug/77675/?referer=');">the apache2-ssl-certificate tool went missing</a> and as my server runs Ubuntu 8.04.2 (Hardy) it&#8217;s simply not there!</p>
<p>I did this to create the new self-signed certificate:</p>
<ol>
<li>Download the apache2-common package for Dapper</li>
<li>Extract it with dpkg-deb</li>
<li>Install /usr/share/apache2/ssleay.cnf and /usr/sbin/apache2-ssl-certificate manually</li>
<li>Run <tt>apache2-ssl-certificate --force -date 365</tt><br />
(There should be two dashes before &#8220;force&#8221; and one dash before &#8220;date&#8221;. Very logical, and WordPress might not show it properly.)</li>
</ol>
<p>Maybe I should have increased the time the certificate is valid to more than that, but then I won&#8217;t get the chance to revisit this blog post in about a year&#8230; :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2009/04/23/ssl-certificate-anguish-revisted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL, the new Cinderella</title>
		<link>http://www.divideandconquer.se/2009/04/21/mysql-the-new-cinderella/</link>
		<comments>http://www.divideandconquer.se/2009/04/21/mysql-the-new-cinderella/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 07:37:34 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Off-topic]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Sun]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/2009/04/21/mysql-the-new-cinderella/</guid>
		<description><![CDATA[Oracle tried to buy MySQL. Sun bought MySQL. Oracle buys Sun. 
MySQL will become Cinderella with the ugly stepmother Oracle mistreating her.
]]></description>
			<content:encoded><![CDATA[<p>Oracle tried to buy MySQL. Sun bought MySQL. Oracle buys Sun. </p>
<p>MySQL will become Cinderella with the ugly stepmother Oracle mistreating her.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2009/04/21/mysql-the-new-cinderella/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 9.04 will be released on Thursday</title>
		<link>http://www.divideandconquer.se/2009/04/21/ubuntu-904-will-be-released-on-thursday/</link>
		<comments>http://www.divideandconquer.se/2009/04/21/ubuntu-904-will-be-released-on-thursday/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 07:00:21 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Off-topic]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=345</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><script src="http://www.ubuntu.com/files/countdown/display.js" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2009/04/21/ubuntu-904-will-be-released-on-thursday/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tired of Lighttpd</title>
		<link>http://www.divideandconquer.se/2009/04/14/tired-of-lighttpd/</link>
		<comments>http://www.divideandconquer.se/2009/04/14/tired-of-lighttpd/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 08:30:24 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Off-topic]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=327</guid>
		<description><![CDATA[The initial VPS package I ordered did not have very much RAM so I decided to run Lighttpd. Since then I have upgraded the VPS to a pretty luxurious package so the RAM limitation hardly applies anymore.
I still haven&#8217;t moved all my websites from the old server to the VPS and I just realized that [...]]]></description>
			<content:encoded><![CDATA[<p>The initial VPS package I ordered did not have very much RAM so I decided to run Lighttpd. Since then I have upgraded the VPS to a pretty luxurious package so the RAM limitation hardly applies anymore.</p>
<p>I still haven&#8217;t moved all my websites from the old server to the VPS and I just realized that a big threshold is moving the web server configuration from Apache to Lighttpd. Now I plan to revert to Apache on the VPS before migrating more websites.</p>
<p>Lighttpd is not bad, but I&#8217;ll save it for simpler setups than my 20+ virtual hosts  including multiple forums, blogs, wikis&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2009/04/14/tired-of-lighttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My laptop is back from service</title>
		<link>http://www.divideandconquer.se/2009/01/14/my-laptop-is-back-from-service/</link>
		<comments>http://www.divideandconquer.se/2009/01/14/my-laptop-is-back-from-service/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 12:03:38 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Off-topic]]></category>
		<category><![CDATA[Thinkpad]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=300</guid>
		<description><![CDATA[After the RAM failure I procrastinated for two weeks before sending the laptop to service and then it took a month (including Christmas and stuff) to get it back. After service they tried to return it to the wrong address by changing the first letter in the street name from S to T and dropping [...]]]></description>
			<content:encoded><![CDATA[<p>After the <a href="http://www.divideandconquer.se/2008/12/02/mysterious-crashes-ram-memory-failure/">RAM failure</a> I procrastinated for two weeks before sending the laptop to service and then it took a month (including Christmas and stuff) to get it back. After service they tried to return it to the wrong address by changing the first letter in the street name from S to T and dropping the first digit in the street number. Weird.</p>
<p>According to the notes they only changed &#8220;planar&#8221; (motherboard in ThinkPad lingo, I think) and &#8220;palm rest&#8221; but the latter looks the same to me. I just hope that everything works so I don&#8217;t have to send it again.</p>
<p><strong>Update</strong> I inserted the hard disk, booted memest86 from the grub menu and let it run a few tests. After that I pressed Esc to exit memtest and it said &#8220;Halting&#8221; but it didn&#8217;t shutdown so I powered off. Booting again never lights up the screen! I did see that the display problem was not fixed though. Pretty annoying.</p>
<p><strong>Update 2 next morning</strong> The screen lit up properly and the laptop tried PXE boot as I had removed the hard disk drive again. I need to investigate further.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2009/01/14/my-laptop-is-back-from-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moved the first Ruby on Rails site from Apache to Lighttpd</title>
		<link>http://www.divideandconquer.se/2008/12/23/moved-the-first-ruby-on-rails-site-from-apache-to-lighttpd/</link>
		<comments>http://www.divideandconquer.se/2008/12/23/moved-the-first-ruby-on-rails-site-from-apache-to-lighttpd/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 13:50:14 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Off-topic]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=292</guid>
		<description><![CDATA[Yesterday I managed to move the first Ruby on Rails site to its new home on the VPS. The move had been easier if I hadn&#8217;t decided to use Lighttpd this time around, but finally I got everything working. The site I moved is only the administration interface for the energy drink database used by [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I managed to move the first Ruby on Rails site to its new home on the VPS. The move had been easier if I hadn&#8217;t decided to use Lighttpd this time around, but finally I got everything working. The site I moved is only the administration interface for the energy drink database used by <a href="http://taurin.se" onclick="pageTracker._trackPageview('/outgoing/taurin.se?referer=');">taurin.se</a>, but now I should be able to move that site too. The administration interface should probably also be upgraded from its ancient Ruby on Rails version, but I&#8217;m saving that for later. (<a href="/2008/12/21/upgraded-my-freebsd-file-server/">Technical debt again?</a>)</p>
<p>The Ruby on Rails parts of my Lighttpd configuration currently consists of a $HTTP["host"] conditional like this:</p>
<pre>$HTTP["host"] == "admin.taurin.se" {
    var.site = "admin.taurin.se"
    var.RAILS_ENV = "production"
    include "incl-rubyonrails.conf"
}</pre>
<p>And the hopefully reusable include file incl-rubyonrails.conf looks like this:</p>
<pre>server.document-root        = basedir + site + "/public"
server.indexfiles           = ( "dispatch.fcgi", "index.html" )
server.error-handler-404    = "/dispatch.fcgi"

fastcgi.server =  (".fcgi" =&gt; ( site =&gt;
(
"socket" =&gt; "/tmp/" + site + ".fastcgi",
"bin-path" =&gt; basedir + site + "/public/dispatch.fcgi",
"bin-environment" =&gt; ( "RAILS_ENV" =&gt; RAILS_ENV )
)
))</pre>
<p>The var.basedir variable is also set before including the file above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2008/12/23/moved-the-first-ruby-on-rails-site-from-apache-to-lighttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
