<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Technopragmatics</title>
	
	<link>http://blog.technopragmatics.org</link>
	<description>Technology, Linux, FOSS, Music, Life and everything in between.</description>
	<pubDate>Thu, 30 Apr 2009 18:21:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/rac/ldyL" type="application/rss+xml" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>Synchronizing CPAN modules between different hosts</title>
		<link>http://blog.technopragmatics.org/2009/04/synchronizing-cpan-modules-between-different-hosts/</link>
		<comments>http://blog.technopragmatics.org/2009/04/synchronizing-cpan-modules-between-different-hosts/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 09:41:41 +0000</pubDate>
		<dc:creator>kchr</dc:creator>
		
		<category><![CDATA[Administration]]></category>

		<category><![CDATA[administration]]></category>

		<category><![CDATA[cpan]]></category>

		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://blog.technopragmatics.org/?p=21</guid>
		<description><![CDATA[For the second time this year I&#8217;ve taken on the task of setting up new servers as replacement for our old ones. Since the old ones run Debian and the freshly acquired ones have Ubuntu Server preinstalled on them, synchronizing packages between them was a breeze.
However, one of the old servers had quite a few [...]]]></description>
			<content:encoded><![CDATA[<p>For the second time this year I&#8217;ve taken on the task of setting up new servers as replacement for our old ones. Since the old ones run <a href="http://www.debian.org/">Debian</a> and the freshly acquired ones have <a href="http://www.ubuntu.com/products/whatisubuntu/serveredition">Ubuntu Server</a> preinstalled on them, synchronizing packages between them was a breeze.</p>
<p>However, one of the old servers had quite a few <a href="http://www.perl.org/">Perl</a> modules installed via <a href="http://www.cpan.org/">CPAN</a> and some of our applications that we were migrating to the new servers depend heavily on these little suckers. Naturally, CPAN packages are handled from the CPAN utilities and not the system&#8217;s local package manager, which left me with a clean Perl install and none of the required modules once the new server finished installing all the Ubuntu packages&#8230;</p>
<p>After a quick Google-fu workout <a href="http://www.perlmonks.org/?node_id=638835">I stumbled across the ingenious &#8220;autobundle&#8221; feature</a> for making bundled CPAN repository snapshots. This dumps all the installed packages and their version numbers in a snapshot file which is easily imported through CPAN on another host.</p>
<p>Here&#8217;s how!</p>
<div class="dean_ch" style="white-space: wrap;"># perl -MCPAN -e &#8216;autobundle&#8217;</div>
<p>Wow, that was fast! A quick look in our ~/.cpan directory shows us a newly created directory called &#8220;Bundle&#8221;, which is an installable CPAN package. In that directory we got our snapshot module, named by today&#8217;s date and the time we made the snapshot for easy archiving and separating different snapshots depending on when they were done.</p>
<p>To install it, just transfer the &#8220;Bundle&#8221; directory to your new server (along with the snapshot modules) and install it as you would install any other CPAN package or module:</p>
<div class="dean_ch" style="white-space: wrap;"># perl -MCPAN -e &#8216;install Bundle::Snapshot_2009_04_30_00&#8242;</div>
<p>This also makes a great feature for backing up your CPAN library state!</p>
<p>Now, if I only could get CPAN to automatically follow all dependencies without asking me for permission&#8230; Any ideas? ;-)</p>
<p><strong>UPDATE:</strong> I found another thread from the hackers over at perlmonks.org with tips on how to get your autobundle ordered by dependency, so that CPAN doesn&#8217;t bug you about needed packages even though they are included later on in the list. <a href="http://www.perlmonks.org/?node_id=455259">Check it out!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.technopragmatics.org/2009/04/synchronizing-cpan-modules-between-different-hosts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Validating check boxes and radio buttons with Prototype</title>
		<link>http://blog.technopragmatics.org/2008/11/validating-check-boxes-and-radio-buttons-with-prototype/</link>
		<comments>http://blog.technopragmatics.org/2008/11/validating-check-boxes-and-radio-buttons-with-prototype/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 12:59:34 +0000</pubDate>
		<dc:creator>kchr</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[prototype]]></category>

		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.technopragmatics.org/?p=11</guid>
		<description><![CDATA[The title might be misleading, but the kind of validation I was after is checking whether or not at least one option in a group of elements (check boxes or radio buttons) is checked. This is useful in cases where you want the user to make a choice on their own instead of accepting a default value, or in cases where you can't supply a default one.]]></description>
			<content:encoded><![CDATA[<p>The title might be misleading, but the kind of validation I was after is checking whether or not at least one option in a group of elements (check boxes or radio buttons) is checked.</p>
<p>This is useful in cases where you want the user to make a choice on their own instead of accepting a default value, or in cases where you can&#8217;t supply a default one. I wanted the validation to take place at client-side, before posting the form, so JavaScript is the only option.</p>
<p>I tried different approaches to this matter, but wound up with using the <a title="Prototype JavaScript framework: Easy Ajax and DOM manipulation for dynamic web applications" href="http://www.prototypejs.org/" target="_blank">Prototype</a> JavaScript framework which allowed me to construct an efficient little one-liner:</p>
<div class="dean_ch" style="white-space: wrap;">$( &quot;elements&quot; ).pluck( &#8216;checked&#8217; ).sort().uniq().find( function( b ) { return b; } );</div>
<p>Replace the <strong>elements</strong> selector with your own. Just make sure it returns a collection of checkboxes or radio buttons. It will return boolean <em>true</em> if at least one of the elements is checked, otherwise <em>false</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.technopragmatics.org/2008/11/validating-check-boxes-and-radio-buttons-with-prototype/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP development with Eclipse and Subversion</title>
		<link>http://blog.technopragmatics.org/2008/06/php-development-with-eclipse-and-subversion/</link>
		<comments>http://blog.technopragmatics.org/2008/06/php-development-with-eclipse-and-subversion/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 12:58:11 +0000</pubDate>
		<dc:creator>kchr</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[eclipse]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://blog.technopragmatics.org/?p=10</guid>
		<description><![CDATA[Eclipse is an open source IDE &#8212; or as they put it themselves: &#8220;universal toolset for development&#8221;. It is probably the most flexible development environment out there right now, with plug-in support for all major languages. I have used it for Java coding for about half a year now, and just started converting my PHP [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Eclipse" href="http://www.eclipse.org/" target="_blank">Eclipse</a> is an open source <a title="Wikipedia" href="http://en.wikipedia.org/wiki/Integrated_development_environment" target="_blank">IDE</a> &#8212; or as they put it themselves: &#8220;universal toolset for development&#8221;. It is probably the most flexible development environment out there right now, with plug-in support for all major languages. I have used it for Java coding for about half a year now, and just started converting my <a href="http://php.net" target="_blank">PHP</a> projects to Eclipse using the <a href="http://www.eclipse.org/pdt/" target="_blank">PHP Development  		Tools</a> (PDT) framework.</p>
<p>Since I try to use <a href="http://subversion.tigris.org/" target="_blank">Subversion</a> (SVN) for revision control of my code, I was pleased to know that there&#8217;s a mature extension to Eclipse called <a href="http://subclipse.tigris.org/" target="_blank">Subclipse</a> which practically lets you create projects based on SVN repositories - as well as providing you with a complete Subversion client from inside of Eclipse. Branching! Tagging! Merging! You&#8217;ll never have to leave your IDE again.</p>
<p>When Googling for some actual cases on this sweet blend, I found an article posted by Sandy Smith that covers the initial setup of a PHP-powered project through SVN in Eclipse, as well as some other useful tips.</p>
<p>Check it out here: <a href="http://tech.forumone.com/archives/29-HOWTO-Use-Eclipse-PDT-with-Subversion-in-13-Easy-Steps.html" target="_blank">HOWTO: Use Eclipse PDT with Subversion in 13 Easy Steps</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.technopragmatics.org/2008/06/php-development-with-eclipse-and-subversion/feed/</wfw:commentRss>
		</item>
		<item>
		<title>XBMC Script: Sveriges Radio v1.1</title>
		<link>http://blog.technopragmatics.org/2008/05/xbmc-script-sveriges-radio-v11/</link>
		<comments>http://blog.technopragmatics.org/2008/05/xbmc-script-sveriges-radio-v11/#comments</comments>
		<pubDate>Sat, 31 May 2008 09:43:35 +0000</pubDate>
		<dc:creator>kchr</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[sr]]></category>

		<category><![CDATA[xbmc]]></category>

		<guid isPermaLink="false">http://blog.technopragmatics.org/?p=9</guid>
		<description><![CDATA[I dug through my archives the other day, and stumbled upon a bunch of XBMC scripts which I haven&#8217;t used in a while. For those of you that aren&#8217;t &#8220;in the know&#8221;, XBMC (XBox Media Center) is a fully-fledged replacement dashboard for Xbox which basically lets you use your box as a HTPC. There are [...]]]></description>
			<content:encoded><![CDATA[<p>I dug through my archives the other day, and stumbled upon a bunch of <a href="http://xbmc.org/" target="_blank">XBMC</a> scripts which I haven&#8217;t used in a while. For those of you that aren&#8217;t &#8220;in the know&#8221;, XBMC (XBox Media Center) is a fully-fledged replacement dashboard for Xbox which basically lets you use your box as a HTPC. There are thousands of scripts available to enhance it, ranging from <a href="http://www.mythtv.org/wiki/index.php/Xbox_Frontend" target="_blank">MythTV frontends</a> to <a href="http://www.xbmcscripts.com/index.php?option=com_docman&amp;task=cat_view&amp;gid=14&amp;Itemid=36" target="_blank">YouTube browsers</a>.</p>
<p>The script I had in mind for this post is a nifty little critter (sveriges radio v1.0 by Stiffe) for browsing the different channels that are available on the public service radio network here in Sweden (SR, <a href="http://www.sr.se" target="_blank">Sveriges Radio</a>). It simply pops up a menu with the available channels and spawns a media player with the stream URL when a channel is selected. Neat and tidy, which is nice because the player available on their own site sucks (doesn&#8217;t play well with <a href="http://mplayerplug-in.sourceforge.net/" target="_blank">mplayer-mozilla</a> or totem).</p>
<p>However, SR is known to change their streaming server URLs every now and then which naturally breaks the script. This ruined my Saturday morning, so I hacked together a small fix with the new URL.</p>
<p>I threw in a little bonus too: 10 extra channels that are broadcasted on the SR network, including SR C (highly experimental radio - this is the real deal, folks).</p>
<p>Download it here: <a href="http://dump.rac.nu/pub/code/sveriges_radio-v1.1.tar.gz" target="_blank"></a><a href="http://dump.rac.nu/pub/code/sveriges_radio-v1.1.tar.gz" target="_blank">sveriges_radio-v1.1.tar.gz</a></p>
<p>Feel free to comment on any bugs or make a feature requests!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.technopragmatics.org/2008/05/xbmc-script-sveriges-radio-v11/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Logging SMTP errors with qmail</title>
		<link>http://blog.technopragmatics.org/2008/04/logging-smtp-errors-with-qmail/</link>
		<comments>http://blog.technopragmatics.org/2008/04/logging-smtp-errors-with-qmail/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 14:52:42 +0000</pubDate>
		<dc:creator>kchr</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[administration]]></category>

		<category><![CDATA[qmail]]></category>

		<category><![CDATA[qmail-scanner]]></category>

		<category><![CDATA[recordio]]></category>

		<category><![CDATA[smtp]]></category>

		<category><![CDATA[smtplf]]></category>

		<guid isPermaLink="false">http://blog.rac.nu/?p=6</guid>
		<description><![CDATA[For the past few days, a customer of ours has had problems receiving mail from one of their partners. While troubleshooting the SMTP traffic to our qmail server I stumbled upon the following line in our logs:
X-Qmail-Scanner-1.25st: Process XXXX closed, parent process died
This message occurs every single time they tried to send mail to our [...]]]></description>
			<content:encoded><![CDATA[<p>For the past few days, a customer of ours has had problems receiving mail from one of their partners. While troubleshooting the SMTP traffic to our qmail server I stumbled upon the following line in our logs:</p>
<blockquote><p>X-Qmail-Scanner-1.25st: Process XXXX closed, parent process died</p></blockquote>
<p>This message occurs every single time they tried to send mail to our customer.</p>
<p>It turns out they used a homebrew MUA which sent messages using Bare LFs as EOL instead of proper ones (according to document 822bis) - read <a href="http://cr.yp.to/docs/smtplf.html" target="_blank">DJB&#8217;s dwelling into this matter</a>.</p>
<p>Our qmail system rejects the mail as supposed to, and informs the sender about the problem (along with the above link describing why it is one) - but it does not log the incident. This could make it really hard when troubleshooting why some connections drop from time to time.</p>
<p>However, Len Budney were way ahead of me and wrote <a href="http://jeenyus.net/~budney/software/qscanq/logrej.html" target="_blank">this little tutorial</a> on how to use DJB&#8217;s <strong>recordio</strong> tool (included in his ucspi-tcp package) for extracting the relevant 4xx and 5xx errors from the SMTP conversation. This makes sure we log it with everything else in our qmail-smtpd logs!</p>
<p><strong>UPDATE</strong>: It seems that <strong>piping qmail-smtpd to recordio breaks SMTP TLS support</strong>. John M. Simpson writes the following on <a href="http://qmail.jms1.net/starttls.shtml">his excellent qmail information/patch collection site</a>:</p>
<blockquote><p>&#8230;It also means that, since the encrypted data stream is just as likely to contain a &#8220;<tt>0&#215;00</tt>&#8221; byte as any other, and the C language treats the zero byte as an &#8220;end of string&#8221; marker, programs such like &#8220;<tt>recordio</tt>&#8220;, which involve themselves in the data stream between the client and <tt>qmail-smtpd</tt>, are likely to become confused.</p></blockquote>
<p>Disable TLS by setting &#8220;DENY_TLS=1&#8243; as an environment variable in your qmail-smtpd startup script, while troubleshooting with recordio. Don&#8217;t forget to remove both the recordio pipe and the environment variable when you&#8217;re done!</p>
<p><strong>UPDATE #2: </strong>You can make qmail more forgiving by invoking <strong>fixcrio</strong> in your qmail-smtpd run script, before qmail-smtpd. This little tool is found in the ucspi-tcp package, and helps out by prepending a carriage return (CR) to every lone line feed (LF).</p>
<p>However, by going down this path you won&#8217;t tell the broken mailers that they&#8217;re actually broken&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.technopragmatics.org/2008/04/logging-smtp-errors-with-qmail/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Getting own content on top of Google Maps</title>
		<link>http://blog.technopragmatics.org/2008/04/getting-own-content-on-top-of-google-maps/</link>
		<comments>http://blog.technopragmatics.org/2008/04/getting-own-content-on-top-of-google-maps/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 07:57:16 +0000</pubDate>
		<dc:creator>kchr</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[google maps]]></category>

		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.rac.nu/?p=5</guid>
		<description><![CDATA[I just stumbled over a great solution to a problem I had; getting own content to float above a Google Maps IFRAME. I thought I had tried every possible way, using a variety of tricks. However, the solution would reveal itself to be much easier than I would have thought!
Ben Simon writes on his blog [...]]]></description>
			<content:encoded><![CDATA[<p>I just stumbled over a great solution to a problem I had; getting own content to float above a Google Maps IFRAME. I thought I had tried every possible way, using a variety of tricks. However, the solution would reveal itself to be much easier than I would have thought!</p>
<p>Ben Simon writes on <a href="http://benjisimon.blogspot.com/2008/03/google-maps-getting-content-to-overlay.html" target="_blank">his blog</a> on how he solved the issue nice and tidy by simply using a parent container for two child DIVs; the overlay and the map. Like this:</p>
<div class="dean_ch" style="white-space: wrap;">
&lt;div id=&quot;container&quot;&gt;<br />
&lt;div id=&quot;layer&quot;&gt;This will be on top of the map&lt;/div&gt;<br />
&lt;/div&gt;</div>
<p>Using the following CSS markup:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re0">#container</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw1">position</span>: <span class="kw2">relative</span>;<br />
<span class="br0">&#125;</span></p>
<p><span class="re0">#layer</span> <span class="br0">&#123;</span><br />
&nbsp; <span class="kw1">position</span>: <span class="kw2">absolute</span>;<br />
&nbsp; <span class="kw1">width</span>: <span class="re3">50px</span>;<br />
&nbsp; <span class="kw1">height</span>: <span class="re3">50px</span>;<br />
&nbsp; <span class="kw1">top</span>: <span class="re3">0px</span>;<br />
&nbsp; <span class="kw1">left</span>: <span class="re3">0px</span>;<br />
&nbsp; <span class="kw1">z-index</span>: <span class="re3">10px</span>;<br />
<span class="br0">&#125;</span></div>
<p>Very nice, Ben!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.technopragmatics.org/2008/04/getting-own-content-on-top-of-google-maps/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Behold, for I am alive.</title>
		<link>http://blog.technopragmatics.org/2008/03/behold-for-i-am-alive/</link>
		<comments>http://blog.technopragmatics.org/2008/03/behold-for-i-am-alive/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 15:03:52 +0000</pubDate>
		<dc:creator>kchr</dc:creator>
		
		<category><![CDATA[Blog]]></category>

		<category><![CDATA[introduction]]></category>

		<guid isPermaLink="false">http://blog.rac.nu/2008/03/27/behold-for-i-am-alive/</guid>
		<description><![CDATA[It&#8217;s true! I am now a proud owner of my very own WordPress blog - along with everyone else on the &#8216;Net.
My goal is to use this precious space to express my everyday thoughts, whether it&#8217;s code snippets I stumble upon during work hours, cool music thingies or just random stuff I have to get [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s true! I am now a proud owner of my very own WordPress blog - along with everyone else on the &#8216;Net.</p>
<p>My goal is to use this precious space to express my everyday thoughts, whether it&#8217;s code snippets I stumble upon during work hours, cool music thingies or just random stuff I have to get out of my head and through my fingers onto the keyboard.</p>
<p>Having a very wide spectrum of areas which I visit in my everyday work as a programmer and systems developer/administrator, I often stumble upon problems that needs to be solved. Just as often these problems has tons of cool solutions which fellow geeks has already worked out and published on the net, but I&#8217;m very (VERY) lazy and tend to forget this stuff as soon as I&#8217;m done with the project I worked on. Therefore, I want to use this blog as a way to save the cool stuff and maybe help spreading the word on my way through the space-time continuum.</p>
<p>Thanks for now.</p>
<p>Let&#8217;s see when my next update arrives&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.technopragmatics.org/2008/03/behold-for-i-am-alive/feed/</wfw:commentRss>
		</item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 0.371 seconds --><!-- Cached page served by WP-Cache -->
