<?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>Patrick&#039;s WebLog</title>
	<atom:link href="http://patrick-nagel.net/blog/feed" rel="self" type="application/rss+xml" />
	<link>https://patrick-nagel.net/blog</link>
	<description>patrick-nagel.net/blog</description>
	<lastBuildDate>Mon, 30 Jan 2012 01:39:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Sync your Android contacts and calendars with your own server</title>
		<link>https://patrick-nagel.net/blog/archives/389</link>
		<comments>https://patrick-nagel.net/blog/archives/389#comments</comments>
		<pubDate>Wed, 25 Jan 2012 13:02:27 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Linux (general)]]></category>

		<guid isPermaLink="false">https://patrick-nagel.net/blog/?p=389</guid>
		<description><![CDATA[It&#8217;s 2012, and there are still people who don&#8217;t put all their information onto Google/Facebook/&#8230; servers. Call them paranoid control freaks, if you want. Some of them even run their own e-mail server. Those people would probably prefer to have their address book(s) and calendar(s) stored on their own server as well, which Android cannot [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s 2012, and there are still people who don&#8217;t put all their information onto Google/Facebook/&#8230; servers. Call them paranoid control freaks, if you want. <img src='https://patrick-nagel.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Some of them even run their own e-mail server. Those people would probably prefer to have their address book(s) and calendar(s) stored on their own server as well, which Android cannot do out of the box.</p>
<p>This blog post aims to give a brief overview over my current solution to this problem. It&#8217;s not 100% perfect yet, but I am quite satisfied with it already. I have been using this setup for a couple of months now, and did not encounter any problems of relevance. (*)</p>
<h4>Software components involved</h4>
<p><strong>On your server:</strong></p>
<ul>
<li><a href="http://www.davical.org/" title="DAViCal">DAViCal</a> &#8211; a free (GPL licensed) CalDAV/CardDAV server written in <a href="http://www.php.net/" title="PHP">PHP</a>; needs <a href="http://www.postgresql.org/" title="PostgreSQL">PostgreSQL</a> as database server<br/><a href="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/davical_screenshot.png"><img src="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/davical_screenshot-150x150.png" alt="" title="davical_screenshot" width="150" height="150" class="size-thumbnail wp-image-408" /></a>
	</li>
<li>Optional: <a href="http://roundcube.net/" title="Roundcube Webmail">Roundcube Webmail</a> with the <a href="http://www.crash-override.net/carddav.html" title="CardDAV plugin">CardDAV plugin</a> &#8211; to manage your contacts from within any web browser (Roundcube is of course also a decent mail client)<br/><a href="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/roundcube_carddav_screenshot.png"><img src="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/roundcube_carddav_screenshot-150x150.png" alt="" title="roundcube_carddav_screenshot" width="150" height="150" class="alignnone size-thumbnail wp-image-409" /></a>
</li>
</ul>
<p><strong>On your desktop:</strong></p>
<ul>
<li>Optional: <a href="http://www.mozilla.org/en-US/thunderbird/" title="Mozilla Thunderbird">Mozilla Thunderbird</a> with the <a href="http://www.mozilla.org/projects/calendar/lightning/" title="Lightning">Lightning extension</a> &#8211; to manage your calendar(s) from your Linux/Windows/Mac desktop<br/><a href="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/thunderbird_caldav_screenshot.png"><img src="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/thunderbird_caldav_screenshot-150x150.png" alt="" title="thunderbird_caldav_screenshot" width="150" height="150" class="alignnone size-thumbnail wp-image-410" /></a>
</li>
</ul>
<p><strong>On your Android device:</strong></p>
<ul>
<li><a href="http://dmfs.org/caldav/" title="CalDAV-Sync">CalDAV-Sync</a> app from Market or AndroidPIT for a bit more than 2€<br/><a href="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/Android_calendar_CalDAV.png"><img src="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/Android_calendar_CalDAV-150x150.png" alt="" title="Android_calendar_CalDAV" width="150" height="150" class="alignnone size-thumbnail wp-image-411" /></a><br/><small>(Since CalDAV-Sync is just a backend app that facilitates syncing, this is a screenshot of the Android calendar, with the event that can be seen in the Thunderbird-Lightning screenshot above)</small></li>
<li><a href="http://dmfs.org/carddav/" title="CardDAV-Sync">CardDAV-Sync</a> app from Market or AndroidPIT for a bit less than 1.50€ or free<br/><a href="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/Android_contact_CardDAV.png"><img src="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/Android_contact_CardDAV-150x150.png" alt="" title="Android_contact_CardDAV" width="150" height="150" class="alignnone size-thumbnail wp-image-412" /></a><small>(Since CardDAV-Sync is just a backend app that facilitates syncing, this is a screenshot of the Android contact viewer, with the contact that can be seen in the Roundcube CardDAV screenshot above)</small></li>
<li><a href="http://dmfs.org/editor/" title="Contact Editor">Contact Editor or Contact Editor Pro</a> app from Market or AndroidPIT (Pro costs a bit more than 2€, the free version lacks a few features)<br/><a href="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/Android_Contact_Editor_Pro11.png"><img src="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/Android_Contact_Editor_Pro11-150x150.png" alt="" title="Android_Contact_Editor_Pro1" width="150" height="150" class="alignnone size-thumbnail wp-image-414" /></a> <a href="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/Android_Contact_Editor_Pro2.png"><img src="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/Android_Contact_Editor_Pro2-150x150.png" alt="" title="Android_Contact_Editor_Pro2" width="150" height="150" class="alignnone size-thumbnail wp-image-415" /></a> <a href="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/Android_Contact_Editor_Pro3.png"><img src="https://patrick-nagel.net/blog/wp-content/uploads/2012/01/Android_Contact_Editor_Pro3-150x150.png" alt="" title="Android_Contact_Editor_Pro3" width="150" height="150" class="alignnone size-thumbnail wp-image-416" /></a></li>
</ul>
<p>A few notes regarding the components:</p>
<ul>
<li>Contact Editor is necessary because the default Android contact editor somehow does not work with custom contact sources. It integrates seamlessly once you have set it as default action upon adding/editing a contact for the first time after installation.</li>
<li>There is currently no way to get Mozilla Thunderbird to sync contacts via CardDAV (there was an extension, but it seems to no longer be maintained, and I did not get it to work), which is a pity. I hope that will change soon &#8211; the current state of contact management in Thunderbird is really bad &#8211; but <a href="https://wiki.mozilla.org/Features/Thunderbird/Modern_Address_Book" title="Mozilla Wiki - Modern Address Book feature page">there is hope</a>.</li>
<li>There seems to be a calendar plugin for Roundcube as well (<a href="https://code.google.com/p/myroundcube/" title="MyRoundcube">as part of the MyRoundcube plugin collection</a>), and it seems to support CalDAV, but I couldn&#8217;t get it to work so far (and did not try hard, since I always have a Thunderbird with Lightning around, which is great for calendaring).</li>
</ul>
<p>I&#8217;m planning to write more on how to get everything set up, but I currently don&#8217;t have time for that. The hardest part is getting DAViCal and PostgreSQL to work, in my opinion, all the other components basically just need a URL (to the previously set up DAViCal collection &#8211; e.g. https://your.server/davical/caldav.php/YOUR_USER/YOUR_COLLECTION), username and password to work.</p>
<p><strong>Update (2012-01-28): </strong>Added some screenshots.<br />
<strong>Update (2012-01-29): </strong>(*) Typical, I write about something, and then it breaks. It seems there is an incompatibility between the newly released DAViCal 1.0.2 and CalDAV-Sync. The CalDAV-Sync developer has confirmed the issue and is working on it.<br />
<strong>Update (2012-01-30): </strong>The incompatibility &#8211; resulting in logged error messages &#8211; does not affect functionality (it was just me having set the account to &#8220;One-Way-Sync&#8221;)</p>
<p>By the way, what must be a very recent change in Gentoo&#8217;s packaging of PHP causes CalDAV-Sync to fail syncing, and the apache error log contains &#8220;[Sat Jan 28 08:30:48 2012] [error] [client x.x.x.x] PHP Fatal error:  Call to undefined function cal_days_in_month() in /&#8230;/davical/inc/RRule-v2.php on line 906&#8243; if you do not enable the &#8216;calendar&#8217; USE flag for dev-lang/php (which is disabled by default).</p>
]]></content:encoded>
			<wfw:commentRss>https://patrick-nagel.net/blog/archives/389/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SOPA protest &#8211; Wikipedia blackout</title>
		<link>https://patrick-nagel.net/blog/archives/377</link>
		<comments>https://patrick-nagel.net/blog/archives/377#comments</comments>
		<pubDate>Tue, 17 Jan 2012 04:44:47 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Internet development]]></category>

		<guid isPermaLink="false">https://patrick-nagel.net/blog/?p=377</guid>
		<description><![CDATA[Since I consider this some kind of historical Internet event, I&#8217;ll dedicate a short blog post: The English Wikipedia will be taken offline for as long as 24 hours as a form of protest against the U.S. &#8220;SOPA&#8221; law, which is considered a threat for Internet Free Speech by the Wikipedia community and many others. [...]]]></description>
			<content:encoded><![CDATA[<p>Since I consider this some kind of historical Internet event, I&#8217;ll dedicate a short blog post:</p>
<p>The <a href="http://en.wikipedia.org/" title="Wikipedia">English Wikipedia</a> will be taken offline for as long as 24 hours as a form of protest against the U.S. &#8220;SOPA&#8221; law, which is considered a threat for Internet Free Speech by the Wikipedia community and many others.</p>
<p>So&#8230; no &#8216;lemme look that up on Wikipedia&#8217; from <a href="http://myworldtime.net/2012-01-18_05:00_UTC" title="Wednesday 5:00 UTC">Wednesday 5:00 UTC</a> to <a href="http://myworldtime.net/2012-01-19_05:00_UTC" title="Thursday 5:00 UTC">Thursday 5:00 UTC</a>.</p>
<p>In this context I&#8217;d like to recommend watching <a href="http://craphound.com/?p=3848" title="Cory Doctorow - The Coming War on General Purpose Computation">Cory Doctorow&#8217;s speech on what he calls The Coming War on General Purpose Computation</a> &#8211; the content mafia trying to shape the Internet may just be the beginning&#8230; For those who have a preview of what&#8217;s to come already (i.e. those living in China, for example): <a href="http://mirror.fem-net.de/CCC/28C3/mp4-h264-HQ/28c3-4848-en-the_coming_war_on_general_computation_h264.mp4">here is a direct link to download the video in MP4</a>, and <a href="http://mirror.fem-net.de/CCC/28C3/mp4-h264-HQ/28c3-4848-en-the_coming_war_on_general_computation_h264.mp4.torrent">here is a torrent through which you can get the same MP4</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://patrick-nagel.net/blog/archives/377/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://mirror.fem-net.de/CCC/28C3/mp4-h264-HQ/28c3-4848-en-the_coming_war_on_general_computation_h264.mp4" length="425690525" type="video/mp4" />
		</item>
		<item>
		<title>Cool timestamp</title>
		<link>https://patrick-nagel.net/blog/archives/366</link>
		<comments>https://patrick-nagel.net/blog/archives/366#comments</comments>
		<pubDate>Fri, 11 Nov 2011 10:58:38 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">https://patrick-nagel.net/blog/?p=366</guid>
		<description><![CDATA[11 hours, 11 minutes and 11 seconds until a really cool timestamp myworldtime.net/cool_timestamp/11-11-11_11:11:11_-11]]></description>
			<content:encoded><![CDATA[<p>11 hours, 11 minutes and 11 seconds until a really cool timestamp <img src='https://patrick-nagel.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://myworldtime.net/cool_timestamp/11-11-11_11:11:11_-11" title="http://myworldtime.net/cool_timestamp/11-11-11_11:11:11_-11">myworldtime.net/cool_timestamp/11-11-11_11:11:11_-11</a></p>
]]></content:encoded>
			<wfw:commentRss>https://patrick-nagel.net/blog/archives/366/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TT-RSS 1.5.5 in Portage</title>
		<link>https://patrick-nagel.net/blog/archives/355</link>
		<comments>https://patrick-nagel.net/blog/archives/355#comments</comments>
		<pubDate>Tue, 19 Jul 2011 13:40:56 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Gentoo Linux]]></category>
		<category><![CDATA[Web applications]]></category>

		<guid isPermaLink="false">https://patrick-nagel.net/blog/?p=355</guid>
		<description><![CDATA[I have blogged about TT-RSS just recently. And when Andrew Dolgov, TT-RSS&#8217;s initiator and main contributor released version 1.5.5, I thought I&#8217;d try to improve the ebuild a bit, given that it is in Portage now. So I added a &#8216;daemon&#8217; USE flag, which makes it easy for Gentoo users to get TT-RSS to update [...]]]></description>
			<content:encoded><![CDATA[<p>I have <a href="/blog/archives/313" title="Reading news the way I like it">blogged about TT-RSS</a> just recently. And when <a href="http://twitter.com/#!/gothfox" title="gothfox on Twitter">Andrew Dolgov</a>, TT-RSS&#8217;s initiator and main contributor released version 1.5.5, I thought I&#8217;d try to improve the ebuild a bit, given that it is <a href="http://packages.gentoo.org/package/www-apps/tt-rss" title="www-apps/tt-rss in Gentoo Portage">in Portage</a> now.</p>
<p>So I added a &#8216;daemon&#8217; USE flag, which makes it easy for Gentoo users to get TT-RSS to update the RSS feeds. When you emerge www-apps/tt-rss with USE=daemon, it will now install an init script to start the &#8216;ttrssd&#8217; daemon (or multiple, if you have multiple TT-RSS instances on your host). This is the preferred way to keep the feeds updated, according to <a href="http://tt-rss.org/redmine/wiki/tt-rss/UpdatingFeeds" title="TT-RSS's documentation">TT-RSS&#8217;s documentation</a>.</p>
<p>So, if you need a great, centralised (i.e. synchronised state amongst your computers, phones, etc.) news aggregator that runs on your own server / web host, give tt-rss a try! And if you&#8217;re a Gentoo user, I&#8217;d appreciate if you could test the new ebuild&#8217;s features (USE=daemon), and give feedback here or open a bug report if there is anything that could be improved further.</p>
]]></content:encoded>
			<wfw:commentRss>https://patrick-nagel.net/blog/archives/355/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Impact of ext4&#8242;s discard option on my SSD</title>
		<link>https://patrick-nagel.net/blog/archives/337</link>
		<comments>https://patrick-nagel.net/blog/archives/337#comments</comments>
		<pubDate>Fri, 08 Jul 2011 08:19:32 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Linux (general)]]></category>
		<category><![CDATA[SSD]]></category>

		<guid isPermaLink="false">https://patrick-nagel.net/blog/?p=337</guid>
		<description><![CDATA[Solid-state drives (SSDs) are seen as the future of mass storage by many. They are famous for their high performance: extremely low seek times, since there is no head that needs move to a position and then wait for the spinning disk to come around to where it needs to read/write; but also higher throughput [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Solid-state_drive" title="Solid-state drive">Solid-state drives</a> (SSDs) are seen as the future of mass storage by many. They are famous for their high performance: extremely low seek times, since there is no head that needs move to a position and then wait for the spinning disk to come around to where it needs to read/write; but also higher throughput of sequential data: My 2,5&#8243; OCZ Vertex LE (100 GB) is rated at 235 MB/s sustained write speed, and read speeds up to 270 MB/s, for example.</p>
<p>There is a caveat though &#8211; quoting <a href="http://en.wikipedia.org/w/index.php?title=TRIM&#038;oldid=436591474#Flash_drive_specific_issues" title="Wikipedia" target="_blank">Wikipedia</a>:</p>
<blockquote><p>In SSDs, a write operation can be done on the page-level, but due to hardware limitations, erase commands always affect entire blocks. As a result, writing data to SSD media is very fast as long as empty pages can be used, but slows down considerably once previously written pages need to be overwritten. Since an erase of the cells in the page is needed before it can be written again, but only entire blocks can be erased, an overwrite will initiate a read-erase-modify-write cycle: the contents of the entire block have to be stored in cache before it is effectively erased on the flash medium, then the overwritten page is modified in the cache so the cached block is up to date, and only then is the entire block (with updated page) written to the flash medium. This phenomenon is known as write amplification.</p></blockquote>
<p>So, SSDs are fast at writing, but only when their free space is neatly trimmed. The only component in your software stack that knows which parts of your SSD should be trimmed, is your file system. That is why there is a file system option in ext4 (my current file system of choice), called &#8220;discard&#8221;. When this option is active, space that is freed up in the file system is reported to the SSD immediately, and then the SSD does the trimming right away. This will make the next write to that part of the SSD as fast as expected. Obviously, trimming takes time &#8211; but how much time exactly? I wanted to find out, and did the following: I measured the time to unpack and then delete the kernel sources (36706 files amounting to 493 MB, which is what I call a big bunch of small files). I did it three times with and three times without the &#8220;discard&#8221; option, and then took the average of those three tries:</p>
<p><strong>Without &#8220;discard&#8221; option:</strong></p>
<ul>
<li>Unpack: 1.21s</li>
<li>Sync: 1.66s (= 172 MB/s)</li>
<li>Delete: 0.47s</li>
<li>Sync: 0.17s</li>
</ul>
<p><strong>With &#8220;discard&#8221; option:</strong></p>
<ul>
<li>Unpack: 1.18s</li>
<li>Sync: 1.62s (= 176 MB/s)</li>
<li>Delete: 0.48s</li>
<li>Sync: <strong>40.41s</strong></li>
</ul>
<p>So, with &#8220;discard&#8221; on, deleting a big bunch of small files is 64 times slower on my SSD. For those ~40 seconds any I/O is really slow, so that&#8217;s pretty much the time when you get a fresh cup of coffee, or waste time watching the mass storage activity LED.</p>
<p><strong>Conclusion</strong><br />
Don&#8217;t enable the &#8220;discard&#8221; option if you have a similar SSD. A much better way to keep your free space neatly trimmed for good write speeds is, to trigger a complete walk over the file system&#8217;s free space, and tell the SSD to trim that all at once. And of course you would do that at times when you don&#8217;t actually want to use the system (e.g. in a nightly cron job, or with a script that gets launched during system shutdown). This can be done with the &#8216;fstrim&#8217; command (that comes with util-linux), which takes around six minutes for my currently 60% filled 95 GB file system.</p>
<p>Update (2011-07-08): I forgot some details that may be interesting:</p>
<ul>
<li>Kernel version: 2.6.39.2</li>
<li>SSD firmware version: 1.32</li>
<li>CPU: AMD Phenom II X4 965</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>https://patrick-nagel.net/blog/archives/337/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Reading news the way I like it</title>
		<link>https://patrick-nagel.net/blog/archives/313</link>
		<comments>https://patrick-nagel.net/blog/archives/313#comments</comments>
		<pubDate>Sat, 02 Jul 2011 06:13:35 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Gentoo Linux]]></category>
		<category><![CDATA[Web applications]]></category>

		<guid isPermaLink="false">https://patrick-nagel.net/blog/?p=313</guid>
		<description><![CDATA[I have been using Tiny Tiny RSS (or TT-RSS) (www-apps/tt-rss in Gentoo) as my news aggregator since the end of 2008. It is a web application (written in PHP) that provides a great news aggregator UI. Since it&#8217;s a web application, you can use it from anywhere with just a browser, and thus have all [...]]]></description>
			<content:encoded><![CDATA[<p>I have been using <a href="http://tt-rss.org">Tiny Tiny RSS</a> (or TT-RSS) (<a href="http://packages.gentoo.org/package/www-apps/tt-rss">www-apps/tt-rss in Gentoo</a>) as my news aggregator since the end of 2008. It is a web application (written in PHP) that provides a great news aggregator UI. Since it&#8217;s a web application, you can use it from anywhere with just a browser, and thus have all your feeds in the same state (read/starred/&#8230;), anywhere you are. Think of it as Google Reader, but without Google knowing exactly what news articles you&#8217;re interested in, since you can run TT-RSS on your own server / web host.<br />
So, TT-RSS alone was great already, but the UI is more suitable for when you have a mouse and a big browser window, than for using it from your phone.</p>
<p>Recently I discovered the Android App <a href="http://code.google.com/p/ttrss-reader-fork/">TT-RSS Reader</a> which solves exactly that problem. It connects to your TT-RSS instance via an API, and brings all your feeds, with all their states just as on the web interface, to your Android device. The interface is specifically designed for touch screens, so it&#8217;s much easier to navigate through your feeds and articles than via the web interface. Furthermore, it can cache articles and images, which you can trigger while on WiFi before leaving the house, and then read everything on the way in Offline mode, to save mobile traffic, which is expensive and/or slow for some. When you&#8217;re back on WiFi, you switch back to Online mode, and TT-RSS Reader synchronises your state to your TT-RSS instance. Absolutely awesome <img src='https://patrick-nagel.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>A couple of quick screenshots from the web interface (TT-RSS):</p>
<p><a href="https://patrick-nagel.net/blog/wp-content/uploads/2011/07/tt-rss.png"><img src="https://patrick-nagel.net/blog/wp-content/uploads/2011/07/tt-rss-300x203.png" alt="" title="TT-RSS" width="300" height="203" class="aligncenter size-medium wp-image-316" /></a><br />
<a href="https://patrick-nagel.net/blog/wp-content/uploads/2011/07/tt-rss2.png"><img src="https://patrick-nagel.net/blog/wp-content/uploads/2011/07/tt-rss2-300x251.png" alt="" title="TT-RSS 2" width="300" height="251" class="aligncenter size-medium wp-image-334" /></a></p>
<p>&#8230;  and the Android App (TT-RSS Reader):</p>
<p><span class="aligncenter"><a href="https://patrick-nagel.net/blog/wp-content/uploads/2011/07/tt-rss-reader1.png"><img src="https://patrick-nagel.net/blog/wp-content/uploads/2011/07/tt-rss-reader1-180x300.png" alt="" title="TT-RSS-Reader 1" width="90" height="150" class="size-medium wp-image-317" /></a> <a href="https://patrick-nagel.net/blog/wp-content/uploads/2011/07/tt-rss-reader2.png"><img src="https://patrick-nagel.net/blog/wp-content/uploads/2011/07/tt-rss-reader2-180x300.png" alt="" title="TT-RSS-Reader 2" width="90" height="150" class="size-medium wp-image-318" /></a> <a href="https://patrick-nagel.net/blog/wp-content/uploads/2011/07/tt-rss-reader3.png"><img src="https://patrick-nagel.net/blog/wp-content/uploads/2011/07/tt-rss-reader3-180x300.png" alt="" title="TT-RSS-Reader 3" width="90" height="150" class="size-medium wp-image-319" /></a></span><br />
<a href="https://patrick-nagel.net/blog/wp-content/uploads/2011/07/tt-rss-reader4.png"><img src="https://patrick-nagel.net/blog/wp-content/uploads/2011/07/tt-rss-reader4-180x300.png" alt="" title="tt-rss-reader4" width="180" height="300" class="aligncenter size-medium wp-image-331" /></a></p>
<p>Update (2011-07-03): Shortly after posting this, hwoarang offered to take TT-RSS from the Sunrise Overlay into Gentoo&#8217;s main repository (Portage), with me proxy-maintaining it. So now it&#8217;s even easier to get TT-RSS onto your Gentoo-powered server.</p>
]]></content:encoded>
			<wfw:commentRss>https://patrick-nagel.net/blog/archives/313/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My phone&#8217;s bash.profile</title>
		<link>https://patrick-nagel.net/blog/archives/298</link>
		<comments>https://patrick-nagel.net/blog/archives/298#comments</comments>
		<pubDate>Thu, 26 May 2011 09:45:20 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Linux (general)]]></category>

		<guid isPermaLink="false">https://patrick-nagel.net/blog/?p=298</guid>
		<description><![CDATA[Here is some automation that I put into my bash.profile. It&#8217;s all done with aliases, since with regular shell scripts, I would first have to remount /mnt/sdcard without &#8216;noexec&#8217;. Like this, I just need to open a ConnectBot &#8220;Local&#8221; connection, type the alias, and press enter(*). (*) For this to work, the &#8216;post login automation&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>Here is some automation that I put into my bash.profile. It&#8217;s all done with aliases, since with regular shell scripts, I would first have to remount /mnt/sdcard without &#8216;noexec&#8217;. Like this, I just need to open a ConnectBot &#8220;Local&#8221; connection, type the alias, and press enter(*). </p>
<p>(*) For this to work, the &#8216;post login automation&#8217; entry of the ConnectBot &#8220;Local&#8221; profile needs to have<br />
<code>bash --rcfile /sdcard/bash.profile</code><br />
in it.</p>
<p>Here is what I have in there:</p>
<p><code>alias bb="busybox"<br />
alias top="bb top"<br />
alias df="bb df"</p>
<p>alias ll="ls -l"<br />
alias n="su -c \"netstat -ntupl\""</p>
<p>alias backupdata="su -c \"rsync -rP --delete --numeric-ids --chmod=u+rwX --exclude Music /sdcard/ pat@192.168.0.2:/data/pat/g2sd/\""</p>
<p>alias postflash="echo \"Mounting /system read-write\" &#038;&#038; su -c \"mount -o rw,remount /system\" &#038;&#038; echo \"Copying modified keyboard layout files...\" &#038;&#038; su -c \"cp /sdcard/vision-keypad-wwe.kcm.bin /system/usr/keychars/\" &#038;&#038; su -c \"cp /sdcard/vision-keypad-wwe.kl /system/usr/keylayout/\" &#038;&#038; echo \"Deleting awful camera click sound...\" &#038;&#038; su -c \"rm /system/media/audio/ui/camera_click.ogg\" &#038;&#038; sync &#038;&#038; echo \"All done. Please reboot now.\""</p>
<p>clear<br />
uptime<br />
echo</code></p>
<p>The first couple of aliases should be self-explanatory.<br />
<tt><strong>backupdata</strong></tt> is, as the name suggests, to get my SD card&#8217;s content to my home server.<br />
<tt><strong>postflash</strong></tt> is for after flashing a new ROM (usually a <a href="http://www.cyanogenmod.com/">CyanogenMod</a> nightly build). It gets my modified keyboard layout into place, and deletes the <em>terrible</em> sound file that gets played when I take a photo with the phone&#8217;s camera.</p>
]]></content:encoded>
			<wfw:commentRss>https://patrick-nagel.net/blog/archives/298/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>emerge output ends up as attachment.bin when sent with nail / Heirloom mailx</title>
		<link>https://patrick-nagel.net/blog/archives/286</link>
		<comments>https://patrick-nagel.net/blog/archives/286#comments</comments>
		<pubDate>Fri, 25 Feb 2011 04:55:43 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Gentoo Linux]]></category>
		<category><![CDATA[Linux (general)]]></category>
		<category><![CDATA[This machine]]></category>

		<guid isPermaLink="false">https://patrick-nagel.net/blog/?p=286</guid>
		<description><![CDATA[I really like the command line mailer Heirloom mailx (formerly nail), and now there is even a current version in portage again (still under the name mail-client/nail, but that doesn&#8217;t matter), so that&#8217;s even better. I use it on all servers, since it&#8217;s just convenient &#8211; it can handle attached files, UTF-8 etc. without any [...]]]></description>
			<content:encoded><![CDATA[<p>I really like the command line mailer <a href="http://heirloom.sourceforge.net/mailx.html">Heirloom mailx (formerly nail)</a>, and now there is even a current version in portage again (still under the name mail-client/nail, but that doesn&#8217;t matter), so that&#8217;s even better. I use it on all servers, since it&#8217;s just convenient &#8211; it can handle attached files, UTF-8 etc. without any problems.</p>
<p>But there was one problem that bothered me for months already: It involved my check_updates.sh script, which basically just calls <code>/usr/bin/emerge -upvDN --nospinner world</code> for the host and all virtual servers, and then sends the output to me.</p>
<p>The problem: emerge&#8217;s output always ended up as &#8216;attachment.bin&#8217;, attached to the (otherwise empty) mail, although I piped it into <code>mail -s "Updates for $DATE" root</code> where it should come out as the mail body. I knew that Heirloom mailx does that, as soon as it doesn&#8217;t &#8220;like&#8221; one of the characters in the input, but I couldn&#8217;t think of a reason why it would do that with emerge&#8217;s supposedly plain-ASCII output.</p>
<p>Today I had enough of it, and fired up hexdump to investigate said &#8216;attachment.bin&#8217;, using the following command:<br />
<code>hexdump -e '1/1 "%03d \n"' attachment.bin | sort -u</code><br />
It outputs the unique decimal values of any byte occurring in &#8216;attachment.bin&#8217; as a sorted list. I expected to find something above 127 &#8211; but the highest occurring value was 122 (&#8220;z&#8221;). I then checked the top part of the list, and to my surprise, found 008 (backspace) there. After removing those by piping the output through <code>tr -d '\010'</code> (8<sub>dec</sub> = 10<sub>oct</sub>, and tr needs octal values), Heirloom mailx no longer put the text into &#8216;attachment.bin&#8217;. It now appears in the mail&#8217;s body, where it belongs.</p>
<p>By the way, those backspaces (when interpreted) change<br />
<tt>Calculating dependencies  ... done!</tt><br />
to<br />
<tt>Calculating dependencies... done!</tt><br />
&#8230; so removing them is not a big loss. I&#8217;d like to know though, why they are there in the first place, even though the output doesn&#8217;t go to a TTY.</p>
]]></content:encoded>
			<wfw:commentRss>https://patrick-nagel.net/blog/archives/286/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Geek-Symbole und Umlaute für G2 mit QWERTY-Tastatur</title>
		<link>https://patrick-nagel.net/blog/archives/251</link>
		<comments>https://patrick-nagel.net/blog/archives/251#comments</comments>
		<pubDate>Thu, 17 Feb 2011 04:56:58 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[German]]></category>

		<guid isPermaLink="false">https://patrick-nagel.net/blog/?p=251</guid>
		<description><![CDATA[Ich habe mir ein neues Telefon zugelegt &#8211; wieder ein Android, nachdem Nokia MeeGo nicht durchzieht, und sich stattdessen zum Microsoft-OEM-Hersteller degradieren lässt&#8230; Da ich viel und häufig Kommandos via SSH tippe, kam wieder nur ein Telefon mit voller Tastatur in Frage, und somit ist meine Smartphone-Historie nun 9300i&#160;→&#160;G1&#160;→&#160;G2. Auf der Tastatur des G2 (auch [...]]]></description>
			<content:encoded><![CDATA[<p>Ich habe mir ein neues Telefon zugelegt &#8211; wieder ein Android, nachdem Nokia MeeGo nicht durchzieht, und sich stattdessen zum Microsoft-OEM-Hersteller degradieren lässt&#8230;<br />
Da ich viel und häufig Kommandos via SSH tippe, kam wieder nur ein Telefon mit voller Tastatur in Frage, und somit ist meine Smartphone-Historie nun 9300i&nbsp;→&nbsp;G1&nbsp;→&nbsp;G2.</p>
<p>Auf der Tastatur des G2 (auch HTC Desire Z oder HTC Vision genannt) lässt es sich sehr gut tippen, doch leider fehlen essentielle Symbole, die jeder der irgendwas in eine Shell eintippen will, oder irgend etwas programmieren will, unbedingt braucht &#8211; beispielsweise geschweifte Klammern ({}), eckige Klammern ([]) und spitze Klammern (<>). Sogar die Pipe (|) fehlt. Ich fasse diese Symbole im Folgenden unter dem Begriff &#8220;Geek-Symbole&#8221; zusammen. Das war auf dem G1 übrigens anders &#8211; es gab dort alle Geek-Symbole, aber da hatte die Tastatur auch eine zusätzliche Tastenreihe.</p>
<p>Weiterhin hat mein G2 eine QWERTY-Tastatur, QWERTZ war hier nicht verfügbar &#8211; damit kann ich zwar über Taste-lang-drücken Umlaute schreiben, jedoch geht das z.B. im Terminal (ConnectBot) nicht, davon abgesehen dass es umständlicher ist als eine direkte Tastenkombination.</p>
<p>Um Problem 1 (fehlende Geek-Symbole) zu beheben, <a href="http://forum.xda-developers.com/showthread.php?t=837002">hat teferi das QWERTY-Layout modifiziert</a> (<strong>Thanks, teferi!</strong>), und dabei auch die Tools und den Prozess den er verwendet hat, zur Verfügung gestellt / beschrieben. Sehr schön, so sollte das immer sein <img src='https://patrick-nagel.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Damit habe ich nun ein Layout gebastelt, das auch Problem 2 (fehlende Möglichkeit Umlaute einzugeben) löst. Nach Installation der Keymap-Datei hat man zusätzlich folgende Symbol-Tastenkombinationen:</p>
<table>
<tr>
<td valign="top" align="left" class="without_border">
<table>
<tr>
<td>\</td>
<td>left-soft</td>
</tr>
<tr>
<td>|</td>
<td>shift left-soft</td>
</tr>
<tr>
<td>`</td>
<td>alt left-soft</td>
</tr>
<tr>
<td>[</td>
<td>middle-soft</td>
</tr>
<tr>
<td>{</td>
<td>shift middle-soft</td>
</tr>
<tr>
<td><</td>
<td>alt middle-soft</td>
</tr>
<tr>
<td>]</td>
<td>right-soft</td>
</tr>
<tr>
<td>}</td>
<td>shift right-soft</td>
</tr>
<tr>
<td>></td>
<td>alt right-soft</td>
</tr>
<tr>
<td>^</td>
<td>alt z</td>
</tr>
</table>
</td>
<td valign="top" align="right" class="without_border">
<table>
<tr>
<td>ä</td>
<td>shift alt a</td>
</tr>
<tr>
<td>ö</td>
<td>shift alt o</td>
</tr>
<tr>
<td>ü</td>
<td>shift alt u</td>
</tr>
<tr>
<td>Ä</td>
<td>shift alt q</td>
<td rowspan="3"><strong>(*)</strong></td>
</tr>
<tr>
<td>Ö</td>
<td>shift alt w</td>
</tr>
<tr>
<td>Ü</td>
<td>shift alt e</td>
</tr>
<tr>
<td>ß</td>
<td>shift alt s</td>
</tr>
</table>
</table>
<p><small><em>(Bekommt man Tabellen in WordPress irgendwie besser hin als mit good old HTML?)</em></small></p>
<p><strong>(*)</strong> <em>Hier ist mir nichts besseres eingefallen, als einfach bei den ersten Buchstaben der Tastatur (Q, W, E) anzufangen &#8211; falls jemandem etwas besseres einfällt &#8211; bin für Vorschläge offen <img src='https://patrick-nagel.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </em></p>
<p>Kurze Anleitung, wie man das Layout auf&#8217;s Telefon bekommt:</p>
<ol>
<li><a href="/misc/2011/g2-keymap-0.3-ger.zip">g2-keymap-0.3-ger.zip herunterladen</a></li>
<li>g2-keymap-0.3.zip auf das Telefon unter /sdcard entpacken</li>
<li>Über &#8216;adb shell&#8217; oder direkt im Terminal auf dem Telefon folgende Kommandos eingeben:
<p>		<code>mount -o remount,rw /system<br />
cp /sdcard/vision-keypad-wwe.kl /system/usr/keylayout/<br />
cp /sdcard/vision-keypad-wwe.kcm.bin /system/usr/keychars/<br />
sync<br />
reboot</code>
	</li>
</ol>
<p><strong>Update (2011-05-23):</strong> Seit ca. CyanogenMod Nightly Build 80 funktionierte mein Keymapping nicht mehr. Ich habe nun herausgefunden, dass Android seit neuestem ein &#8216;-wwe&#8217; im Dateinamen erwartet, also nun <tt>vision-keypad-wwe.kl</tt> und <tt>vision-keypad-wwe.kcm.bin</tt> anstatt wie bisher <tt>vision-keypad.kl</tt> und <tt>vision-keypad.kcm.bin</tt>. Ich habe die Dateien im obigen ZIP-Archiv umbenannt, und nun selbst eine leicht modifizierte Anleitung in den Artikel übernommen, sodass sie für aktuelle Builds funktioniert. Ich habe nicht getestet, ob ältere Builds mit dem &#8216;-wwe&#8217; klarkommen, oder ob man das aus den Dateinamen dann wieder entfernen muss.</p>
]]></content:encoded>
			<wfw:commentRss>https://patrick-nagel.net/blog/archives/251/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sinnfrage</title>
		<link>https://patrick-nagel.net/blog/archives/237</link>
		<comments>https://patrick-nagel.net/blog/archives/237#comments</comments>
		<pubDate>Fri, 03 Dec 2010 14:42:27 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[German]]></category>

		<guid isPermaLink="false">https://patrick-nagel.net/blog/?p=237</guid>
		<description><![CDATA[(English readers: this blog post contains a German translation of an essay by Douglas Rushkoff &#8211; please read the English original.) Über Twitter hat mich ein Link auf einen kurzen Aufsatz von Douglas Rushkoff erreicht, in dem er interessante Gedanken zum Sinn des Lebens in den Raum stellt. Mir hat der Aufsatz sehr gut gefallen, [...]]]></description>
			<content:encoded><![CDATA[<p><em>(English readers: this blog post contains a German translation of <a href="http://blog.imaginaryfoundation.com/blog/11-28-2010/WHAT+DO+YOU+BELIEVE+IS+TRUE+EVEN+THOUGH+YOU+CANNOT+PROVE+IT%3F+-DOUG+RUSHKOFF">an essay</a> by <a href="http://rushkoff.com/">Douglas Rushkoff</a> &#8211; please read <a href="http://blog.imaginaryfoundation.com/blog/11-28-2010/WHAT+DO+YOU+BELIEVE+IS+TRUE+EVEN+THOUGH+YOU+CANNOT+PROVE+IT%3F+-DOUG+RUSHKOFF">the English original</a>.)</em></p>
<p>Über Twitter hat mich ein Link auf einen kurzen Aufsatz von <a href="http://rushkoff.com/">Douglas Rushkoff</a> erreicht, in dem er interessante Gedanken zum Sinn des Lebens in den Raum stellt. Mir hat der Aufsatz sehr gut gefallen, weshalb ich ihn nach bestem Wissen ins Deutsche übersetzt habe:</p>
<blockquote><p>Ich kann es lediglich anekdotenhaft belegen, aber ich glaube, dass die Evolution ein Ziel und eine Richtung hat. Es erscheint offensichtlich, ist jedoch absolut nicht nachweisbar: Materie entwickelt sich in Richtung höherer Komplexität. Obwohl Naturgesetze &#8211; und Zeit an sich &#8211; erfordern, dass Objekte und Lebewesen Langlebigkeit und Nachhaltigkeit zum Überleben erlangen, kommt es mir so vor, als ob das eher ein Mittel zum Zweck, als ein Zweck an sich ist.</p>
<p>Die Theologie kommt recht weit damit, der Materie und Vorgängen eine Bedeutung zuzurechnen, indem sie Leben als &#8220;Materie die in Richtung Gottheit strebt&#8221; beschreibt &#8211; oder als Prozess durch den die Gottheit Materie zu sich zurückholt &#8211; aber Theologen machen immer den Fehler, diese Vorstellung vom Sinn des Lebens an der Vergangenheit festzumachen, anstatt an der Zukunft. Das ist ganz natürlich, da die gedanklichen Strukturen, die wir verwenden um die Welt zu verstehen, dazu neigen, Anfänge, Mittelteile und Enden zu haben. Um den Ausgang der Geschichte erleben zu können, müssen wir ihn eingebaut in den ursprünglichen Plan der Geschehnisse sehen.</p>
<p>Weiterhin ist es für Menschen schwierig damit fertigzuwerden, dass wir mit großer Wahrscheinlichkeit einfach nur überentwickelte Pilze und Bakterien sind, die sich durch eine Galaxie im kalten und bedeutungslosen Weltall bewegen; unsere Existenz könnte unabsichtlich, bedeutungslos und zwecklos sein. Das schließt aber Bedeutung oder Zweck nicht als Ergebnis unserer Interaktion und Zusammenarbeit aus. Bedeutung ist möglicherweise keine Voraussetzung für die Menscheit, sondern vielmehr ein Nebenprodukt dieser.</p>
<p>Deshalb ist es so wichtig, zu erkennen, dass die Evolution in ihrer höchsten Form ein Mannschaftsspiel ist. Darwin behauptet in seinen späteren, weniger bekannteren aber bedeutenderen Werken, dass das Gesetz des Überlebens der bestangepassten Individuen eigentlich nicht auf Individuen anzuwenden ist, sondern auf Gruppen. Genau wie heute postuliert wird, dass Mücken beim Stechen Juckreiz verursachen um bei ihren Opfern schweißtreibende Nervosität auszulösen und somit anderen Stechmücken die Ortung erleichtern, so sind größere Sprünge in der Entwicklung der Menschheit &#8211; von Clanbildung bis zum Städtebau &#8211; Erträge der Zusammenarbeit. Eine größere Überlebenschance ist genauso ein glücklicher Nebeneffekt guter Zusammenarbeit, wie sie ein Zweck ist.</p>
<p>Könnten wir aufhören, Sinn und Zweck als Schöpfungen irgendwelcher Gottheiten aufzufassen, und stattdessen als Ergebnis unserer eigenen kreativen Zukunft zu sehen, würden sie zu Zielen, Absichten und Vorgängen werden, die tatsächlich erreichbar sind &#8211; an Stelle von Schatten einer kindlichen, abergläubischen Mythologie.</p>
<p>Ein Beweis ist unmöglich, da er selbst zur Entwicklung beiträgt. So wie der Versuch den Horizont zu erreichen lediglich Weiterreisen erforderlich macht.
</p></blockquote>
<p>(falls jemand Verbesserungsvorschläge zur Übersetzung hat, nur her damit <img src='https://patrick-nagel.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
]]></content:encoded>
			<wfw:commentRss>https://patrick-nagel.net/blog/archives/237/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

