<?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>Duckulas Notes</title>
	<atom:link href="http://www.stresser.de/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stresser.de/blog</link>
	<description>News, Notes, Ideas, the usual madness ...</description>
	<lastBuildDate>Tue, 27 Jul 2010 18:14:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Ziegenkäse mit Bacon</title>
		<link>http://www.stresser.de/blog/2010/07/27/ziegenkase-mit-bacon/</link>
		<comments>http://www.stresser.de/blog/2010/07/27/ziegenkase-mit-bacon/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 18:07:29 +0000</pubDate>
		<dc:creator>Duckula</dc:creator>
				<category><![CDATA[Essen]]></category>

		<guid isPermaLink="false">http://www.stresser.de/blog/?p=26</guid>
		<description><![CDATA[Ein leckerer und schneller Snack z.B. zum Salat.

Zut [...]]]></description>
			<content:encoded><![CDATA[<p>Ein leckerer und schneller Snack z.B. zum Salat.</p>
<p>Zutaten: Ziegenkäse, Frühstücksbacon und je nach Geschmack Trockenfrüchte (Pflaumen/Datteln) und Basilikum. (Gibt&#8217;s alles z.B. bei Netto)</p>
<p><a href="http://www.stresser.de/blog/wp-content/uploads/2010/07/CIMG4453.jpg"><img class="alignnone size-medium wp-image-27" title="CIMG4453" src="http://www.stresser.de/blog/wp-content/uploads/2010/07/CIMG4453-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Den Ziegenkäse (und evtl. Trockenfrüchte/Basilikum) einfach in den Bacon einwickeln und ohne zusätzliches Fett in die Pfanne.</p>
<p><a href="http://www.stresser.de/blog/wp-content/uploads/2010/07/CIMG4454.jpg"><img class="alignnone size-medium wp-image-28" title="CIMG4454" src="http://www.stresser.de/blog/wp-content/uploads/2010/07/CIMG4454-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Von allen Seiten gleichmäßig anbraten und voila:</p>
<p><a href="http://www.stresser.de/blog/wp-content/uploads/2010/07/CIMG4455.jpg"><img class="alignnone size-medium wp-image-29" title="CIMG4455" src="http://www.stresser.de/blog/wp-content/uploads/2010/07/CIMG4455-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>&#8216;n Guten.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stresser.de/blog/2010/07/27/ziegenkase-mit-bacon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash Script with Inetd</title>
		<link>http://www.stresser.de/blog/2010/04/23/bash-script-with-inetd/</link>
		<comments>http://www.stresser.de/blog/2010/04/23/bash-script-with-inetd/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 16:16:45 +0000</pubDate>
		<dc:creator>Duckula</dc:creator>
				<category><![CDATA[Kleine Probleme]]></category>

		<guid isPermaLink="false">http://www.stresser.de/blog/?p=21</guid>
		<description><![CDATA[Okay, the following Solution is out there somewhere. Bu [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, the following Solution is out there somewhere. But since it took me some time to Google it I thought i summarize it.</p>
<p>Following Problem:</p>
<p>I have a Linux System on which I want to execute a BASH Script over Telnet. So I used the help of the Inetd Service.</p>
<p>First I declared my own Service in /etc/services by adding the following line:</p>
<pre># Local services
myservice         4321/tcp
</pre>
<p>Then I make my Script known to inetd by adding the following Line to /etc/inetd.conf</p>
<pre>myservice stream tcp nowait root /home/me/script.sh</pre>
<p>and restart the service.</p>
<p>&#8216;Til here it&#8217;s simple. But now comes the catch you will experience when you execute your script over the telnet connection. Since you&#8217;re not in a terminal enviroment, in which you&#8217;re when you use telnetd or sshd, there&#8217;s a different handling of Line endings. In a normal Unix Terminal a line end is represented by a simple \n aka. LF (Line Feed) aka 0x0A. But in TCP, as it&#8217;s used when you use inetd \r\n aka CR LF (Carriage Return, Line Feed) aka 0x0d 0x0a is used.</p>
<p>So what happens, is that if you read input into a variable the string is parsed until a \n occurs. So the \r is still in your string and fucks up most of your commands using this string. There are at least 2 Methods to get rid of this. The one i prefer is this one:</p>
<pre>
<pre>read foo
foo=`echo $foo | tr -d '\r'`
</pre>
</pre>
<p>Which just kills all the \r in the string. It also enables you to use the script in terminal and non-terminal enviroments.  Second method would be to just cut off the last char. By which the Script becomes unusable in the normal shell.</p>
<pre>read foo
<pre>foo=${foo:0:${#foo}-1}
</pre>
</pre>
<p>In the output direction you&#8217;ll notice another effect of this behaviour. Since there is a \r expected where none is send you&#8217;ll experience this nice stair effect. So you have to replace the \n in all your output with \r\n to get this right. Most telnet clients like Putty on Windows have an option (Terminal -&gt; &#8220;Implicit CR on LF&#8221;) to do this automatically. It&#8217;s  your choice how you solve this.</p>
<p>Please Leave a comment if this was of any use to you.</p>
<p>Sources:</p>
<p>Bash Webserver using Inetd &#8211; <a href="http://www.debian-administration.org/article/A_web_server_in_a_shell_script">http://www.debian-administration.org/article/A_web_server_in_a_shell_script</a></p>
<p>Discussion Thread with most of the solution &#8211; <a href="http://www.mail-archive.com/debian-user-german@lists.debian.org/msg41768.html">http://www.mail-archive.com/debian-user-german@lists.debian.org/msg41768.html</a></p>
<p>Another Thread on the Topic &#8211; <a href="http://unix.derkeiler.com/Newsgroups/comp.unix.shell/2003-08/1337.html">http://unix.derkeiler.com/Newsgroups/comp.unix.shell/2003-08/1337.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stresser.de/blog/2010/04/23/bash-script-with-inetd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache: WebDAV hinter mod_proxy mit OS X 10.5.5 nutzen</title>
		<link>http://www.stresser.de/blog/2008/12/04/apache-webdav-hinter-mod_proxy-mit-os-x-1055-nutzen/</link>
		<comments>http://www.stresser.de/blog/2008/12/04/apache-webdav-hinter-mod_proxy-mit-os-x-1055-nutzen/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 19:34:01 +0000</pubDate>
		<dc:creator>Duckula</dc:creator>
				<category><![CDATA[Kleine Probleme]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mod_proxy]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[webdav]]></category>

		<guid isPermaLink="false">http://www.stresser.de/blog/?p=13</guid>
		<description><![CDATA[Folgendes Szenario:
Apache (v2.2.8) mit mod_dav hinter [...]]]></description>
			<content:encoded><![CDATA[<p>Folgendes Szenario:<br />
Apache (v2.2.8) mit mod_dav hinter einem weiteren Apache mit mod_proxy. Bisher klappte der Schreibzugriff problemlos. Mit Mac OS X 10.5.5 tritt aber nun das Problem auf, dass alle hochgeladenen Dateien 0 Byte haben. </p>
<p>Das Log des WebDAV Server sagte dazu nichts. Im Proxy allerdings tauchten folgende Zeilen auf:<br />
<code><br />
[error] proxy: Chunked Transfer-Encoding is not supported<br />
[error] [client 123.123.123.123] Handler for proxy-server returned invalid result code 22<br />
</code></p>
<p>Nach längerer Google Suche bin ich nun auf diese Seite gestoßen: <a href="http://www.atnan.com/2008/10/16/memory-issues-with-nsmutableurlrequest-s-sethttpbody-method-in-iphoneos-2-1">http://www.atnan.com/2008/10/16/memory-issues-with-nsmutableurlrequest-s-sethttpbody-method-in-iphoneos-2-1</a>.  Auch wenn es da ums iPhone geht scheint das Problem das gleiche zu sein.</p>
<p>Große Dateien (Tritt aber auch schon bei 12k auf) werden auf sog. Chunks aufgeteilt. Dies wird im Header der http Pakete entsprechend gekennzeichnet. Anscheinend machen das die meisten Clients mit dem schlüsselwort &#8220;chunked&#8221;, Apple macht dies aber durch das Wort &#8220;Chunked&#8221;. (Man beachte die Groß-/Kleinschreibung). mod_proxy scheint im Gegensatz zu den meisten WebDAV Servern damit überfordert zu sein.</p>
<p>Die Lösung brachte nun die folgende Zeile in der Config des mod_proxy Hosts:<br />
<code><br />
RequestHeader edit Transfer-Encoding Chunked chunked early<br />
</code><br />
mod_proxy bekommt nun das Encoding als &#8220;chunked&#8221; und alles ist gut.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stresser.de/blog/2008/12/04/apache-webdav-hinter-mod_proxy-mit-os-x-1055-nutzen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GoogleMail über POP3 auf mehreren Rechnern</title>
		<link>http://www.stresser.de/blog/2008/09/20/googlemail-uber-pop3-auf-mehreren-rechnern/</link>
		<comments>http://www.stresser.de/blog/2008/09/20/googlemail-uber-pop3-auf-mehreren-rechnern/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 15:37:02 +0000</pubDate>
		<dc:creator>Duckula</dc:creator>
				<category><![CDATA[Kleine Probleme]]></category>

		<guid isPermaLink="false">http://www.stresser.de/blog/?p=3</guid>
		<description><![CDATA[Ein Bekannter hatte neulich ein Problem mit seinen Mail [...]]]></description>
			<content:encoded><![CDATA[<p>Ein Bekannter hatte neulich ein Problem mit seinen Mails bei GMail. Wenn man diese mit mehreren Rechner über POP3 abrufen will tauchen neue Mails immer nur auf dem Rechner der auf der zuerst abruft. Ich hatte zunächst auf eine komische Arbeitsweise im Mailclient getippt. Nach ein wenig Googeln bin ich aber dann auf die Lösung in der <a href="http://mail.google.com/support/bin/answer.py?hl=de&amp;answer=47948">GMail-FAQ</a> gestoßen.</p>
<p>Es werden bei GMail über POP3 also im Normalfall nur die neuen Mails angeboten. Will man diese mit mehreren Clients Mails abrufen muss der Nutzername folgendermaßen aussehen: <code>recent:nutzername@googlemail.com</code></p>
<p>Dadurch werden die Mails der letzten 30 Tage dem Client angeboten und dieser entscheidet welche Mails er herunterläd, also das sonst normale Verhalten. Man muss natürlich seinem Client dann auch noch sagen dass er die Mails auf dem Server belässt.</p>
<p>Ob dieses Verhalten rfc-konform ist wage ich zu bezweifeln, macht aber bei der möglichen Größe von GMail-Postfächern durchaus Sinn.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stresser.de/blog/2008/09/20/googlemail-uber-pop3-auf-mehreren-rechnern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
