<?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>Gerard JP &#187; All ENGLISH articles</title>
	<atom:link href="http://www.gerardjp.com/category/english/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gerardjp.com</link>
	<description>What&#039;s in my name?</description>
	<lastBuildDate>Tue, 24 Aug 2010 06:33:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>HTTP over SSH &#8230; The full Monty!</title>
		<link>http://www.gerardjp.com/2010/06/07/http-over-ssh-the-full-monty/</link>
		<comments>http://www.gerardjp.com/2010/06/07/http-over-ssh-the-full-monty/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 12:29:53 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[All ENGLISH articles]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.gerardjp.com/?p=1301</guid>
		<description><![CDATA[A utterly safe way to access websites over SSH]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been looking into this because I did not want to spend more money on extra IP addresses for SSL connects. But I do have several websites I want to access encrypted (that is .. not over plain HTTP).</p>
<p>There definitely are some articles (and forum threads) out there that come close, but this is how it&#8217;s done <img src='http://www.gerardjp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h1>Some predefs</h1>
<p>The goal is to be able to connect to multiple VirtualHost&#8217;s on an Apache webserver.</p>
<p>We have a localpc behind a NAT-ed internet connection (yourpc.locality.lan) and the aforementioned publicly accessible webserver on the net somewhere (yourserver.example.com).</p>
<p>I&#8217;m assuming you can already connect to your server via SSH, based on a pub/priv keypair.</p>
<h1>Local to remote</h1>
<p>There are some things that need to be set local AND remote to make sure that Apache knows to which (not publicly accessible) VirtualHost it must redirect your HTTP request. That is, make up a name and put it in your /etc/hosts file and have it resolve to 127.0.0.1. E.g:</p>
<pre>$ cat /etc/hosts
127.0.0.1 localhost

# For ssh tunneling
127.0.0.1 mysuperadminsite.locality.lan</pre>
<p><strong>Important! </strong>You need to put the &#8216;mysuperadminsite&#8217;  entry in your /etc/hosts file on your server as well. Otherwise it won&#8217;t work because Apache can&#8217;t figure out where this needs to go (more on apache config in a sec).</p>
<p>Then, the actual SSH tunnel command is this:</p>
<pre>ssh  -L 9002:mysuperadminsite.locality.lan:80 yourname@yourserver.example.com</pre>
<p>There are ofcourse nicer ways to fully hide/automate the SSH tunnel, but by doing it manually like this you are explicitly remembered that you&#8217;re in &#8216;admin-mode&#8217; <img src='http://www.gerardjp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h1>Apache trickery</h1>
<p>Ok, so how does Apache know where to go when your HTTP request hits the server side? As your mysuperadminsite request is resolved to 127.0.0.1 (on the server), apache needs this as a NameVirtualHost. So put this in your global Apache config somewhere.</p>
<pre># For admin work over SSH
NameVirtualHost 127.0.0.1:80</pre>
<p>Then you create an apache VirtualHost config with a setup like this.</p>
<pre>&lt;VirtualHost 127.0.0.1:80&gt;
	ServerName mysuperadminsite.locality.lan

	# Here you put your docroot, includes, logfile entries and whatever else you want.

&lt;/VirtualHost&gt;</pre>
<p>And so, apache resolves the request to 127.0.0.1 where, based on the X-Header (containing the mysuperadminsite name) sent by your browser, it actually finds a vhost to handle your request.</p>
<p>This is a very safe way to handle your secure access because the VirtualHost is only handled by apache when it comes in on your loopback interface. Moreover FQDN&#8217;s based on &#8220;locality.lan&#8221; are not resolvable in the outside world.</p>
<p>It does however require a second website instance. You could combine an externally accesible VirtualHost by starting your config with this.</p>
<pre>&lt;VirtualHost [external_ip]:80, 127.0.0.1:80&gt;
</pre>
<p>This way you don&#8217;t have to have a second VirtualHost config (and thus website instance) for management. But it&#8217;s easier to overlook going secure and thus have your passwords or whatever sniffed.</p>
<h1>Gotcha&#8217;s</h1>
<p>None that I know of, but feel free to point them out <img src='http://www.gerardjp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Safe computing!</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.gerardjp.com/2010/06/07/http-over-ssh-the-full-monty/&amp;t=HTTP+over+SSH+...+The+full+Monty%21" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=HTTP+over+SSH+...+The+full+Monty%21+-+http://b2l.me/anvdxa&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.gerardjp.com/2010/06/07/http-over-ssh-the-full-monty/&amp;title=HTTP+over+SSH+...+The+full+Monty%21" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.gerardjp.com/2010/06/07/http-over-ssh-the-full-monty/&amp;title=HTTP+over+SSH+...+The+full+Monty%21" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.gerardjp.com/2010/06/07/http-over-ssh-the-full-monty/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.gerardjp.com/2010/06/07/http-over-ssh-the-full-monty/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.gerardjp.com/2010/06/07/http-over-ssh-the-full-monty/&amp;title=HTTP+over+SSH+...+The+full+Monty%21" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.gerardjp.com/2010/06/07/http-over-ssh-the-full-monty/&amp;title=HTTP+over+SSH+...+The+full+Monty%21" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.gerardjp.com/2010/06/07/http-over-ssh-the-full-monty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django FormWizard best .. well .. useful practices</title>
		<link>http://www.gerardjp.com/2010/02/24/django-formwizard-best-well-useful-practices/</link>
		<comments>http://www.gerardjp.com/2010/02/24/django-formwizard-best-well-useful-practices/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 11:10:56 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[All ENGLISH articles]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[wizard]]></category>

		<guid isPermaLink="false">http://www.gerardjp.com/?p=1231</guid>
		<description><![CDATA[Django FormWizard usefulness: emulating decorators .. more to come]]></description>
			<content:encoded><![CDATA[<p><em>Edit</em>: After some re-writes of this post it is finally setup in a manor that is clean and failsafe.</p>
<p>After researching and setting up two FormWizards in Django I concluded some things that might be useful to others. Hence this post.</p>
<h2>Having userdata available throughout the wizard</h2>
<p>I&#8217;ve seen some solutions on the net for this but when you handle data from several models over different steps the best way to handle this is using Django&#8217;s session framework. In parse_params() in the beginning and end we repectively get/set data and store our data.</p>
<pre>def parse_params(self, request, *args, **kwargs):
    current_step = self.determine_step(request, *args, **kwargs)
    form = self.get_form(current_step, request.POST)

    # Pickup the dict from the users session or create a new one
    wizdata = request.session.get('wizdata') or {}

    # Your code goes here. E.g. set a value in the dict
    wizdata['some_key'] = 'Some value'

    # Store the possibly changed dict back in the users session.
    request.session['wizdata'] = wizdata
</pre>
<p>So whatever you do with the user data, it&#8217;s safe, and we can access it in any step throughout the wizardry.</p>
<pre>def render_template(self, request, form, previous_fields, step, context=None):
    wizdata = request.session.get('wizdata')

    # Your other code goes here. E.g. a conditional on previously set data.
    if wizdata.get('some_key'):
        # Do something with your data
        wizdata['some_key'] = 'Some other value'

    # And again, simply store the dict in the users session.
    request.session['wizdata'] = wizdata
</pre>
<p>You can imagine that in the parse_params() and the render_template() method you respectively have the &#8216;if current_step == &#8216; or &#8216;if step == &#8216; statements along the way. All having the wizdata dict available.</p>
<p>This also works in the done() method. Simply get the dict one last time from the user session.</p>
<pre>def done(self, request, form_list):
    wizdata = request.session.get('wizdata')

    # Other code here

    # Cleanup
    del request.session['wizdata']
</pre>
<p>Then, for tidyness, at the end of done() we remove the dict from the user session.</p>
<h3>Gotchas</h3>
<p>There can be stale data, in the form of our stored dicts, left behind when wizard sessions are not finished by the user. This also is true for the sessions itself. As stated in the <a title="The Django docs about sessions" href="http://docs.djangoproject.com/en/dev/topics/http/sessions/#clearing-the-session-table" target="_blank">The Django docs about sessions</a> you should clean up the sessions from time to time.</p>
<p>Anybody that has improvements, questions or compliments please drop me a line <img src='http://www.gerardjp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>GrtzG</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.gerardjp.com/2010/02/24/django-formwizard-best-well-useful-practices/&amp;t=Django+FormWizard+best+..+well+..+useful+practices" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Django+FormWizard+best+..+well+..+useful+practices+-+http://b2l.me/anvdxc&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.gerardjp.com/2010/02/24/django-formwizard-best-well-useful-practices/&amp;title=Django+FormWizard+best+..+well+..+useful+practices" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.gerardjp.com/2010/02/24/django-formwizard-best-well-useful-practices/&amp;title=Django+FormWizard+best+..+well+..+useful+practices" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.gerardjp.com/2010/02/24/django-formwizard-best-well-useful-practices/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.gerardjp.com/2010/02/24/django-formwizard-best-well-useful-practices/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.gerardjp.com/2010/02/24/django-formwizard-best-well-useful-practices/&amp;title=Django+FormWizard+best+..+well+..+useful+practices" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.gerardjp.com/2010/02/24/django-formwizard-best-well-useful-practices/&amp;title=Django+FormWizard+best+..+well+..+useful+practices" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.gerardjp.com/2010/02/24/django-formwizard-best-well-useful-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MP3 collection filesystem structure</title>
		<link>http://www.gerardjp.com/2010/01/19/mp3-collection-filesystem-structure/</link>
		<comments>http://www.gerardjp.com/2010/01/19/mp3-collection-filesystem-structure/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 14:07:48 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[All ENGLISH articles]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[clean]]></category>
		<category><![CDATA[filestructure]]></category>
		<category><![CDATA[mp3]]></category>

		<guid isPermaLink="false">http://www.gerardjp.com/?p=1191</guid>
		<description><![CDATA[A usable specification for naming conventions for MP3 collections. Coverart, track filenames, what to do? Well read this article :)]]></description>
			<content:encoded><![CDATA[<h2>The reason</h2>
<p>I recently <a title="Amarok kicked out the window. Hello Exaile!!" href="http://www.gerardjp.com/2010/01/04/amarok-kicked-out-the-window-hello-exaile/" target="_blank">moved away from amarok and started using Exaile</a> as my favorite audio player. I found out that Exaile automatically displays the cover art when it finds a &#8220;cover.jpg&#8221; in the album folder. Maybe I&#8217;ll start a &#8216;which-player-supports-what&#8217; post some day but don&#8217;t hold your breath <img src='http://www.gerardjp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I was very excited about this because my tast in music is &#8216;not mainstream&#8217; to say the least so all those cover fetcher tools leave a lot of gaps for my album art. Since I started to clean up a bit I wrote down the structure on a note to remember it once and for all. I thought I&#8217;d might as well publish it and so this post was born.</p>
<h2>Folder setup</h2>
<p>It&#8217;s all in folder &#8220;~/Music/&#8221; but that isn&#8217;t that important. The structure is set up as follows:</p>
<pre>Artist/Album/
             cover.jpg
             back.jpg
             info/              # For stuff like lyrics.txt, etc.
                  bookletX.jpg  # booklet images.
                  [back.jpg]    # if info/ exists this file moves here.</pre>
<p>If it&#8217;s a multiple disc album the CD directories are called &#8220;cd1&#8243;, &#8220;cd2&#8243;, so smalls and no spaces. Then the info directory can stay on album-top level, but I place a copy of cover.jpg in all cdX directories so Exaile displays them.</p>
<p>Then if the album is a compilation it&#8217;s placed in this directory (got this from iTunes <img src='http://www.gerardjp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<pre>~/Music/Compilations/</pre>
<p>You can find your Artists tag based because your player indexes those anyway. Assuming you use the tracks artist and not &#8220;Various artists&#8221;.</p>
<h2>Track file naming</h2>
<p>Then for naming the MP3 files themselves. When it&#8217;s a track in a full album:</p>
<pre>01 - Trackname.jpg</pre>
<p>When the track is in an album which is a compilation of various artists:</p>
<pre>01 - Artist - Trackname.jpg</pre>
<p>I noticed,when I used XMBC that it displays the tracks with &#8220;01. Trackname&#8221; even when naming them as above so that is at least understood without ambiguity.</p>
<p>When the track is just a single song:</p>
<pre>Artist - Trackname.jpg</pre>
<p>I have some old cassettes and MD&#8217;s I converted to MP3 in the past which have a Compilation suffix with &#8220;MD&#8221;, &#8220;AC&#8221;, &#8220;LP&#8221; at the end:</p>
<pre>Trilok Gurtu - African Fantasy - Crazy Saints - Compilation MD.mp3</pre>
<h2>TAGs</h2>
<p>Not to much hassle there. The only thing significant is when it&#8217;s a 1-pass MP3 of a full album the track title get&#8217;s some extra information. A full album suffix between brackets and a &#8220;cd1&#8243; addition when it&#8217;s a multiple CD album.</p>
<pre>Logical Progression cd1 (Full album)</pre>
<h2>Geeky</h2>
<p>I think the subject of this post is totally geeky anyway but nevertheless .. Currently in the tags all words get first caps but with words being between brackets like the aformentioned (Full album) only the first word get&#8217;s capitalized. (Although I&#8217;m not sure yet what to do when it&#8217;s a subtitle or name).</p>
<pre>Logical Progression cd1 (Full album)</pre>
<p>I think that covers most of it for now. Hope it&#8217;s helpfull to anyone going bonkers over there MP3 collections.</p>
<p>Suggestions are welcome ofcourse.</p>
<p>GrtzG.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.gerardjp.com/2010/01/19/mp3-collection-filesystem-structure/&amp;t=MP3+collection+filesystem+structure" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=MP3+collection+filesystem+structure+-+http://b2l.me/anvdxd&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.gerardjp.com/2010/01/19/mp3-collection-filesystem-structure/&amp;title=MP3+collection+filesystem+structure" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.gerardjp.com/2010/01/19/mp3-collection-filesystem-structure/&amp;title=MP3+collection+filesystem+structure" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.gerardjp.com/2010/01/19/mp3-collection-filesystem-structure/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.gerardjp.com/2010/01/19/mp3-collection-filesystem-structure/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.gerardjp.com/2010/01/19/mp3-collection-filesystem-structure/&amp;title=MP3+collection+filesystem+structure" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.gerardjp.com/2010/01/19/mp3-collection-filesystem-structure/&amp;title=MP3+collection+filesystem+structure" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.gerardjp.com/2010/01/19/mp3-collection-filesystem-structure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Amarok kicked out the window. Hello Exaile!!</title>
		<link>http://www.gerardjp.com/2010/01/04/amarok-kicked-out-the-window-hello-exaile/</link>
		<comments>http://www.gerardjp.com/2010/01/04/amarok-kicked-out-the-window-hello-exaile/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 14:57:58 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[All ENGLISH articles]]></category>
		<category><![CDATA[Diepe zucht]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[exaile]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.gerardjp.com/?p=1165</guid>
		<description><![CDATA[My god, what happend to Amarok. It used to be a great player. The latest version turned into a -non-intuitive-non-flexible-interface- audio player. As Brian says it very eloquently in Songbird vs. Amarok: How not to design a GUI, and currently working on interface design myself. Amarok .. WTF? After reading the Middle pane thread on [...]]]></description>
			<content:encoded><![CDATA[<p>My god, what happend to Amarok. It used to be a great player. The latest version turned into a -non-intuitive-non-flexible-interface- audio player.</p>
<p>As Brian says it very eloquently in <a href="http://briancarper.net/blog/songbird-vs-amarok-how-not-to-design-a-gui" target="_blank">Songbird vs. Amarok: How not to design a GUI</a>, and currently working on interface design myself. Amarok .. WTF?</p>
<p>After reading the <a href="http://forum.kde.org/viewtopic.php?f=121&amp;t=73880" target="_blank">Middle pane thread</a> on the KDE forums I was baffled. Why not add customizable (drag &#8216;n drop) pane widgetry layout? And for the available widgets to fill that middle pane &#8230;</p>
<ul>
<li><em>Wiki info</em> &#8211; How about a browser?!?!</li>
<li><em>Track info</em> &#8211; That&#8217;s already above the playlist.</li>
<li><em>Album info</em> &#8211; With file/folder view you can see what albums you have with one mouse click. (as was Amaroks strong point of critisism once towards iTunes).</li>
<li><em>Lyrics</em> &#8211; Do you think I&#8217;m studying lyrics while I&#8217;m working?</li>
</ul>
<p>And some other fun features:</p>
<ul>
<li>The control buttons &#8211; Way to big, and worse the size is not adjustable. People are not born with visual impairments by default you know.</li>
<li>After upgrading Amarok it decides to hang at 62% every time when it tries to scan my audio collection.</li>
</ul>
<p>I heard a KDE member speak at a dutch conference not to long ago about how KDE has clean code and isn&#8217;t to bloated. Now I know why.</p>
<h1>Exaile</h1>
<p>Looking for that smooth flexible, clean player? then <a href="http://www.exaile.org/" target="_blank">Exaile is the new big thing</a>. It&#8217;s written in Python, supports OSD-notify out of the box. Supports plugins (and then some!). And ofcourse also the usuals like systray support, album cover fetching .. the works.</p>
<p>Props to the developers of Exaile!!</p>
<p>And for Amarok .. I am outta here!</p>
<p>GrtzG</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.gerardjp.com/2010/01/04/amarok-kicked-out-the-window-hello-exaile/&amp;t=Amarok+kicked+out+the+window.+Hello+Exaile%21%21" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Amarok+kicked+out+the+window.+Hello+Exaile%21%21+-+http://b2l.me/anvdxf&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.gerardjp.com/2010/01/04/amarok-kicked-out-the-window-hello-exaile/&amp;title=Amarok+kicked+out+the+window.+Hello+Exaile%21%21" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.gerardjp.com/2010/01/04/amarok-kicked-out-the-window-hello-exaile/&amp;title=Amarok+kicked+out+the+window.+Hello+Exaile%21%21" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.gerardjp.com/2010/01/04/amarok-kicked-out-the-window-hello-exaile/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.gerardjp.com/2010/01/04/amarok-kicked-out-the-window-hello-exaile/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.gerardjp.com/2010/01/04/amarok-kicked-out-the-window-hello-exaile/&amp;title=Amarok+kicked+out+the+window.+Hello+Exaile%21%21" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.gerardjp.com/2010/01/04/amarok-kicked-out-the-window-hello-exaile/&amp;title=Amarok+kicked+out+the+window.+Hello+Exaile%21%21" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.gerardjp.com/2010/01/04/amarok-kicked-out-the-window-hello-exaile/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Django: get distinct field selection</title>
		<link>http://www.gerardjp.com/2009/12/16/django-get-distinct-field-selection/</link>
		<comments>http://www.gerardjp.com/2009/12/16/django-get-distinct-field-selection/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 13:11:55 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[All ENGLISH articles]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.gerardjp.com/?p=1131</guid>
		<description><![CDATA[A function for Django that is a simple and safe solution to get a distinct (group by) field selection from a model.]]></description>
			<content:encoded><![CDATA[<p>I recently have been dinging around in <a href="http://www.djangoproject.com/" target="_blank">Django</a>&#8216;s <a href="http://en.wikipedia.org/wiki/Object-relational_mapping" target="_blank">ORM</a> because I needed a certain &#8216;fields &#8230; group by&#8217; selection. I was very impressed by the logic that the Django developers put in there. Especially the joins and aggregations that have been released with version 1.1. However, after a hours of testing and googling, I was not able to solve my problem with it. I needed a distinct selection like this:</p>
<pre>SELECT id, name FROM myapp_model WHERE owner_id='1' GROUP BY name;</pre>
<p>This would have been (easily) possible except for the WHERE clause on ownership that screwed me. Since the SQL statement was that simple I decided to write a bypass function that get&#8217;s the data straight from the database. It&#8217;s readonly access and I dont do anything more with it then create a list of links. Even more so, from a <a href="http://en.wikipedia.org/wiki/KISS_principle" target="_blank">KISS</a> point of view this code is easier to read back after several months.</p>
<p>And for reusability I turned it in to a function. It takes the model and the distinct field, and for my purpose the needed ownership as parameter:</p>
<pre>from django.db import connection

def get_latest_objects(model_name=None, distinct_field=None, user_id=None):
    """ Get lastest distinct selection (as tuples) of a given model
    """
    model_name = model_name.lower()
    query = ("select id,%(distinct_field)s from myapp_%(model_name)s "
                "where owner_id='%(user_id)s' "
                "group by %(distinct_field)s;") % {
                    'model_name': model_name,
                    'distinct_field': distinct_field,
                    'user_id': user_id,
                    }
    cursor = connection.cursor()
    cursor.execute(query)</pre>
<p>There&#8217;s not much to it, I just hope it helps you to avoid &#8216;the hard way&#8217;. And it helps to keeps your view methods more readable because you dont need anything more then this:</p>
<pre>latest_objects = get_latest_objects(model_name='MyModel',
                        distinct_field='name',
                        user_id=request.user.id)</pre>
<p>What is returned (latest_objects) is a list of tuples that you can unpack in your templates straight away. Note that there&#8217;s no error checking in there, because I know what I&#8217;m doing <img src='http://www.gerardjp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Besides, worst case you get back an empty list and possible errors are caught when you write your tests. You do write those don&#8217;t you?</p>
<p>Grtz Gerard.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.gerardjp.com/2009/12/16/django-get-distinct-field-selection/&amp;t=Django%3A+get+distinct+field+selection+" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Django%3A+get+distinct+field+selection++-+http://b2l.me/anvdxj&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.gerardjp.com/2009/12/16/django-get-distinct-field-selection/&amp;title=Django%3A+get+distinct+field+selection+" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.gerardjp.com/2009/12/16/django-get-distinct-field-selection/&amp;title=Django%3A+get+distinct+field+selection+" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.gerardjp.com/2009/12/16/django-get-distinct-field-selection/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.gerardjp.com/2009/12/16/django-get-distinct-field-selection/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.gerardjp.com/2009/12/16/django-get-distinct-field-selection/&amp;title=Django%3A+get+distinct+field+selection+" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.gerardjp.com/2009/12/16/django-get-distinct-field-selection/&amp;title=Django%3A+get+distinct+field+selection+" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.gerardjp.com/2009/12/16/django-get-distinct-field-selection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django: QueryScreener, a record level ownership development auditor</title>
		<link>http://www.gerardjp.com/2009/10/26/django-queryscreener-a-record-level-ownership-development-auditor/</link>
		<comments>http://www.gerardjp.com/2009/10/26/django-queryscreener-a-record-level-ownership-development-auditor/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 16:41:12 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[All ENGLISH articles]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.gerardjp.com/?p=1049</guid>
		<description><![CDATA[QueryScreener is a middleware development tool that helps to avoid unwanted data disclosure once you go into production. It monitors queries to the models and warns you when queries are executed that lack a ownership clause. ]]></description>
			<content:encoded><![CDATA[<p>During the development stage of a Django app I&#8217;m working on I was exploring how to best implement rowlevel user ownerships. There are several ways to overwrite methods on <a title="Object Managers" href="http://docs.djangoproject.com/en/dev/topics/db/managers/" target="_blank">object managers</a> and even the Django admin interface is properly configurable to take a ownership from &#8220;request.user&#8221;.</p>
<p>But since wrongfull data disclosure is absolutely unacceptable I was still afraid that I would miss something somewhere. A nice example I ran into was populating a dropdown list in a form, where all records were visible instead of only those owned by the logged in user.</p>
<p>That got me thinking and eventually I wrote this small but sweet piece of <a title="Middleware" href="http://docs.djangoproject.com/en/dev/topics/http/middleware/" target="_blank">middleware</a>. Further elaboration below the code.</p>
<pre class="python" name="code">from django.db import connection
import re

"""
QueryScreener is a middleware development tool. This tool helps to avoid
unwanted data disclosure once you go into production.

It monitors queries to the models in your model_list and warns you when queries
are executed that do not contain a ownership where clause. And thus can be a
potential data disclosure hazard.

It requires a owner attribute in your model definition, e.g:

    owner = models.ForeignKey(User, editable=False)

Edit the 'model_list' below for what models should be monitored. And add
QueryScreener to MIDDLEWARE_CLASSES in you settings.py

Note: This can/should only be used while running Django's testserver command
with e.g: ./manage.py runserver 192.168.1.81:8000
"""

class QueryScreener(object):

    model_list = ['myapp_customer', 'myapp_order', 'myapp_product']

    def process_view(self, request, view_func, view_args, view_kwargs):
        if len(connection.queries) &gt; 0:
            query_parse(connection.queries, self.model_list, 'process_view')

    def process_response(self, request, response):
        if len(connection.queries) &gt; 0:
            query_parse(connection.queries, self.model_list, 'process_response')
        return response

def query_parse(self, model_list, caller_process):

    for query in connection.queries:
        for modelname in model_list:
            modelstring = 'FROM `'+modelname

            if re.search(modelstring, query['sql']) and not \
                re.search(r'^SELECT.\(1\).AS', query['sql']):

                reg = re.compile(r'^SELECT.*WHERE.*owner.*(ORDER BY.*)?$',
                                    re.DOTALL)

                if not reg.search(query['sql']):
                    print ('&lt;&lt;&lt; WARNING &gt;&gt;&gt; Query execution without ownership '
                            'clause, called from "' + caller_process + '"')
                    print query['sql']

            if re.search(r'^SELECT.\(1\).AS.`a`.FROM.*WHERE.*$', query['sql']):
                print ('&lt;&lt;&lt; Django Farted &gt;&gt;&gt;')
#                print query['sql']</pre>
<p><em>Update1: The &#8216;ORDER BY&#8217; in the regex needs to be optional.</em><br />
<em>Update2: Django does a &#8216;try update&#8217; in save_base() without owner (seperated the select statement)<br />
</em></p>
<p>The comment in the code above sums up how to get it working. What it does is print a warning and the query in question that does not respect ownership. If enabled while developing just keep track of your console output for:</p>
<pre>&lt;&lt;&lt; WARNING &gt;&gt;&gt; Query execution without ownership clause, called from "process_response"</pre>
<p>Should you  have suggestion, criticism, or words of admiration then please, do tell me <img src='http://www.gerardjp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>GrtzG</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.gerardjp.com/2009/10/26/django-queryscreener-a-record-level-ownership-development-auditor/&amp;t=Django%3A+QueryScreener%2C+a+record+level+ownership+development+auditor+" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Django%3A+QueryScreener%2C+a+record+level+ownership+development+auditor++-+http://b2l.me/anvdxn&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.gerardjp.com/2009/10/26/django-queryscreener-a-record-level-ownership-development-auditor/&amp;title=Django%3A+QueryScreener%2C+a+record+level+ownership+development+auditor+" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.gerardjp.com/2009/10/26/django-queryscreener-a-record-level-ownership-development-auditor/&amp;title=Django%3A+QueryScreener%2C+a+record+level+ownership+development+auditor+" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.gerardjp.com/2009/10/26/django-queryscreener-a-record-level-ownership-development-auditor/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.gerardjp.com/2009/10/26/django-queryscreener-a-record-level-ownership-development-auditor/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.gerardjp.com/2009/10/26/django-queryscreener-a-record-level-ownership-development-auditor/&amp;title=Django%3A+QueryScreener%2C+a+record+level+ownership+development+auditor+" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.gerardjp.com/2009/10/26/django-queryscreener-a-record-level-ownership-development-auditor/&amp;title=Django%3A+QueryScreener%2C+a+record+level+ownership+development+auditor+" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.gerardjp.com/2009/10/26/django-queryscreener-a-record-level-ownership-development-auditor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Walk-around&#8221; for pre lighttpd-1.4.23 feature &#8220;fix-root-scriptname&#8221;</title>
		<link>http://www.gerardjp.com/2009/08/15/walk-around-for-pre-lighttpd-1-4-23-feature-fix-root-scriptname/</link>
		<comments>http://www.gerardjp.com/2009/08/15/walk-around-for-pre-lighttpd-1-4-23-feature-fix-root-scriptname/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 09:41:24 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[All ENGLISH articles]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.gerardjp.com/?p=923</guid>
		<description><![CDATA[Walk-around should ofcourse be workaround but it feels more like a walk around &#8230; Today I &#8216;moved&#8217; the first version of my application from the Django development setup (run via &#8220;./manage runserver&#8221;) to a lighttpd/fcgi production setup. Been cleaning up code and concluded I wanted the app straight on the &#8216;/&#8217; or docroot with a [...]]]></description>
			<content:encoded><![CDATA[<p>Walk-around should ofcourse be workaround but it feels more like a walk around &#8230; <img src='http://www.gerardjp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Today I &#8216;moved&#8217; the first version of my application from the Django development setup (run via &#8220;./manage runserver&#8221;) to a lighttpd/fcgi production setup. Been cleaning up code and concluded I wanted the app straight on the &#8216;/&#8217; or docroot with a simple config like this:</p>
<pre>HTTP["host"] == "example.int" {
    fastcgi.server = (
        "/" =&gt; (
            "main" =&gt; (
                "host" =&gt; "192.168.1.2",
                "port" =&gt; 8000,
                "check-local" =&gt; "disable",
                #"fix-root-scriptname" =&gt; "enable",
            )
        ),
    )
}</pre>
<p>After a lot of messing around and not getting the aformetioned setup to work I found <a href="http://redmine.lighttpd.net/issues/show/729" target="_blank">the &#8216;PATH_INFO&#8217; problem</a>. The easiest way is to have <a href="http://www.lighttpd.net/2009/6/19/1-4-23-leaving-the-nest" target="_blank">lighttpd version 1.4.23</a> running, because then you can enable:</p>
<pre>    "fix-root-scriptname" =&gt; "enable",</pre>
<p>And therewith actually acces your app on &#8220;/&#8221; instead of &#8220;/dd&#8221; as shown in the below example under the line with &#8220;fastcgi.server (&#8220;.</p>
<p>The problem however is that lighttpd version 1.4.23 is not apt-get-able yet and I like my systems clean. So here&#8217;s the somewhat cumbersome but functional example that works:</p>
<pre>HTTP["host"] == "example.int" {
    fastcgi.server = (
        "/dd" =&gt; (
            "main" =&gt; (
                "host" =&gt; "192.168.1.2",
                "port" =&gt; 8000,
                "check-local" =&gt; "disable",
            )
        ),
    )

    url.rewrite-once = (
        "^(/.*)$" =&gt; "/dd/$1",
    )
}</pre>
<p>What happens is that lighttpd passes an incoming request like &#8220;/url_to_something&#8221; to your fcgi proces, but fcgi is on &#8220;/dd/url_to_something&#8221;. So with the rewrite rule we make sure the &#8220;/dd&#8221; prefix is added, other wise it would not be passed to the fcgi handler.</p>
<p>The problem however is that you should modify all your in-app links so they would be prefixed with /dd otherwise you end up with a 404. This can be globally resolved by adding the line below to your Django settings.py</p>
<pre>FORCE_SCRIPT_NAME = ""</pre>
<p>Django then strips of the &#8220;/dd&#8221; prefix just before it gets parsed by your django app URL Dispatcher.</p>
<p>So when lighttpd version 1.4.23 is in the debian and/or Ubuntu repository, you apt get it and adjust your setup in 3 places.</p>
<p>Remove the rewrite rule and the &#8220;dd&#8221; part from your lighttpd host config and disable the FORCE_SCRIPT_NAME in your settings.py. Doing it like this keeps everything running with the least adjustments now and only a little work to be done in the near future.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.gerardjp.com/2009/08/15/walk-around-for-pre-lighttpd-1-4-23-feature-fix-root-scriptname/&amp;t=%22Walk-around%22+for+pre+lighttpd-1.4.23+feature+%22fix-root-scriptname%22" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=%22Walk-around%22+for+pre+lighttpd-1.4.23+feature+%22fix-root-scriptname%22+-+http://b2l.me/anwfby&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.gerardjp.com/2009/08/15/walk-around-for-pre-lighttpd-1-4-23-feature-fix-root-scriptname/&amp;title=%22Walk-around%22+for+pre+lighttpd-1.4.23+feature+%22fix-root-scriptname%22" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.gerardjp.com/2009/08/15/walk-around-for-pre-lighttpd-1-4-23-feature-fix-root-scriptname/&amp;title=%22Walk-around%22+for+pre+lighttpd-1.4.23+feature+%22fix-root-scriptname%22" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.gerardjp.com/2009/08/15/walk-around-for-pre-lighttpd-1-4-23-feature-fix-root-scriptname/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.gerardjp.com/2009/08/15/walk-around-for-pre-lighttpd-1-4-23-feature-fix-root-scriptname/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.gerardjp.com/2009/08/15/walk-around-for-pre-lighttpd-1-4-23-feature-fix-root-scriptname/&amp;title=%22Walk-around%22+for+pre+lighttpd-1.4.23+feature+%22fix-root-scriptname%22" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.gerardjp.com/2009/08/15/walk-around-for-pre-lighttpd-1-4-23-feature-fix-root-scriptname/&amp;title=%22Walk-around%22+for+pre+lighttpd-1.4.23+feature+%22fix-root-scriptname%22" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.gerardjp.com/2009/08/15/walk-around-for-pre-lighttpd-1-4-23-feature-fix-root-scriptname/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Webmail hoax</title>
		<link>http://www.gerardjp.com/2009/07/18/webmail-hoax/</link>
		<comments>http://www.gerardjp.com/2009/07/18/webmail-hoax/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 22:27:31 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[All ENGLISH articles]]></category>
		<category><![CDATA[hoax]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.gerardjp.com/?p=873</guid>
		<description><![CDATA[People do NOT follow the instructions if you get an email like the one showing below. This is a HOAX!!! I put this here in the hope that people do not actually reply to web.support@intructor.net and give out their credentials. To some it might seem useless to post this. But I am sure that there [...]]]></description>
			<content:encoded><![CDATA[<p>People do NOT follow the instructions if you get an email like the one showing below. This is a HOAX!!!</p>
<p style="text-align: center;"><a href="http://www.gerardjp.com/wp-content/uploads/2009/07/Webmail-hoax.png"><img class="alignnone size-full wp-image-878" title="Webmail hoax" src="http://www.gerardjp.com/wp-content/uploads/2009/07/Webmail-hoax.png" alt="Webmail hoax" width="564" height="689" /></a></p>
<p style="text-align: left;">I put this here in the hope that people do not actually reply to web.support@intructor.net and give out their credentials. To some it might seem useless to post this. But I am sure that there are people that do. So if you get an email like this one simply press the &lt;delete&gt; key.</p>
<p style="text-align: left;">Safe computing!!</p>
<p style="text-align: left;">


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.gerardjp.com/2009/07/18/webmail-hoax/&amp;t=Webmail+hoax" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Webmail+hoax+-+http://b2l.me/anwfb6&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.gerardjp.com/2009/07/18/webmail-hoax/&amp;title=Webmail+hoax" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.gerardjp.com/2009/07/18/webmail-hoax/&amp;title=Webmail+hoax" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.gerardjp.com/2009/07/18/webmail-hoax/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.gerardjp.com/2009/07/18/webmail-hoax/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.gerardjp.com/2009/07/18/webmail-hoax/&amp;title=Webmail+hoax" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.gerardjp.com/2009/07/18/webmail-hoax/&amp;title=Webmail+hoax" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.gerardjp.com/2009/07/18/webmail-hoax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Ten Commandments of egoless programming</title>
		<link>http://www.gerardjp.com/2009/07/16/the-ten-commandments-of-egoless-programming/</link>
		<comments>http://www.gerardjp.com/2009/07/16/the-ten-commandments-of-egoless-programming/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 10:33:42 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[All ENGLISH articles]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.gerardjp.com/?p=856</guid>
		<description><![CDATA[Cleaning out old documentation, bumped into these: Understand and accept that you will make mistakes You are not your code No matter how much karate you know, someone else will always know more Don&#8217;t rewrite other programmers&#8217; code without consultation Treat people who know less than you with respect, deference, and patience The only constant [...]]]></description>
			<content:encoded><![CDATA[<p>Cleaning out old documentation, bumped into these:</p>
<ol>
<li>Understand and accept that you will make mistakes</li>
<li>You are not your code</li>
<li>No matter how much karate you know, someone else will always know more</li>
<li>Don&#8217;t rewrite other programmers&#8217; code without consultation</li>
<li>Treat people who know less than you with respect, deference, and patience</li>
<li>The only constant in the world is change</li>
<li>The only true authority stems from knowledge, not from position</li>
<li>Fight for what you believe but gracefully accept defeat</li>
<li>Don&#8217;t be &#8220;the guy in the room.&#8221;</li>
<li>Critique code instead of people—be kind to the coder, not to the code</li>
</ol>
<p>Just so you remember.. <img src='http://www.gerardjp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>GrtzG</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.gerardjp.com/2009/07/16/the-ten-commandments-of-egoless-programming/&amp;t=The+Ten+Commandments+of+egoless+programming" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=The+Ten+Commandments+of+egoless+programming+-+http://b2l.me/anwfb7&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.gerardjp.com/2009/07/16/the-ten-commandments-of-egoless-programming/&amp;title=The+Ten+Commandments+of+egoless+programming" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.gerardjp.com/2009/07/16/the-ten-commandments-of-egoless-programming/&amp;title=The+Ten+Commandments+of+egoless+programming" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.gerardjp.com/2009/07/16/the-ten-commandments-of-egoless-programming/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.gerardjp.com/2009/07/16/the-ten-commandments-of-egoless-programming/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.gerardjp.com/2009/07/16/the-ten-commandments-of-egoless-programming/&amp;title=The+Ten+Commandments+of+egoless+programming" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.gerardjp.com/2009/07/16/the-ten-commandments-of-egoless-programming/&amp;title=The+Ten+Commandments+of+egoless+programming" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.gerardjp.com/2009/07/16/the-ten-commandments-of-egoless-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script goodies in Delicious toolbar</title>
		<link>http://www.gerardjp.com/2009/04/23/script-goodies-in-delicious-toolbar/</link>
		<comments>http://www.gerardjp.com/2009/04/23/script-goodies-in-delicious-toolbar/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 14:31:49 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[All ENGLISH articles]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[delicious]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tinyurl]]></category>

		<guid isPermaLink="false">http://www.gerardjp.com/?p=623</guid>
		<description><![CDATA[By mere coincidence i figured out that scripted bookmarks work just as well in the delicious bookmarks toolbar as they would do in your regular bookmarks toolbar. (That is .. tested with FF 3 on ubuntu For example, if you put this: javascript:void(location.href='http://tinyurl.com/create.php?url='+encodeURIComponent(location.href)) as a url target in a bookmark it redirects you to a [...]]]></description>
			<content:encoded><![CDATA[<p>By mere coincidence i figured out that scripted bookmarks work just as well in the <a href="http://delicious.com/" target="_blank">delicious</a> bookmarks toolbar as they would do in your regular bookmarks toolbar. (That is .. tested with FF 3 on ubuntu <img src='http://www.gerardjp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>For example, if you put this:</p>
<pre>javascript:void(location.href='http://tinyurl.com/create.php?url='+encodeURIComponent(location.href))</pre>
<p>as a url target in a bookmark it redirects you to a page at <a href="http://tinyurl.com/" target="_blank">tinyurl</a> and automatically generates the tinurl of your current page. I always keep stuff like this handy (in a toolbar) for quick access.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/3615" target="_blank">The delicious plugin</a> can show a toolbar filled with bookmarks tagged with a specific word. So after installing the plugin make sure your Delicious toolbar is visible by right-clicking on your topmenu and selecting &#8220;Delicious Toolbar&#8221;.</p>
<p><a href="http://www.gerardjp.com/wp-content/uploads/2009/04/enabletoolbarmenu.jpg"><img class="alignnone size-full wp-image-637" title="enabletoolbarmenu" src="http://www.gerardjp.com/wp-content/uploads/2009/04/enabletoolbarmenu.jpg" alt="enabletoolbarmenu" width="430" height="179" /></a></p>
<p>In the Delicious menu choose &#8220;Manage favorite tags&#8221;. Create a new tag e.g. &#8220;MyBar&#8221; and select it as your favorite tag on your toolbar:</p>
<p><a href="http://www.gerardjp.com/wp-content/uploads/2009/04/choosemybartag.jpg"><img class="alignnone size-full wp-image-627" title="choosemybartag" src="http://www.gerardjp.com/wp-content/uploads/2009/04/choosemybartag.jpg" alt="choosemybartag" width="296" height="178" /></a></p>
<p>From now on all saved bookmarks that have the tag &#8220;MyBar&#8221; will show up in your toolbar.</p>
<p>In case of the scripted example above, choose &#8220;New bookmark&#8221; in the delicious menu. Paste the javascript code in the URL target, call it &#8220;Tiny&#8221;, give it the tag &#8220;MyBar&#8221; and save it.</p>
<p><a href="http://www.gerardjp.com/wp-content/uploads/2009/04/tinybutton.jpg"><img class="alignnone size-full wp-image-629" title="tinybutton" src="http://www.gerardjp.com/wp-content/uploads/2009/04/tinybutton.jpg" alt="tinybutton" width="363" height="162" /></a></p>
<p>Voila, now you have a working scripted bookmark called &#8220;Tiny&#8221; in your delicious toolbar.</p>
<p>GerardJP says:</p>
<p>Happy computing!</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.gerardjp.com/2009/04/23/script-goodies-in-delicious-toolbar/&amp;t=Script+goodies+in+Delicious+toolbar" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Script+goodies+in+Delicious+toolbar+-+http://b2l.me/apmmnu&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.gerardjp.com/2009/04/23/script-goodies-in-delicious-toolbar/&amp;title=Script+goodies+in+Delicious+toolbar" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.gerardjp.com/2009/04/23/script-goodies-in-delicious-toolbar/&amp;title=Script+goodies+in+Delicious+toolbar" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.gerardjp.com/2009/04/23/script-goodies-in-delicious-toolbar/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.gerardjp.com/2009/04/23/script-goodies-in-delicious-toolbar/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.gerardjp.com/2009/04/23/script-goodies-in-delicious-toolbar/&amp;title=Script+goodies+in+Delicious+toolbar" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.gerardjp.com/2009/04/23/script-goodies-in-delicious-toolbar/&amp;title=Script+goodies+in+Delicious+toolbar" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.gerardjp.com/2009/04/23/script-goodies-in-delicious-toolbar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
