<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>plaes.org &#124; Be free!</title>
	<link>http://plaes.org/blog</link>
	<description>It's the matter of liberty, not the price...</description>
	<pubDate>Sat, 08 Mar 2008 18:31:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>The documentation bugs</title>
		<link>http://plaes.org/blog/2008/03/08/the-documentation-bugs/</link>
		<comments>http://plaes.org/blog/2008/03/08/the-documentation-bugs/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 18:29:49 +0000</pubDate>
		<dc:creator>plaes</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[maemo]]></category>

		<category><![CDATA[rtfm]]></category>

		<guid isPermaLink="false">http://plaes.org/blog/2008/03/08/the-documentation-bugs/</guid>
		<description><![CDATA[While setting up Maemo dev environment, I found following thinko&#8230; On the dev-environment setup page, it mentions to read &#8220;install.txt&#8221; which contains following section:

To install scratchbox first download the script (from the same
directory where you found this INSTALL.txt file) to your host
computer and just run the maemo-scratchbox-install_3.1.sh as user
root:
  $ sudo chmod a+x ./maemo-scratchbox-install_3.1.sh
 [...]]]></description>
			<content:encoded><![CDATA[<p>While setting up Maemo dev environment, I found following thinko&#8230; On the dev-environment setup page, it mentions to read &#8220;install.txt&#8221; which contains following section:</p>
<pre>
To install scratchbox first download the script (from the same
directory where you found this INSTALL.txt file) to your host
computer and just run the maemo-scratchbox-install_3.1.sh as user
root:
  $ sudo chmod a+x ./maemo-scratchbox-install_3.1.sh
  $ sudo ./maemo-scratchbox-install_3.1.sh
</pre>
<p>But real life is different:</p>
<pre>
...
E: This script should NOT be run as user root.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://plaes.org/blog/2008/03/08/the-documentation-bugs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Testing out bisecting</title>
		<link>http://plaes.org/blog/2008/02/11/testing-out-bisecting/</link>
		<comments>http://plaes.org/blog/2008/02/11/testing-out-bisecting/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 12:07:45 +0000</pubDate>
		<dc:creator>plaes</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[git]]></category>

		<category><![CDATA[Life]]></category>

		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://plaes.org/blog/2008/02/11/testing-out-bisecting/</guid>
		<description><![CDATA[About the time to take some action:
chi linux # git-bisect good
Bisecting: 4814 revisions left to test after this
[d2e626f45cc450c00f5f98a89b8b4c4ac3c9bf5f] x86: add PAGE_KERNEL_EXEC_NOCACHE

Also.. back in Tartu. A new semester, weather feels crappy and this time I forgot my toothpaste.. 
]]></description>
			<content:encoded><![CDATA[<p>About the time to take some action:</p>
<pre>chi linux # git-bisect good
Bisecting: 4814 revisions left to test after this
[d2e626f45cc450c00f5f98a89b8b4c4ac3c9bf5f] x86: add PAGE_KERNEL_EXEC_NOCACHE
</pre>
<p>Also.. back in Tartu. A new semester, weather feels crappy and this time I forgot my toothpaste.. <img src='http://plaes.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://plaes.org/blog/2008/02/11/testing-out-bisecting/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Debugging Django {% url %} tag</title>
		<link>http://plaes.org/blog/2008/02/06/debugging-django-url-tag/</link>
		<comments>http://plaes.org/blog/2008/02/06/debugging-django-url-tag/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 12:18:07 +0000</pubDate>
		<dc:creator>plaes</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[django]]></category>

		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://plaes.org/blog/2008/02/06/debugging-django-url-tag/</guid>
		<description><![CDATA[When you sometimes notice that {% url %} tag does not work for your named urls, then debugging it is easy. Start the python shell:

import app.views
from django.core.urlresolvers import reverse
reverse('named-view-to-be-tested')

If the view doesn&#8217;t work, it will either return NoReverseMatch: Not enough positional arguments passed in exception or url.
Thanks to jodal from #django for the tip.
]]></description>
			<content:encoded><![CDATA[<p>When you sometimes notice that <em>{% url %}</em> tag does not work for your named urls, then debugging it is easy. Start the python shell:</p>
<pre>
import app.views
from django.core.urlresolvers import reverse
reverse('named-view-to-be-tested')
</pre>
<p>If the view doesn&#8217;t work, it will either return <code>NoReverseMatch: Not enough positional arguments passed in</code> exception or url.</p>
<p>Thanks to <em>jodal</em> from <em>#django</em> for the tip.</p>
]]></content:encoded>
			<wfw:commentRss>http://plaes.org/blog/2008/02/06/debugging-django-url-tag/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Chemistry - FAILED</title>
		<link>http://plaes.org/blog/2008/01/22/chemistry-failed/</link>
		<comments>http://plaes.org/blog/2008/01/22/chemistry-failed/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 08:28:03 +0000</pubDate>
		<dc:creator>plaes</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://plaes.org/blog/2008/01/22/chemistry-failed/</guid>
		<description><![CDATA[I failed in &#8220;Chemical Principles I&#8221;&#8230; Hopefully I have better luck this autumn..  
The goal of the course is to help students develop &#8220;chemical insight&#8221; - the ability to see matter through chemists&#8217; eyes, and to make connections between chemical principles, theory, experimentation, and the world around us.
Bah&#8230;
]]></description>
			<content:encoded><![CDATA[<p>I failed in &#8220;Chemical Principles I&#8221;&#8230; Hopefully I have better luck this autumn.. <img src='http://plaes.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<blockquote><p>The goal of the course is to help students develop &#8220;chemical insight&#8221; - the ability to see matter through chemists&#8217; eyes, and to make connections between chemical principles, theory, experimentation, and the world around us.</p></blockquote>
<p>Bah&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://plaes.org/blog/2008/01/22/chemistry-failed/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Casio LCD datasheets</title>
		<link>http://plaes.org/blog/2008/01/13/casio-lcd-datasheets/</link>
		<comments>http://plaes.org/blog/2008/01/13/casio-lcd-datasheets/#comments</comments>
		<pubDate>Sun, 13 Jan 2008 09:27:33 +0000</pubDate>
		<dc:creator>plaes</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[bleg]]></category>

		<category><![CDATA[Hacking]]></category>

		<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://plaes.org/blog/2008/01/13/casio-lcd-datasheets/</guid>
		<description><![CDATA[Dear Lazy Web, where could I get a datasheet for following Casio 2.8&#8243; LCD?

It originates from Olympus SP-550UZ camera, seems to be 2.8&#8243; and has 2653 written on it 
]]></description>
			<content:encoded><![CDATA[<p>Dear Lazy Web, where could I get a datasheet for following Casio 2.8&#8243; LCD?<br />
<a href="http://plaes.org/files/2008-Q1/08-01-13-Casio_2653.jpg"><img src="http://plaes.org/files/2008-Q1/08-01-13-Casio_2653_thumb.jpg" alt="Casio 2.8\" LCD labeled as 2653" /></a></p>
<p>It originates from <a href="http://www.amazon.com/gp/product/B000LXZKQK?ie=UTF8&#038;tag=webtechnology-20&#038;creativeASIN=B000LXZKQK">Olympus SP-550UZ</a> camera, seems to be 2.8&#8243; and has 2653 written on it <img src='http://plaes.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://plaes.org/blog/2008/01/13/casio-lcd-datasheets/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Django with Git</title>
		<link>http://plaes.org/blog/2008/01/04/django-with-git/</link>
		<comments>http://plaes.org/blog/2008/01/04/django-with-git/#comments</comments>
		<pubDate>Thu, 03 Jan 2008 22:56:07 +0000</pubDate>
		<dc:creator>plaes</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[django]]></category>

		<category><![CDATA[git]]></category>

		<category><![CDATA[howto]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://plaes.org/blog/2008/01/04/django-with-git/</guid>
		<description><![CDATA[I decided to take a peek into Django world and while playing around with tutorial project I decided to use also git for version control.
As basic Django project layout is following:

project/
    __init__.py
    manage.py
    settings.py    # < -- Contains sensitive information
    [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to take a peek into <a href="http://www.djangoproject.com/">Django</a> world and while playing around with tutorial project I decided to use also <a href="http://git.or.cz/">git</a> for version control.<br />
As basic Django project layout is following:</p>
<pre>
project/
    __init__.py
    manage.py
    settings.py    # < -- Contains sensitive information
    urls.py
</pre>
<p>Where <em>settings.py</em> contains sensitive information like usernames/passwords and other data one doesn&#8217;t actually want to save in the repository.<br />
But fortunately it&#8217;s possible to use external configure file which is included by main configuration file and thanks to Python&#8217;s clever <a href="http://docs.python.org/lib/module-exceptions.html">exception system</a>, or <em>ImportError</em> exception, we can simply make following modification to <em>settings.py</em>:
</pre>
<pre>
diff --git a/project/settings.py b/project/settings.py
index 641c97f..9019d9e 100644
--- a/project/settings.py
+++ b/project/settings.py
@@ -84,4 +84,9 @@ INSTALLED_APPS = (
     'django.contrib.sites',
 )
-
+
+try:
+	import sys
+	from settings_local import *
+except ImportError, e:
+	print "Unable to load local settings: %s" % e
+	sys.exit(1)
</pre>
<p>Then we create <em>settings_local.py</em> which contains all these defines you do not want to appear inside the repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://plaes.org/blog/2008/01/04/django-with-git/feed/</wfw:commentRss>
		</item>
		<item>
		<title>It has been a good year&#8230;</title>
		<link>http://plaes.org/blog/2007/12/31/it-has-been-a-good-year/</link>
		<comments>http://plaes.org/blog/2007/12/31/it-has-been-a-good-year/#comments</comments>
		<pubDate>Mon, 31 Dec 2007 14:45:00 +0000</pubDate>
		<dc:creator>plaes</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[moskwitch]]></category>

		<category><![CDATA[sõrve]]></category>

		<category><![CDATA[stars]]></category>

		<guid isPermaLink="false">http://plaes.org/blog/2007/12/31/it-has-been-a-good-year/</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://plaes.org/files/2007-Q4/07-12-31-ktz-stars-and-moskwitch.jpg"><img src="http://plaes.org/files/2007-Q4/07-12-31-ktz-stars-and-moskwitch_thumb.jpg" alt="Ktz, stars and Moskwitch ;)" /></a><br />
<span style="text-size="small">Pic by <a href="http://timmu.store20.com/">Timmu</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://plaes.org/blog/2007/12/31/it-has-been-a-good-year/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Gypsy with USB-serial GPS</title>
		<link>http://plaes.org/blog/2007/12/22/gypsy-with-usb-serial-gps/</link>
		<comments>http://plaes.org/blog/2007/12/22/gypsy-with-usb-serial-gps/#comments</comments>
		<pubDate>Sat, 22 Dec 2007 16:10:28 +0000</pubDate>
		<dc:creator>plaes</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[google maps]]></category>

		<category><![CDATA[GPS]]></category>

		<category><![CDATA[gypsy]]></category>

		<category><![CDATA[Hacking]]></category>

		<category><![CDATA[o-hand]]></category>

		<guid isPermaLink="false">http://plaes.org/blog/2007/12/22/gypsy-with-usb-serial-gps/</guid>
		<description><![CDATA[After some fiddling, it works 

Although, it doesn&#8217;t look as good as Ross&#8217;s due to the missing image. Google Maps doesn&#8217;t have one yet.. 
]]></description>
			<content:encoded><![CDATA[<p>After some fiddling, it works <img src='http://plaes.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<img src="http://plaes.org/files/2007-Q4/gypsy-status.png" alt="Gypsy-status" /><br />
Although, it doesn&#8217;t look as good as <a href="http://www.burtonini.com/blog/computers/gypsy-2007-12-17-10-30">Ross&#8217;s</a> due to the missing image. <a href="http://maps.google.com/">Google Maps</a> doesn&#8217;t have one yet.. <img src='http://plaes.org/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://plaes.org/blog/2007/12/22/gypsy-with-usb-serial-gps/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Linux and RAID partition autodetection</title>
		<link>http://plaes.org/blog/2007/12/22/linux-and-raid-partition-autodetection/</link>
		<comments>http://plaes.org/blog/2007/12/22/linux-and-raid-partition-autodetection/#comments</comments>
		<pubDate>Sat, 22 Dec 2007 09:43:10 +0000</pubDate>
		<dc:creator>plaes</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[filesystems]]></category>

		<category><![CDATA[initramfs]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[partition]]></category>

		<category><![CDATA[RAID]]></category>

		<category><![CDATA[RAID1]]></category>

		<guid isPermaLink="false">http://plaes.org/blog/2007/12/22/linux-and-raid-partition-autodetection/</guid>
		<description><![CDATA[Few days ago I was setting up a machine which was supposed to have two hard disks running in RAID1 (mirror mode). As I do not have much experience with RAIDx stuff I encountered few problems during the setup 
My first approach was to create a kernel with embedded initramfs image which worked until it [...]]]></description>
			<content:encoded><![CDATA[<p>Few days ago I was setting up a machine which was supposed to have two hard disks running in <a href="http://en.wikipedia.org/wiki/RAID_1#RAID_1">RAID1 (mirror mode)</a>. As I do not have much experience with RAIDx stuff I encountered few problems during the setup <img src='http://plaes.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
My first approach was to create a kernel with embedded initramfs image which worked until it had to mount the filesystems from RAID device, failing with following error:</p>
<pre>The filesystem size (according to the superblock) is
212144483 blocks. The physical size of the device is 212144384 blocks.
Either the superblock or the partition table is likely to be corrupt.</pre>
<p>Quite quickly we discovered (as I was installing remotely, relying on Taavi feeding me the error messages) when using <a href="http://en.wikipedia.org/wiki/Ext3"> <em>ext2/ext3</em> filesystem</a> one has to fix and resize the filesystems before using them in RAID system. This is because the RAID superblock will be written near the end of the partitions thus reducing the physical size of the filesystem. So here it goes:</p>
<pre>mdadm --create /dev/mdx --raid-devices=2 /dev/sdax /dev/sdbx
e2fsck -f /dev/mdx
resize2fs /dev/mdx</pre>
<p>Before I even tested it I wanted first to try out another trick - I tried the partition type for all raid components to <code>0xFD</code>. I then quickly made another kernel image without initramfs and booted it.. Voila.. everything worked even without initramfs <img src='http://plaes.org/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>So to sum it up:</p>
<ol>
<li>First set the partition type to <em>0xFD</em> which stands for &#8220;<em>Linux RAID autodetect</em>&#8221; for all the partitions taking part in the RAID setup.</li>
<li>After assigning partitions to RAID, run a forced filesystem check (forced because otherwise utility refuses to check clean filesystem)</li>
<li>Resize the partition because added RAID superblock has shrinked the filesystem area&#8230;</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://plaes.org/blog/2007/12/22/linux-and-raid-partition-autodetection/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Detecting whether your x86 CPU is 64-bit capable&#8230;</title>
		<link>http://plaes.org/blog/2007/12/19/detecting-whether-your-x86-cpu-is-64-bit-capable/</link>
		<comments>http://plaes.org/blog/2007/12/19/detecting-whether-your-x86-cpu-is-64-bit-capable/#comments</comments>
		<pubDate>Wed, 19 Dec 2007 11:45:26 +0000</pubDate>
		<dc:creator>plaes</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://plaes.org/blog/2007/12/19/detecting-whether-your-x86-cpu-is-64-bit-capable/</guid>
		<description><![CDATA[&#8220;64-bit capable&#8221; translates as a mode where a 64-bit application/OS can access 64-bit instructions and registers and is also known as &#8220;Long mode&#8220;.
On Linux machine just check the contents of /proc/cpuinfo. If processor flags contain lm, then your CPU is 64-bit capable.
Also, a little excerpt from Linux Kernel Sources:

#include/asm/cpufeature_32.h
[snip]
#define X86_FEATURE_LM      [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;64-bit capable&#8221; translates as a mode where a 64-bit application/OS can access 64-bit instructions and registers and is also known as &#8220;<a href="http://en.wikipedia.org/wiki/Long_mode">Long mode</a>&#8220;.</p>
<p>On Linux machine just check the contents of <em>/proc/cpuinfo</em>. If processor flags contain <strong>lm</strong>, then your CPU is 64-bit capable.</p>
<p>Also, a little excerpt from <a href="http://www.kernel.org/">Linux Kernel Sources</a>:</p>
<pre>
#include/asm/cpufeature_32.h
[snip]
#define X86_FEATURE_LM          (1*32+29) /* Long Mode (x86-64) */
[/snip]
</pre>
]]></content:encoded>
			<wfw:commentRss>http://plaes.org/blog/2007/12/19/detecting-whether-your-x86-cpu-is-64-bit-capable/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
