<?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>heipei's weblog &#187; Gentoo</title>
	<atom:link href="http://heipei.net/category/gentoo/feed/" rel="self" type="application/rss+xml" />
	<link>http://heipei.net</link>
	<description>Johannes 'heipei' Gilger</description>
	<lastBuildDate>Fri, 30 Jul 2010 16:07:27 +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>ALIX 2D13: First impressions</title>
		<link>http://heipei.net/2010/07/30/alix-2d13-first-impressions/</link>
		<comments>http://heipei.net/2010/07/30/alix-2d13-first-impressions/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 16:07:10 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://heipei.net/?p=863</guid>
		<description><![CDATA[I desperately needed a new toy, and found the perfect match with the ALIX 2D13 board from Swiss manufacturer PCEngines. I&#8217;ve had good experiences with the WRAP-board more than four years ago, so I knew about the quality of their products. This post should serve as a quick introduction and point out some caveats if [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/heipei/4842861201/" title="ALIX 2D13 by heipei, on Flickr"><img src="http://farm5.static.flickr.com/4154/4842861201_eaa6258442.jpg" width="500" height="334" alt="ALIX 2D13" class="aligncenter"/></a>I desperately needed a new toy, and found the perfect match with the <a href="http://pcengines.ch/alix2d13.htm">ALIX 2D13</a> board from Swiss manufacturer <a href="http://pcengines.ch/index.htm">PCEngines</a>. I&#8217;ve had <a href="http://heipei.net/2006/03/09/wireless-router-application-platform-wrap/">good experiences with the WRAP-board more than four years ago</a>, so I knew about the quality of their products. This post should serve as a quick introduction and point out some caveats if you want to setup and use an ALIX 2D13.</p>
<p><b>Specs</b><br />
<img src="http://heipei.net/weblog/alix2d13.jpg" alt="ALIX 2D13" class="alignright"/>PCEngines has an <a href="http://www.pcengines.ch/alix.htm">overview over the ALIX-line</a> as well as the <a href="http://www.pcengines.ch/alix2d13.htm">specs of the ALIX 2D13</a>, so this is just a short rundown:
<ul>
<li>500 MHz AMD Geode LX800 (x86)</li>
<li>256 MB DDR DRAM</li>
<li>3 Ethernet NICs (Via VT6105M 10/100)</li>
<li>Furthermore: 2x USB ports, MiniPCI-slot, CF-slot, serial port</li>
</ul>
<p>I chose the 2D13 model since I wanted 3 ethernet NICs and the added battery (for keeping system time after a reboot) seemed like a good idea. The ALIX boards can be bought in many variations, some even providing VGA/sound to be used as a thin client. I ordered my ALIX at the <a href="http://varia-store.com/">Varia-Store</a>, where they offer a complete bundle of ALIX-2D13-board, enclosure, power supply and CF-card for a mere €145 including shipping in Germany. I ordered on Tuesday at noon and the package arrived Thursday afternoon.</p>
<p><span id="more-863"></span><br />
<b>Operating system / prerequisites</b><br />
You probably want to run Linux on these babies, otherwise you can stop reading ahead. There are some things you really need before you get started:
<ul>
<li>CF-card reader on your computer (for installing the OS to the CF-card)</li>
<li>Serial connection (think USB-to-Serial converter, pl2303) to access the ALIX</li>
</ul>
<p>I chose to install Debian on the ALIX, since I&#8217;m familiar with it and it has little overhead. I found these guides to be helpful, even if not completely up to date or correct: <a href="http://peter.molnar.cc/2008/04/11/installing-debian-gnulinux-on-a-alix-board/">Guide 1</a>, <a href="http://mac.tuxfinder.com/wordpress/2009/06/11/installing-linux-debian-lenny-on-an-alix-board/">Guide 2</a>. But careful! Don&#8217;t mount the ALIX board in its enclosure until you&#8217;re sure that your ALIX boots, since removing the CF-card requires taking the board out again ;).<br />
The next thing I did was to build a custom kernel, since Debian only includes 2.6.26 and has everything you&#8217;ll never need compiled as modules. I built a next-to-minimal kernel on my workstation (<a href="http://tinkering-is-fun.blogspot.com/2009/12/configuring-linux-kernel-for-use-on.html">this site</a> helped a lot) and it seems to work just fine so far. The config is <a href="http://heipei.net/files/config-2.6.34-alix2d13.txt">here</a>. An important thing if you compile somewhere else is to make sure you use<code>ARCH=i386 make menuconfig<br />
ARCH=i386 make -j3</code> when configuring and compiling your kernel for the ALIX.<br />
People already using CF-cards or small embedded devices probably know to use <tt>noatime</tt> where possible and mount <tt>/tmp, /var/tmp, /var/run, /var/log, /var/lock</tt> as tmpfs to go easy on the CF-cards limited write cycles.</p>
<p><b>Performance / Applications</b><br />
I bought the ALIX to play around with it but also to evaluate its possible use as a Samba-fileserver and CUPS printserver for my flat, and maybe even a small shellserver in case I&#8217;m away from home and my workstation isn&#8217;t running. With an energy-consumption of about 5-6W you can have it running 24/7, the fact that it doesn&#8217;t have any moving parts only adds to that. Booting takes a few seconds by the way, not that it matters.</p>
<p>The first measurements I did were with scp from the ALIX to my WS, which maxed out at 3.5MB/s because OpenSSH used up the CPU on the ALIX. Next I tried using Samba (to and from) and got a mere 6.5MB/s throughput reading from the ALIX and an attached USB-drive. This was with the stock kernel however, and using my own 2.6.34-kernel I was able to transmit more than 9MB/s using Samba. I had a stupid line in my <tt>smb.conf</tt> which might explain the 6.5MB/s I got before. Make sure to remove this line!:<code>socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=16384 SO_SNDBUF=16384</code>I then did another test using <a href="http://www.fefe.de/gatling/">fefes gatling web/ftp/samba-server</a> on the ALIX and my USB-drive in HTTP-mode with wget and was able to completely saturate the 100MBit-link, which is why I suspect to be able to do the same thing with Samba as well.<br />
For customers of Aachens Uni-DSL it should be interesting to know that I managed to max out my 8Mbit-DSL-line (about 700kB/s) using <tt>vpnc</tt> on the ALIX with enough idle CPU left. Using <tt>vpnc</tt> and doing a <tt>git pull</tt> on the ALIX resulted in only a slight slowdown since git was busy saving/packing objects it received. Performance using <tt>git daemon</tt> on the ALIX and pulling from there were acceptable as well.</p>
<p>All of these measurements are highly unscientific and side-effects or misconfigurations could have had negative effects, so one should read these rates as minimal assurances.</p>
<p><b>Conclusion</b><br />
After the first full day of using the ALIX I&#8217;m impressed. The CPU is powerful enough for most tasks and with a little custom configuration some things can be sped up considerably. I don&#8217;t see any problems for the intended use as a file-server, by whichever way the files are served. The next step will be hooking up my printer.</p>
<p>If you intend to use encrypted filesystems on the ALIX you should do some research first. While the AMD Geode does have hardware support for AES, OpenSSL does not seem to use it and I&#8217;m not quite sure about any cryptofs. Another common thing the ALIX might be used for is wireless LAN. The MiniPCI-slot can take a variety of wireless NICs, but I don&#8217;t need yet another AP at the moment.</p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2010/07/30/alix-2d13-first-impressions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command-line warriors, part one</title>
		<link>http://heipei.net/2010/06/30/command-line-warriors-part-one/</link>
		<comments>http://heipei.net/2010/06/30/command-line-warriors-part-one/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 14:19:18 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Fotos]]></category>
		<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://heipei.net/?p=862</guid>
		<description><![CDATA[This is a post about some things you might have used a graphical tool for in the past, but which can be done just as well using command-line tools. Since I keep finding these little gems I hope I can continue this kind of post in the future. I&#8217;ll try to categorize the tips and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://heipei.net/weblog/terminal.png" alt="Terminal" class="alignleft"/>This is a post about some things you might have used a graphical tool for in the past, but which can be done just as well using command-line tools. Since I keep finding these little gems I hope I can continue this kind of post in the future. I&#8217;ll try to categorize the tips and I&#8217;ll only post the functionality I recently discovered and use myself, so this is not a reference for any of the programs mentioned.</p>
<p><b>Photography</b><br />
You accidentally selected &#8220;Delete All&#8221; on your digital cameras and now your photos are gone? You even fear they might have been overwritten by photos taken after the accident? Fear not, the same thing happened to me, and I was able to restore all the photos from the event plus photos going back as far as three months from my CF card in my 400d using the <a href="http://www.cgsecurity.org/wiki/PhotoRec"><b>PhotoRec</b></a> software.</p>
<p>Cameras today often have an orientation sensor, so pictures taken in portrait mode will automatically be rotated. But this usually happens in the viewer, while the orientation is simply an EXIF tag. Of course this takes up precious computing time and not every viewer supports it. <b><a href="http://www.sentex.net/~mwandel/jhead/">jhead</a></b> can not only display EXIF information in a consistent manner but can also rotate pictures lossless and clear the orientation-tag afterwards. The call is <code>jhead -autorot *.JPG</code><br />
If you want to rename your images using EXIF-information, <a href="http://www.sno.phy.queensu.ca/~phil/exiftool/"><b>exiftool</b></a> is the way to go. The command <code>exiftool '-FileName&lt;Party_ ${CreateDate}_${filename}' -d %Y%m%d *.jpg</code> would prefix all the photos with &#8220;Party&#8221; and the create-date, while keeping the original filename as the suffix. exiftool can shift dates too, if you ever forget to adjust for daylight saving.</p>
<p>When uploading the images you&#8217;ll often want to resize them. The <a href="http://www.imagemagick.org/"><b>ImageMagick</b></a> collection can do just that, and many other things (like sharpening etc.). If you <code>mogrify -resize 1600x1600</code> your photos will be resized to 1600px maximum edge length, while keeping the ratio. But be careful, mogrify overwrites the pictures in place!</p>
<p><b>Music</b><br />
Thanks to services like <a href="http://www.video2mp3.net/">video2mp3.net/</a> you can download a lot of music from YouTube. But sometimes there is silence at the end or the beginning of a song, and a whole collection of songs might have differing levels of volume. To cut an mp3 you can use <a href="http://mp3splt.sourceforge.net/mp3splt_page/home.php"><b>mp3splt</b></a> like this to cut everything after 03:30 minutes:<code>mp3splt file.mp3 00.00 03.30</code>The sound levels can be normalized, losslessly, using <a href="http://mp3gain.sourceforge.net/"><b>mp3gain</b></a>:<code>mp3gain -rk *</code></p>
<p><b>Misc</b><br />
When pretty-printing flat text files I use <a href="http://www.gnu.org/software/a2ps/"><b>a2ps</b></a> to format them nicely and get a PostScript-document. a2ps however does not support UTF-8, while the only characters I care about (German Umlauts) can be represented using Latin1 just fine. So, one can use iconv to convert them on the fly like this:<code>iconv --from-code=UTF-8 --to-code=LATIN1 textfile.txt|a2ps --font 9 -E -B -r --column=1 > out.ps</code></p>
<p>To export images from a PDF-file I discovered <a href="http://gd.tuwien.ac.at/linuxcommand.org/man_pages/pdfimages1.html"><b>pdfImages</b></a>, which is part of the xpdf-suite. Use it like this:<code>pdfimages -j foo.pdf  bar</code></p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2010/06/30/command-line-warriors-part-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSSH: Reuse existing connections / Reverse tunnel</title>
		<link>http://heipei.net/2010/02/02/openssh-reuse-existing-connections-reverse-tunnel/</link>
		<comments>http://heipei.net/2010/02/02/openssh-reuse-existing-connections-reverse-tunnel/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 15:48:00 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://heipei.net/?p=801</guid>
		<description><![CDATA[You often hear the phrase &#8220;the swiss knife of &#8230;&#8221;. Well, for networking, OpenSSH clearly deserves that title in my opinion. Besides the obvious feature of providing secure logins with different options for mutual authentication, it can also be used to transfer files. It is also a core component of software like git, which depend [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.openssh.org/"><img src="/weblog/openssh.png" alt="OpenSSH" class="alignleft" style="border:0px"/></a>You often hear the phrase &#8220;the swiss knife of &#8230;&#8221;. Well, for networking, OpenSSH clearly deserves that title in my opinion. Besides the obvious feature of providing secure logins with different options for mutual authentication, it can also be used to transfer files. It is also a core component of software like git, which depend on ssh to securely push changes instead of reinventing their own server and dealing with the whole authentication/authorization stuff once again.<br />
I&#8217;ve blogged about <a href="http://heipei.net/2008/08/28/ssh-through-proxyintermediate-host/">using SSH to access hosts behind a firewall/router more conveniently</a>, and I really suggest you sit down and read the manpage front-to-back, it will probably be rewarding for your current workflow.</p>
<p><b>Reusing a connection</b><br />
Anyway, today I wanted to present another advanced feature, one I only stumbled upon while learning for an upcoming exam. The slides mentioned the possibility to share connections on one SSH-channel (to the same destination, obviously). Now, why do you need more than one connection in the first place? Well, sometimes you just need the space, and using screen just doesn&#8217;t cut it. Or you use git or scp to the same host you&#8217;re logged in already interactively. In that case, you just have to establish one connection and any further connection will use the first one. The benefit? Login is way faster, almost instantly, because the whole handshake and authentication doesn&#8217;t have to take place again. The caveat: You&#8217;ll have to close your master-connection last, otherwise the other connections will drop too. For me that&#8217;s no problem, since the host I use most of the time is also the host I&#8217;ve got a session open with 24/7 (IRC).</p>
<p>I&#8217;m just gonna show the fully automated version here, though you can use it manually as well, just when you need it. A better description can be found <a href="http://www.debian-administration.org/articles/290">here</a>. To automate it, put this in your <tt>~/.ssh/config</tt> (you don&#8217;t have a config yet? shocking!):<br />
<code>ControlMaster auto<br />
ControlPath /tmp/%r@%h:%p</code>As usual, you can put it at the very top to apply for all hosts or you can activate it for specific hosts by putting below a <tt>Host</tt> declaration. Now all you have to do is use <tt>ssh host</tt> as usual. You&#8217;ll see it&#8217;s working when you terminate the connection:<br />
<tt>Shared connection to host.de closed.</tt></p>
<p><b>Reverse tunnel</b><br />
Yes, you can tunnel with OpenSSH. You can even have it act as a SOCKS proxy, which is really neat when combined with Firefox-plugins like FoxyProxy. But you can also reverse-tunnel your way out of a closed network (or NATed network for that matter) when you don&#8217;t have access to any intermediate host (like the router/firewall). It&#8217;s easy:<br />
<code>ssh -NR 12345:localhost:22 home.de</code>This assumes you&#8217;re issuing the command from the machine that you want to access (from home) later on. It will bind the port 12345 on home.de so that it is forwarded to port 22 (SSH) on the local host. Yeah, it requires some reverse thinking too to get it right ;) The <tt>-N</tt>-switch prevents a login, by the way. Obviously it is of little use if your home.de has a flaky dialup connection, so you might want to reverse-tunnel to a stable endpoint (or use something like autossh).</p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2010/02/02/openssh-reuse-existing-connections-reverse-tunnel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>msmtp queueing for offline use</title>
		<link>http://heipei.net/2009/11/17/msmtp-queueing-for-offline-use/</link>
		<comments>http://heipei.net/2009/11/17/msmtp-queueing-for-offline-use/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 19:15:51 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unterwegs]]></category>

		<guid isPermaLink="false">http://heipei.net/?p=715</guid>
		<description><![CDATA[When you start using a small and slow laptop over an unreliable GPRS connection (say while travelling in an ICE at 300km/h) you start noticing certain things that are missing from your current shell-setup. One of these problems manifests itself when you want to send the mail you just typed in mutt. Fortunately there is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://heipei.net/weblog/mutt-icon.png" alt="mutt" class="alignleft"/>When you start using a small and slow laptop over an unreliable GPRS connection (say while travelling in an ICE at 300km/h) you start noticing certain things that are missing from your current shell-setup. One of these problems manifests itself when you want to send the mail you just typed in mutt. Fortunately there is an easy and elegant fix (if you use mutt with msmtp): <a href="http://sourceforge.net/projects/msmtp/files/msmtpqueue/">msmtpqueue</a>. This gives you three little scripts to enqueue, list and send messages which would otherwise have gone directly into msmtp. Just put them somewhere and then add this to your .muttrc:<code>set sendmail="$HOME/local/bin/msmtp-enqueue -i"<br />
macro index \Cy "!$HOME/local/bin/msmtp-runqueue&lt;enter&gt;"</code>Now &#8220;sending&#8221; mail from mutt happens instantly and you can manually push the batch of mails out to your smtp once the train has stopped in a station and your reception is stable ;). <tt>msmtp-listqueue</tt> shows you the queued mails while <tt>msmtp-runqueue</tt> mails them (using msmtp of course!). For the downstream-direction of offline mutt-usage there&#8217;s <a href="http://software.complete.org/software/wiki/offlineimap/">offlineimap</a>, but I feel like this deserves an extra post ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2009/11/17/msmtp-queueing-for-offline-use/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aspire One / X.org screen blanking</title>
		<link>http://heipei.net/2009/11/14/aspire-one-x-org-screen-blanking/</link>
		<comments>http://heipei.net/2009/11/14/aspire-one-x-org-screen-blanking/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 11:39:14 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://heipei.net/?p=709</guid>
		<description><![CDATA[When using X on my Acer Aspire One (110L) and playing videos with mplayer, X would occasionally blank the screen after a few minutes without any way out but to suspend/resume to get your X back. This didn&#8217;t only happen with mplayer, and it didn&#8217;t have anything to do with xscreensaver.Anyway, after some digging I [...]]]></description>
			<content:encoded><![CDATA[<p>When using X on my Acer Aspire One (110L) and playing videos with mplayer, X would occasionally blank the screen after a few minutes without any way out but to suspend/resume to get your X back. This didn&#8217;t only happen with mplayer, and it didn&#8217;t have anything to do with xscreensaver.Anyway, after some digging I found that adding<code>        Option          "FramebufferCompression"        "off"</code>to the <tt>Device</tt>-section of my xorg.conf resolved the problem.<br />
Another cool thing I found out while going through ssh manpages is that you can silence the motd on login simply by touching <tt>~/.hushlogin</tt>.</p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2009/11/14/aspire-one-x-org-screen-blanking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gentoo Wallpaper</title>
		<link>http://heipei.net/2009/11/13/gentoo-wallpaper/</link>
		<comments>http://heipei.net/2009/11/13/gentoo-wallpaper/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 09:26:30 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://heipei.net/?p=702</guid>
		<description><![CDATA[I just found this wallpaper I seem to have made in &#8217;06 (around August) and posted to the Gentoo Forums. It never went anywhere, but it would be a shame to let it go to waste, so here you go. Don&#8217;t ask for any higher resolutions though ;) Download it in 800&#215;600, 1024&#215;768 or 1280&#215;1024.]]></description>
			<content:encoded><![CDATA[<p>I just found this wallpaper I seem to have made in &#8217;06 (around August) and <a href="http://forums.gentoo.org/viewtopic-p-3495740.html#3495740">posted to the Gentoo Forums</a>. It never went anywhere, but it would be a shame to let it go to waste, so here you go. Don&#8217;t ask for any higher resolutions though ;)<br />
<a href="http://heipei.net/weblog/gentoo-heipei-800x600.jpg"><img src="http://heipei.net/weblog/gentoo-heipei-thumb.jpg" alt="Gentoo Wallpaper" class="aligncenter"/></a><br />
Download it in <a href="http://heipei.net/weblog/gentoo-heipei-800x600.jpg">800&#215;600</a>, <a href="http://heipei.net/weblog/gentoo-heipei-1024x768.jpg">1024&#215;768</a> or <a href="http://heipei.net/weblog/gentoo-heipei-1280x1024.jpg">1280&#215;1024</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2009/11/13/gentoo-wallpaper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>256 colors galore!</title>
		<link>http://heipei.net/2009/10/18/256-colors-galore/</link>
		<comments>http://heipei.net/2009/10/18/256-colors-galore/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 10:39:08 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://heipei.net/?p=680</guid>
		<description><![CDATA[My weblog is littered with widespread tips about configuration for common shell tools and I post the occasional screenshot to flickr just to show off. I often get mails/comments regarding the used colorschemes and configs, so I thought it would be a good idea to create a separate page for these configs (and to keep [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://heipei.net/linux/"><img src="/weblog/256colors_page.png" alt="256 colors Linux" class="aligncenter"/></a>My weblog is littered with widespread tips about configuration for common shell tools and I post the occasional screenshot to flickr just to show off. I often get mails/comments regarding the used colorschemes and configs, so I thought it would be a good idea to create <a href="http://heipei.net/linux/">a separate page</a> for these configs (and to keep that up-to-date).</p>
<p>Comments and improvements can be directed to me via email or as a comment to this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2009/10/18/256-colors-galore/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>mutt: threading like a pro</title>
		<link>http://heipei.net/2009/09/10/mutt-threading-like-a-pro/</link>
		<comments>http://heipei.net/2009/09/10/mutt-threading-like-a-pro/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 20:29:57 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://heipei.net/?p=674</guid>
		<description><![CDATA[I&#8217;m sure I could come up with 5 of these every day if I read the whole user-manual religilously and followed dozens of blogs, but I don&#8217;t, so here goes: mutt supports threading (duh!) through set sort="threads" set strict_threads="yes" But you want threads which have new mails appear at the top/bottom (whichever way you work): [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/weblog/mutt_threads.png" alt="mutt" class="alignleft" style="border: 1px solid black; padding: 1px;"/>I&#8217;m sure I could come up with 5 of these every day if I read the whole user-manual religilously and followed dozens of blogs, but I don&#8217;t, so here goes:<br />
mutt supports threading (duh!) through</p>
<pre>set sort="threads"
set strict_threads="yes"</pre>
<p>But you want threads which have new mails appear at the top/bottom (whichever way you work):</p>
<pre>set sort_browser="reverse-date"
set sort_aux="last-date-received"</pre>
<p>Voila! Additionally it doesn&#8217;t hurt to unset</p>
<pre>unset collapse_unread</pre>
<p>The default-keybinding for threads isn&#8217;t the best, so it&#8217;s best to rebind it to something unused but easy:</p>
<pre>bind index - collapse-thread
bind index _ collapse-all</pre>
<p>Don&#8217;t wonder about the absence of &#8220;uncollapse&#8221;, in mutt there is only toggle (like it or not).<br />
One of the most useful features when communicating with people who don&#8217;t give a crap about mail is the split and link-feature for threads: Use the key <em>&#8216;#&#8217;</em> to break apart a thread, or tag some mails (using <em>&#8216;t&#8217;</em> for example) and the use the ampersand <em>&#8216;&#038;&#8217;</em> to link them to another mail (because some people see the &#8220;Reply&#8221; button as a cheap way to get an address into the To-field).<br />
<img src="/weblog/mutt_delete_attachment.png" alt="mutt" class="aligncenter" style="border: 1px solid black; padding: 1px;"/>Another feature of mutt (that&#8217;s worth using it over TB alone) is the quickness and ease with which it deletes attachments from mails without breaking the threading or anything else. Just press <em>&#8216;v&#8217;</em> on mail, select the attachment, mark it deleted with <em>&#8216;d&#8217;</em>, go back to your mailbox and hit <em>&#8216;$&#8217;</em> to write the changes to the mailbox. This will keep your mailbackups lean.</p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2009/09/10/mutt-threading-like-a-pro/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>genkernel 3.4.10-r2 with dmraid and hibernate-support</title>
		<link>http://heipei.net/2009/05/13/genkernel-3410-r2-with-dmraid-and-hibernate-support/</link>
		<comments>http://heipei.net/2009/05/13/genkernel-3410-r2-with-dmraid-and-hibernate-support/#comments</comments>
		<pubDate>Wed, 13 May 2009 14:27:11 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://heipei.net/?p=547</guid>
		<description><![CDATA[This comes from the I-have-to-pay-my-electrical-bill and from the learn-something-fun-about-your-system-everyday-department. As you know I&#8217;ve got Gentoo on my workstation. When I still lived in my dorm it was running 24/7 (last but not least to supply everyone with the latest episodes of popular shows). When I moved I started using a hacked-together suspend-to-ram script which worked [...]]]></description>
			<content:encoded><![CDATA[<p>This comes from the I-have-to-pay-my-electrical-bill and from the learn-something-fun-about-your-system-everyday-department. As you know I&#8217;ve got Gentoo on my workstation. When I still lived in my dorm it was running 24/7 (last but not least to supply everyone with the latest episodes of popular shows). When I moved I started using a hacked-together suspend-to-ram script which worked well enough for the last year or so. Seeing how quick and (seemingly easy) hibernate/suspend-to-disk worked on my new netbook I decided to once again give it a try on my workstation.<br />
Since my system has one of those stupid fake-raids I have always needed an initrd to boot the kernel. The initrd calls dmraid, which maps the strange arrays into usable disk-devices (don&#8217;t ask me). The preferred way of creating an initrd with Gentoo is genkernel, which can be used to build a kernel as well. The only problem was that genkernel still lacks support for suspend (user-space suspend, see <a href="http://bugs.gentoo.org/156445">Gentoo Bug</a>), while I can&#8217;t do without dmraid.</p>
<p>So I fired up git and <a href="http://git.lochraster.org:2080/?p=heipei/genkernel.git;a=summary">started hacking on the genkernel-code</a> and now have a system which does suspend-to-disk and dmraid. Having said that, I must stress that <strong>you should really know what you&#8217;re doing</strong> if you&#8217;re trying to use this. You could potentially shoot yourself in the foot if for some reason a hibernated image gets loaded after your harddrives have already been mounted. I try to avoid that in my patch by calling suspend_resume immediately after dmraid has been called (and only there). Improvements or constructive flames would be highly appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2009/05/13/genkernel-3410-r2-with-dmraid-and-hibernate-support/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>git: full-length side-by-side diffs</title>
		<link>http://heipei.net/2009/01/29/git-full-length-side-by-side-diffs/</link>
		<comments>http://heipei.net/2009/01/29/git-full-length-side-by-side-diffs/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 08:46:19 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://hackvalue.de/heipei/?p=403</guid>
		<description><![CDATA[Got this one from the git-ml (which I read via gmane, but that&#8217;s a different post): I&#8217;m not very good at reviewing patches. Especially not if it&#8217;s something like JavaScript. git at least colorizes its diffs, which makes it somewhat better. But as soon as you have a big file which is being patched in [...]]]></description>
			<content:encoded><![CDATA[<p>Got this one from the git-ml (which I read via gmane, but that&#8217;s a different post):<br />
I&#8217;m not very good at reviewing patches. Especially not if it&#8217;s something like JavaScript. git at least colorizes its diffs, which makes it somewhat better. But as soon as you have a big file which is being patched in multiple, disconnected places (different &#8220;hunks&#8221; in git terminology), so that the context between these hunks is missing, it gets to messy imho.</p>
<div align="center"><a href="http://www.flickr.com/photos/heipei/3236351860/" title="git-difftool in action by heipei, on Flickr"><img src="http://farm4.static.flickr.com/3346/3236351860_90f114d5c1.jpg" width="500" height="369" alt="git-difftool in action" /></a></div>
<p>Fortunately there is an easy solution: In git there is contrib/difftool, which makes it easy to display git diffs side-by-side with a viewer of your choice. Of course that meant vimdiff for me. To see all the lines of a file (and not just the changed + a little context) I call git-difftool like this:<br />
<code>git-difftool --tool=vimdiff -U99999</code>Now you can alias that command and use the normal rev-parse arguments. As you can see on the screenshot you can easily distinguish between removed lines, added lines and changed lines. For changed lines the part that was changed is highlighted.</p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2009/01/29/git-full-length-side-by-side-diffs/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
