<?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; Geekstuff</title>
	<atom:link href="http://heipei.net/category/geekstuff/feed/" rel="self" type="application/rss+xml" />
	<link>http://heipei.net</link>
	<description>Johannes 'heipei' Gilger</description>
	<lastBuildDate>Sun, 01 Apr 2012 16:47:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Photo and video post-processing using Linux</title>
		<link>http://heipei.net/2012/02/08/photo-and-video-post-processing-using-linux/</link>
		<comments>http://heipei.net/2012/02/08/photo-and-video-post-processing-using-linux/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 17:42:41 +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=888</guid>
		<description><![CDATA[As you might have noticed I tend to shoot a lot of photos (and recently the occasional video) on events such as parties and birthdays. Being a Linux user, and a strong believer in straight-out-of-camera shots, I tend to shy away from individual post-processing for my shots. I might crop the occasional shot, especially when [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://heipei.net/weblog/imagemagick.png" class="alignleft"/>As you might have noticed I tend to shoot a lot of photos (and recently the occasional video) on events such as parties and birthdays. Being a Linux user, and a strong believer in straight-out-of-camera shots, I tend to shy away from individual post-processing for my shots. I might crop the occasional shot, especially when it is to be used in a blog-post or something similar, but usually I simply like to throw a batch of images into a simple workflow to upload them to the web.</p>
<p><b>Photos</b><br />
When uploading photos to my <a href="http://photos.heipei.net/">llgal gallery</a>, I resize and sharpen them so they don&#8217;t take up quite as much storage and bandwidth. I start by using the EXIF auto-rotation flag to losslessly rotate any upright photos:<br />
<code>jhead -autorot IMG_*.JPG</code>Next, I rename the photos so there are no filename collisions when I throw together photos from different events:<br />
<code>exiftool '-FileName&lt;EVENT_ ${CreateDate}_$filename' -d %Y%m%d IM*.JPG</code><br />
Finally, if I want to upload the batch, I resize and sharpen the photos using the excellent imagemagick tools. Careful! <tt>mogrify</tt> will modify images in-place, so be sure to apply it on a copy of your original JPGs:<br />
<code>mogrify -resize "1024x1024&gt;" -unsharp 1x1+1+0 -sampling-factor 2x2 *.JPG</code>After that the folder with the photos is a simple <tt>scp</tt> and <tt>llgal</tt> call away from making it into my gallery.</p>
<p><b>Videos</b><br />
<img src="http://heipei.net/weblog/ffmpeg.png" class="alignleft"/>I&#8217;ve just recently started shooting video, but I already love the functionality on my EOS 60D. Even though I use the Magic Lantern firmware (you absolutely should too!) to reduce the bitrate of the videos by half, the 1080p25 videos from the EOS are still way too large to be used in any reasonable way, so it&#8217;s a good idea to compress them. I start by merging all the videos of an event into one file, using the mkvtools package:<br />
<code>mkvmerge MVI_0001.MOV + MVI_0002.MOV -o MVI_EVENT.MOV</code><br />
Next, I use ffmpeg to downscale and recompress the video and audio. Depending on your distribution, you might need to install extra packages from special repositories to do this:<br />
<code>ffmpeg -i MVI_EVENT.MOV -s 854x480 -b 2048k -vcodec libx264 -acodec libfaac -ac 2 -ar 48000 -ab 128k MVI_EVENT.mp4</code><br />
This will give you a nice small file with very good quality, even if it takes a while to render. The adjusting knob is the bitrate behind the <tt>-b</tt> parameter. Be careful not to change the framerate of the original video using <tt>-r</tt>, this will degrade quality and take forever because frames will have to be interpolated!</p>
<p>The ffmpeg-call could certainly be optimized, and I&#8217;m happy to hear about any suggestions.</p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2012/02/08/photo-and-video-post-processing-using-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Review: Sony Ericsson Xperia Active</title>
		<link>http://heipei.net/2011/10/21/review-sony-ericsson-xperia-active/</link>
		<comments>http://heipei.net/2011/10/21/review-sony-ericsson-xperia-active/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 19:48:07 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Fotos]]></category>
		<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Radfahren]]></category>
		<category><![CDATA[Wandern]]></category>

		<guid isPermaLink="false">http://heipei.net/?p=884</guid>
		<description><![CDATA[Das Xperia Active ist mein erstes Android Handy. Davor hatte ich zwei relativ ähnliche Sony Ericsson (K750i und C510) die beide leicht, klein und ziemlich robust waren. Für mich ist ein Handy ein Gebrauchsgegenstand der nur eine begrenzte Zeit halten muss und um den ich mir keine Sorgen machen will wenn es regnet oder ich [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/heipei/6249598449/" title="Shots of the Xperia Active by heipei, on Flickr"><img src="http://farm7.static.flickr.com/6229/6249598449_c6621cdd0e.jpg" width="500" height="334" alt="Shots of the Xperia Active" class="aligncenter"/></a>Das Xperia Active ist mein erstes Android Handy. Davor hatte ich zwei relativ ähnliche Sony Ericsson (K750i und C510) die beide leicht, klein und ziemlich robust waren. Für mich ist ein Handy ein Gebrauchsgegenstand der nur eine begrenzte Zeit halten muss und um den ich mir keine Sorgen machen will wenn es regnet oder ich das Handy in die Tasche/Rucksack werfe.</p>
<p>Mit dem Xperia Active habe ich jetzt ein Smartphone welches diese Anforderungen erfüllt. Ich kann das Handy bei Schnee und Regen am Rucksack aussen befestigt lassen, GPS bei Wanderungen und Radtouren mitloggen lassen und selbst mit nassen Fingern im Regen Schnappschüsse machen die ich, da es ein Smartphone ist, direkt auf den Internetdienst meiner Wahl übertragen kann. Falls ich mich tatsächlich verlaufe ist auch das Xperia Active nicht zu klein oder zu langsam und kann mit Google Maps und dem Kompass aushelfen. Die sehr sehr praktische Öse kann ich benutzen um das Handy garantiert bombenfest am Rucksack baumelnd zu befestigen, ein sehr wichtiges Feature. Die helle LED hilft Nachts. Beim Radfahren kann ich das mitgelieferte Sportarmband benutzen, falls ich sonst keine Taschen am Rad/Körper hab. Soweit zu meinem Nutzen für ein so ein rugged Smartphone.</p>
<p><a href="http://www.flickr.com/photos/heipei/6249599227/" title="Shots of the Xperia Active by heipei, on Flickr"><img src="http://farm7.static.flickr.com/6111/6249599227_fbde8bc1b1_m.jpg" width="240" height="160" alt="Shots of the Xperia Active" class="alignright"/></a>Während der Arbeit liegt das Handy nur rum, und im Standby mit GPRS aktiviert (und GPS/WLAN deaktiviert) und Sync an (Google+, Twitter, GMail) hält es locker 48h, wenn nicht sogar länger. Gespräche kommen sauber und zuverlässig rüber, Bedienung ist wie bei Android gewohnt, die Kamera absolut OK. Als jemand der viel mit einer DSLR fotografiert weiss ich es zu schätzen dass man Weissabgleich, Metering Mode und Fokus unabhänging voneinander in mehreren Programmen einstellen kann. Besonders der feste unendlich-Fokus bedeutet dass ich in 90% aller Situationen perfekt fokussierte Fotos mit null Verzögerung machen kann. Das Rauschverhalten bei ISO 1600 ist natürlich nicht mehr schön, dafür geht das Xperia bei gutem Wetter gern auf ISO 64 und Verschlusszeiten von bis zu 1/1250s runter. Brennweite ist fest bei 3.5mm und Blende bei f2.6.</p>
<p><strong>Negativpunkte</strong><br />
Eigentlich kann ich nur die Software von SE etwas kritisieren. Ein praktisches Migrations-App wie bei HTC fehlt leider, Kontakte muss man also per Bluetooth syncen und die alten SMS hab ich letzendlich gelöscht. Auch die HTC Sense UI gefällt mir etwas besser. Falls bei eurem Xperia Active die Handgelenksschlaufe fehlt ruft einfach beim SE-Support an, ist wohl bei ein paar wenigen der ersten Handies ausversehen vergessen worden. Ansonsten sollte man noch eine Rutsche Micro-USB Kabel mitbestellen, ich hatte ausser dem mitgelieferten keins, eine etwas größere Speicherkarte kann auch nicht schaden.</p>
<p><strong>Sample Photos</strong></p>
<div align="center">
<a href="http://www.flickr.com/photos/heipei/6246643788/" title="Xperia Active by heipei, on Flickr"><img src="http://farm7.static.flickr.com/6114/6246643788_1698fca091_m.jpg" width="240" height="180" alt="Xperia Active"/></a><a href="http://www.flickr.com/photos/heipei/6249017623/" title="Xperia Active in Vaals by heipei, on Flickr"><img src="http://farm7.static.flickr.com/6223/6249017623_14ebb29348_m.jpg" width="240" height="180" alt="Xperia Active in Vaals"/></a><br />
<a href="http://www.flickr.com/photos/heipei/6249545700/" title="Xperia Active in Vaals by heipei, on Flickr"><img src="http://farm7.static.flickr.com/6240/6249545700_39170b64e4_m.jpg" width="179" height="240" alt="Xperia Active in Vaals"/></a><a href="http://www.flickr.com/photos/heipei/6249545448/" title="Xperia Active in Vaals by heipei, on Flickr"><img src="http://farm7.static.flickr.com/6219/6249545448_72c5c4eb98_m.jpg" width="179" height="240" alt="Xperia Active in Vaals"/></a><a href="http://www.flickr.com/photos/heipei/6249017423/" title="Xperia Active in Vaals by heipei, on Flickr"><img src="http://farm7.static.flickr.com/6166/6249017423_cb594cda1e_m.jpg" width="179" height="240" alt="Xperia Active in Vaals"/></a>
</div>
<p>Sony Ericsson Xperia Active Flickr Group <a href="http://www.flickr.com/groups/1804976@N23/">here</a>.</p>
<p><em>(Sorry, German review this time, use Chrome translate ;)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2011/10/21/review-sony-ericsson-xperia-active/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Canon EOS 400D: New tricks</title>
		<link>http://heipei.net/2011/08/14/canon-eos-400d-new-tricks/</link>
		<comments>http://heipei.net/2011/08/14/canon-eos-400d-new-tricks/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 12:44:56 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Fotos]]></category>
		<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://heipei.net/?p=882</guid>
		<description><![CDATA[You can&#8217;t teach an old dog new tricks. This wisdom is only partially true for most modern devices, thanks to firmware updates. I&#8217;ve briefly mentioned having used a &#8220;hacked&#8221; firmware for the past few months. This weekend, contemplating whether and when to buy a new camera body, I decided to see if there have been [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/weblog/eos400d.jpg" alt="Canon EOS 400D" class="alignleft"/>You can&#8217;t teach an old dog new tricks. This wisdom is only partially true for most modern devices, thanks to firmware updates. I&#8217;ve <a href="http://heipei.net/2010/12/29/the-photographic-year-2010/">briefly mentioned having used a &#8220;hacked&#8221; firmware</a> for the past few months. This weekend, contemplating whether and when to buy a new camera body, I decided to see if there have been new features added to alternative firmwares for my Canon EOS 400D. Boy, was I in for a surprise!</p>
<p><b>400plus &#8211; Firmware Hack for the Canon EOS 400D</b><br />
<a href="http://code.google.com/p/400plus/">The 400plus project</a> is currently implementing a lot of additional features for the EOS 400D and distributing builds of hacked firmware which can be applied to the camera through a file which is loaded during camera startup, meaning they are easily reversible by simply deleting the firmware from the CF card. Recently, some really killer features where implemented, which even make some hardware additions redundant. This is an incomplete list, representing the most important features for me:</p>
<ul>
<li><b>Intervalometer</b>: The 400D can be used to shoot at regular intervals by itself, without any additional controlling hardware. This is perhaps the coolest feature, and I&#8217;ve yet to put it to good use by creating a time-lapse movie.</li>
<li><b>Intermediate ISO / Auto-ISO</b>: Found in newer cameras, the 400D now supports intermediate ISO steps (seamlessly between ISO 100 and ISO 3200) as well as providing a basic Auto-ISO function with upper and lower limit. The ISO can also be adjusted while looking through the viewfinder.</li>
<li><b>Handwave support</b>: This is a mode where the camera takes a shot each time the proximity sensor above the display is triggered. Useful for macro shots where you don&#8217;t want to rock the camera rig.</li>
<li><b>Timer</b>: The camera simply fires after a certain amount of seconds has elapsed. It can also start the interval program instead.</li>
<li><b>Manual Kelvin</b>: Useful if you don&#8217;t want to shoot RAW to get spot-on white balance.</li>
<li><b>Spot Metering</b>: Metering light at a very small spot in the center.</li>
<li><b>AF patterns</b>: Found in more recent camera, AF patterns are a cool addition. External flash AF assist doesn&#8217;t work with it though.</li>
</ul>
<p>For me, the Intervalometer/Timer/Handwave functions replace using an IR remote for self-portraits or macro shots. The Intervalometer replaces rather expensive external hardware triggers. The current version of the 400plus firmware seems very polished, providing simple menus and settings for its features, without any adverse side-effects. I expect more cool features to follow in the near future.</p>
<p><b>Tethered shooting using the command line</b><br />
<img src="/weblog/gphoto2.png" alt="gphoto2" class="alignleft"/>There are a number of solutions for tethered shooting with Canon DSLRs. Some of them even work on Linux. I wanted something simple to take and download shots from my 400D, so I used <a href="http://www.gphoto.org/">gphoto2</a>. gphoto2 provides a lot of other features which I won&#8217;t cover here, and <a href="http://www.gphoto.org/doc/remote/">supports remote control for a wealth of cameras</a>, so go check the compatibility of your own camera.</p>
<p>I wanted to use my EOS 400D as some sort of webcam, taking shots at intervals and directly transfering those shots to my PC. This is easy enough with gphoto:<br />
<code>gphoto2 --port=usb:005,048 --capture-image-and-download -I 30 --force-overwrite --filename=webcam.jpg --capture-preview</code>This takes a photo every 30 seconds and writes it to webcam.jpg. The port can be inferred by hooking up your camera and having a look at the output of <tt>lsusb</tt>. One small problem I encountered with my 2.6.39 kernel: The 400D did not work with ehci_hcd, so I had to disable it. If its modular, you can simply do <tt>modprobe -r ehci_hcd</tt>, but if, like me, its builtin, you can disable it by following <a href="http://www.absolutelytech.com/2010/04/18/solved-unable-to-enumerate-usb-device-disabling-ehci_hcd/">this guide</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2011/08/14/canon-eos-400d-new-tricks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CS Diploma: Check!</title>
		<link>http://heipei.net/2011/06/15/cs-diploma-check/</link>
		<comments>http://heipei.net/2011/06/15/cs-diploma-check/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 09:36:53 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Uni]]></category>

		<guid isPermaLink="false">http://heipei.net/?p=873</guid>
		<description><![CDATA[Careful readers should have noticed that I talked about having finished my Computer Science studies recently. Now, there are several steps to the process. First you simply hand in your diploma thesis, meaning that you&#8217;re done working on it. At some point, if you need it, you can get a slip which confirms that you [...]]]></description>
			<content:encoded><![CDATA[<div class="hyphenate">
<img src="/weblog/talk_thesis.png" alt="Implementation and Evaluation of Efficient Cryptographic Algorithms using CUDA and OpenCL" class="alignleft"/>Careful readers should have noticed that I talked about having finished my Computer Science studies recently. Now, there are several steps to the process. First you simply hand in your diploma thesis, meaning that you&#8217;re done working on it. At some point, if you need it, you can get a slip which confirms that you at least passed the thesis, albeit with the lowest possible grade. Then, you will give your final talk to pass the time until your reviewers have finished grading the thesis. Finally, the grade is officially and irreversibly entered into the university&#8217;s computer system, which, in my case, happened yesterday.</p>
<p><b>Thesis: Implementation and Evaluation of Efficient Cryptographic Algorithms using CUDA and OpenCL</b><br />
The (rather lengthy) topic of my thesis contains this: Cryptography on GPUs. GPUs have become much more powerful than CPUs in terms of FLOPs/s (floating point operations per second), but using these computational resources requires a new programming model and a problem which can in fact be translated to run on a GPU. I simply transformed a few block ciphers (symmetric encryption systems) to run on the GPU, and analyzed common design paradigms and problems along the way. This has been done before by other teams, but what sets my work apart (in my opinion) is the fact that I analyzed multiple ciphers in one work, used two different systems to test my implementations and provided a detailed description of the test setup, something missing from most of the previous work.</p>
<p>Additionally, I think my thesis makes a comfortable read for anyone interested in GPU programming and cryptography on GPUs. You don&#8217;t need a lot of previous knowledge to understand it, and most of the previous work in GPU cryptography (not just for block ciphers) has been cited in the first chapter.</p>
<p><b>Thesis: Implementation</b><br />
<img src="/weblog/engine-cuda.png" alt="engine-cuda" class="alignleft"/>To implement the ciphers examined in my thesis, I needed some kind of foundation. First of all, encryption and decryption has to be invoked in some standard way, and different kinds of benchmarks have to be supported as well. After some search, I settled with using <a href="http://code.google.com/p/engine-cuda/">engine-cuda</a>, an engine for the OpenSSL crypto library which uses CUDA to execute the block ciphers. To implement the block ciphers, I used the versions included with OpenSSL to start. Implementing a block cipher using just the original paper which describes it is a really bad idea unless you have extensive experience. I&#8217;ve seen other teams implement text-book versions of AES and fail miserably in the process.</p>
<p>My changes to engine-cuda will be released at some point in the near future, right now I am still working on it. Rest assured, when it is released you will hear about it here ;)</p>
<p><b>Thesis: Acknowledgments </b><br />
<img src="/weblog/itsec.png" alt="IT Security RWTH Aachen" class="alignleft"/>My thesis was written at the <a href="http://itsec.rwth-aachen.de/">Chair for IT Security at RWTH Aachen University</a>, which is a young and really small chair. As a result, the communication with my supervisor and the professor was excellent, and I&#8217;d like to thank them both for supporting my topic. While cryptography certainly fits well into a chair for security, GPU-programming is a topic more often attributed to HPC research groups. As usual, Flo proved to be really helpful pointing out spelling mistakes and other errors in my thesis. Last but not least, Paolo Margara, author and maintainer of the engine-cuda project helped me get started with the code and discussed implementation decisions with me during development.</p>
<p>If you have questions or suggestions about the content of my work, feel free to contact me!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2011/06/15/cs-diploma-check/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The photographic year 2010</title>
		<link>http://heipei.net/2010/12/29/the-photographic-year-2010/</link>
		<comments>http://heipei.net/2010/12/29/the-photographic-year-2010/#comments</comments>
		<pubDate>Wed, 29 Dec 2010 12:46:19 +0000</pubDate>
		<dc:creator>Jojo</dc:creator>
				<category><![CDATA[Fotos]]></category>
		<category><![CDATA[Geekstuff]]></category>

		<guid isPermaLink="false">http://heipei.net/?p=866</guid>
		<description><![CDATA[I haven&#8217;t blogged in a while and don&#8217;t really feel inclined to post anything too geeky (though I certainly have some topics in the pipeline). So I decided to have a look back at 2010 from a photographic point of view. This includes the shots I took and the stuff I used to do it. [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t blogged in a while and don&#8217;t really feel inclined to post anything too geeky (though I certainly have some topics in the pipeline). So I decided to have a look back at 2010 from a photographic point of view. This includes the shots I took and the stuff I used to do it. Here we go!</p>
<div align="center"><a href="http://www.flickr.com/photos/heipei/5274900086/" title="Wanderung Grenzrouten by heipei, on Flickr"><img src="http://farm6.static.flickr.com/5004/5274900086_5d8331c67c_m.jpg" width="240" height="160" alt="Wanderung Grenzrouten" /></a><a href="http://www.flickr.com/photos/heipei/5240956388/" title="Birthday Party by heipei, on Flickr"><img src="http://farm6.static.flickr.com/5121/5240956388_03d53c3cf8_m.jpg" width="240" height="160" alt="Birthday Party" /></a></div>
<p><b>Accessoires</b><br />
In January I decided to get myself an external flash, a <strong>Canon EX 430 II</strong>. I didn&#8217;t regret this decision a single day since then. No matter how fast your ISO and how wide your aperture, at some point you will most certainly need a flash. If used correctly, flash images look more natural to the casual observer, the fact that a flash was used only becomes apparent after studying the image more closely. Off-camera flash is even more fun, which is why I quickly got myself simple and cheap Tetra Phottix remote triggers.<a href="http://www.flickr.com/photos/heipei/4282942490/" title="Reflective Umbrella DIY by heipei, on Flickr"><img src="http://farm5.static.flickr.com/4002/4282942490_698ba70e95.jpg" width="500" height="334" alt="Reflective Umbrella DIY" class="aligncenter"/></a>The next logical and easy step was to play around with so-called <a href="http://www.ffl-rieger.de/shop/roscoleefolien/folienset/strobist-foliensammlung-rosco.php">&#8220;gels&#8221; (color filter for artificial lights)</a>, which can shift the 5500K light emitted by the flash to different temperatures. The gel I most commonly use is the <strong>Roscosun 1/2 CTO</strong> (color-to-orange) which shifts 5500K to 3800K, close to most of the artificial light sources you discover. I only used gels exclusively in the latter half of 2010 and the photos turned out much more balanced than before. A key aspect is to allow enough ambient light, otherwise I won&#8217;t matter how you shift your flash since it will be the only visible light source. The &#8216;Av&#8217; or &#8216;Tv&#8217; (or even &#8216;M&#8217;) modes can be used for that, while &#8216;P&#8217; will most certainly overpower any background lighting.<a href="http://www.flickr.com/photos/heipei/5249016612/" title="Freddy's and Felix' Birthday by heipei, on Flickr"><img src="http://farm6.static.flickr.com/5161/5249016612_a17e103f55.jpg" width="500" height="334" alt="Freddy's and Felix' Birthday" class="aligncenter"/></a>Once you get started with off-camera flash photography there is a whole new world of additional gadgets to be bought and tricks to be learned, just have a look at the <a href="http://strobist.com">Strobist website</a>. Needless to say, driving a single flash can get old really fast. A second flash was the logical next step. Since I knew I was only going to use this second flash in setup situations and off-camera (without a TTL-capable remote triggering system), I went for one of the cheapest and yet most reliable solutions and bought a <strong>Yongnuo YN-460 II</strong>. This flash only does manual (even on-camera), but it can trigger by itself on flash and even TTL-flash, without the need for any additional trigger mechanism. So I can use this with my EX 430 on-camera, with the EX 430 off-camera (using the Tetra trigger), and even with my builtin flash. I&#8217;m happy with the build quality and reliability of the Yongnuo and can only recommend it to any aspiring strobist on a budget.<br />
I got myself a pol filter for my 18-200mm but have yet to really use it :(.<a href="http://www.flickr.com/photos/heipei/5296583789/" title="Weihnachten 2010 by heipei, on Flickr"><img src="http://farm6.static.flickr.com/5121/5296583789_a728508ef6.jpg" width="500" height="334" alt="Weihnachten 2010" class="aligncenter"/></a>Lens-wise my repertoire grew by another prime lens: The <strong>Sigma EX 30mm 1.4</strong>. This lens combined the huge aperture of my 50mm with the standard focal width corresponding to 50mm (1.6 * 30mm = 48mm) on full-frame sensors. So far this lens has not let me down quality-wise. The focus works fast, quiet and reliably, the color reproduction is great and the build quality of this lens is solid. Sharpness (even at f1.4) lags in no way behind my 50mm 1.4. I have shot four events exclusively with this lens and was never restricted by the focal length. The typical shot of a couple across the table now becomes natural, while my 50mm always gave me the feeling of having to single out people in order to shot them. Another nice thing about Sigma lenses is that the lens hood is included for all of their lenses. Obviously this lens can&#8217;t be used on full-frame, but given the current lineup of crop SLRs, I don&#8217;t feel the need to go there anytime soon.<a href="http://www.flickr.com/photos/heipei/5296560161/" title="Bratapfelstammtisch &amp; Schrottwichteln by heipei, on Flickr"><img src="http://farm6.static.flickr.com/5082/5296560161_73b3301ae9.jpg" width="500" height="334" alt="Bratapfelstammtisch &amp; Schrottwichteln" class="aligncenter"/></a><br />
Finally I took a leap of faith and used an <a href="http://chdk.wikia.com/wiki/400D">alternative &#8220;hacked&#8221; firmware</a> on my EOS 400D which unlocks some nice features. For me, the most important features were intermediate ISO steps and manual white balance. While the EOS 400D only presents ISO 100-200-400-800-1600, the hacked firmware allows steps in between, like 400-500-640 etc. While quality at 400 is still OK, it can be a little coarse at 800, so going to 500 and 640 first is a nice option. Manual whitebalance means being able to set the temperature, and not use the WB-shift feature or the white-balance on exisiting photo. This feature has taught me a lot about judging lighting conditions and choosing the right gel for my flash. On a side note, I discovered two EXIF tags I had not noticed before: Remaining flash voltage and camera temperature (only Canon). </p>
<p><b>What&#8217;s next</b><br />
In the never-ending circle of DSLR-upgrades, the next thing for me will most certainly be a new camera body. While I don&#8217;t use the maximal resolution, never photograph in RAW and don&#8217;t miss movies this much, the ISO speed of the EOS 400D is a serious limitation. I never shoot at 1600 (except for grainy BW photos), while friends of mine use their 550D on 1600 or 3200 in most indoor situations. Since all the new models possess basically the same superior chip, I might go for the 550D, the 60D or the 7D, depending on how much I use my old 400D in the time until then. A nice distraction before the new body will probably an umbrella and lightstand for one of my flashes.</p>
<div align="center"><a href="http://www.flickr.com/photos/heipei/5274290199/" title="Wanderung Grenzrouten by heipei, on Flickr"><img src="http://farm6.static.flickr.com/5128/5274290199_c615cc442f_m.jpg" width="160" height="240" alt="Wanderung Grenzrouten" /></a><a href="http://www.flickr.com/photos/heipei/5251503769/" title="Fooling around by heipei, on Flickr"><img src="http://farm6.static.flickr.com/5203/5251503769_898d8d5a5b_m.jpg" width="160" height="240" alt="Fooling around" /></a><a href="http://www.flickr.com/photos/heipei/5092617249/" title="Herbstwanderung by heipei, on Flickr"><img src="http://farm5.static.flickr.com/4127/5092617249_d9ff19eed0_m.jpg" width="160" height="240" alt="Herbstwanderung" /></a><a href="http://www.flickr.com/photos/heipei/4912524533/" title="My new Yongnuo 460-II in action ;) by heipei, on Flickr"><img src="http://farm5.static.flickr.com/4139/4912524533_80da17b495_m.jpg" width="160" height="240" alt="My new Yongnuo 460-II in action ;)" /></a></div>
<p>As usual, complete galleries of my shots can be found on <a href="http://photos.heipei.net">http://photos.heipei.net</a>, while flickr only has a few selected shots.</p>
<p>Have a great 2011 ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2010/12/29/the-photographic-year-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WEP cracking with aircrack-ng</title>
		<link>http://heipei.net/2010/11/05/wep-cracking-with-aircrack-ng/</link>
		<comments>http://heipei.net/2010/11/05/wep-cracking-with-aircrack-ng/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 23:21:06 +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=865</guid>
		<description><![CDATA[Up until recently I thought of quickly cracking a WEP-enabled wireless as complicated. I was under the impression that not only special wireless NICs were needed to perform the necessary attack, but furthermore some time, a lot of luck and extensive knowledge of the necessary tools were absolutely necessary. I had seen videos of someone [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://media.heipei.net/aircrack.jpg" alt="Aircrack" class="alignleft"/>Up until recently I thought of quickly cracking a WEP-enabled wireless as complicated. I was under the impression that not only special wireless NICs were needed to perform the necessary attack, but furthermore some time, a lot of luck and extensive knowledge of the necessary tools were absolutely necessary. I had seen videos of someone using Kismac to discover a WEP-key in about 10 minutes, but since my Airport Extreme does not support packet injection and I didn&#8217;t follow up on it, I quickly forgot about it.</p>
<p>For some reason I delved into the topic again about a month ago. I realized that my tiny and cheap Acer Aspire One 110L, with its Atheros NIC (AR242x, 802.11abg) does in fact possess the ability to inject packets. Out of curiosity I had to try it for myself. This is not meant as a tutorial for cracking WEP (there is <a href="http://www.aircrack-ng.org/doku.php?id=simple_wep_crack">a comprehensive guide</a> for aircrack), but rather as an encouragement to try it yourself, or at least to think very hard if you&#8217;re still using WEP.</p>
<p>The most shocking thing I discovered was that the number of necessary packets to crack WEP had dramatically decreased with new attack methods. The aircrack-team talks about 20k / 40k packets (with the new PTW attack, origin and paper <a href="http://www.cdc.informatik.tu-darmstadt.de/aircrack-ptw/">here</a>) for cracking 64bit/128bit WEP, which is well below the 1000k packets I read about in the past. At a rate of 500 packets/s this amounts to less than 5 minutes of time needed. This is still a lot if you have to depend on legitimate network traffic and don&#8217;t have a few days of time. To speed things up, packet re-injection is the way to go today. It works like this: You wait and try to record an ARP-request (which should be no problem if someone is on the network), and then replay this request back to the network, meaning you simply re-inject the same packet you captured. For every ARP-request, the AP/router should respond with an ARP-reply, which in turn is a new data packet and the kind of packet you want to capture in order to get to 20k/40k unique IVs (initialization vectors). Now imagine doing this re-injection at a rate of 500 packets/s and you get the point.</p>
<p>A few caveats:</p>
<ul>
<li>If nobody&#8217;s on the network you won&#8217;t be able to capture an ARP-request. Tough luck ;)</li>
<li>If someone is on the network but you missed their initial ARP you can try disassociating them</li>
<li>I wasn&#8217;t able to do fake auth with the AP, which is why I had to replay the ARPs as long as the original client was still associated</li>
<li>If you wan&#8217;t to make extra sure you capture all the interesting replies you can keep Kismac running along airodump-ng</li>
<li>I suppose this is illegal in Germany. Oh well, I did it while on vacation ;)</li>
</ul>
<p>The nice thing about this attack:</p>
<ul>
<li>Really fast (think &#8216;car&#8217; and &#8216;battery slowly discharging&#8217;)</li>
<li>Not much storage needed to capture packets</li>
<li>Cracking efficiently possible, even on a laptop</li>
<li>If used for malicious purposes, the kind of people still using WEP will be the last to notice a few thousands extra 802.11 packets over a 5-minute span</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2010/11/05/wep-cracking-with-aircrack-ng/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ALIX 2D13: 2.6.35, LEDs, lighttpd, lmsensors</title>
		<link>http://heipei.net/2010/08/04/alix-2d13-2-6-35-leds-lighttpd-lmsensors/</link>
		<comments>http://heipei.net/2010/08/04/alix-2d13-2-6-35-leds-lighttpd-lmsensors/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 14:14:06 +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=864</guid>
		<description><![CDATA[It&#8217;s a good thing I waited a few days before releasing my next ALIX-post. I was gonna talk about the leds-alix module and where to download it, but in the meantime 2.6.35 was released and already contains all the necessary code. So, besides this post there is a new config: Linux 2.6.35 vanilla for ALIX [...]]]></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_m.jpg" width="240" height="160" alt="ALIX 2D13" class="alignright"/></a>It&#8217;s a good thing I waited a few days before releasing my next ALIX-post. I was gonna talk about the leds-alix module and where to download it, but in the meantime 2.6.35 was released and already contains all the necessary code. So, besides this post there is a new config: <a href="http://heipei.net/files/config-2.6.35-alix">Linux 2.6.35 vanilla for ALIX 2D13</a>. A few changes to the 2.6.34-config I posted last time:
<ul>
<li>I didn&#8217;t choose the Geode GL/GX last time, doh!</li>
<li>The kernel is no longer tickless (performs better)</li>
<li>Threw out some modular crypto-stuff (which I missed the last time)</li>
</ul>
<p>There are <strong>three front-LEDs</strong> on the ALIX board, so nothing fancy. The interesting is that there are predefined triggers for these LEDs in <tt>/sys/class/leds/</tt> which will make the LEDs display one of the following: heartbeat = load average (blinking speed), ide-disk (write access to the cf-card), timer, etc. Just try <tt>cat trigger</tt> to see the possible values. There is also the possibility to trigger on matches from iptables (think: traffic on port 22 ;). However my iptables userland seems to be outdated, so I will have to report about this another time.</p>
<p><img src="http://heipei.net/weblog/lighttpd.png" alt="Lighttpd" class="alignleft"/>Furthermore I tried using <strong>lighttpd</strong> instead of gatling on my fat external drive, and it performed even better, using slightly less CPU. In the kernel I activated the deadline IO-scheduler as default (while keeping CFQ and NOOP as an option), let&#8217;s see how that plays out. I&#8217;m still not getting more than 9MB/s using Samba, while the CPU is mostly idle and lighty completely saturates the 100MBit link, really annoying.</p>
<p><strong>lm_sensors</strong> on the ALIX are no problem either. Just try my kernel-config or make sure to activate the basic I2C-stuff and <tt>CONFIG_SCx200_ACB</tt>. My ALIX runs at comfy 42°C when not under load.</p>
<p>I already talked about using <strong>tmpfs for some of the directories</strong> written to frequently (<tt>/tmp, /var/tmp, /var/run, /var/log, /var/lock</tt>). I don&#8217;t care about logs right now, so I don&#8217;t mind losing them on reboot. Some daemons however complain or won&#8217;t start if their log-directories aren&#8217;t set up, so you should do that with an init-script. I uploaded <a href="http://heipei.net/files/heipei.sh.txt">my script here</a>, which will work with Debian and also sets up two LEDs and the deadline scheduler in case it isn&#8217;t the default.</p>
]]></content:encoded>
			<wfw:commentRss>http://heipei.net/2010/08/04/alix-2d13-2-6-35-leds-lighttpd-lmsensors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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://media.heipei.net/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://media.heipei.net/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>1</slash:comments>
		</item>
	</channel>
</rss>

