<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>loopkid: Category English</title>
    <link>http://loopkid.net/articles/category/english</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>i like macs * i like sweden * i like milk</description>
    <item>
      <title>delete thunderbird archives folder</title>
      <description>&lt;p&gt;&lt;img src="/files/thunderbird-delete-folder.png" class="alignright"/&gt; I just upgraded to Thunderbird 3. Things seem to be a little speedier now, which feels quite nice. The only pitfall i experienced was the new archive feature. I tried it out, just to see what happens. Just for the record, I am using the IMAP protocol for managing my mails. So I selected a mail and pressed a to archive it. Thunderbird created an Archives folder with a subfolder named after the year of the mail. Okay, I thought, this is nice but not so exciting since I don&amp;#8217;t want to decide on every mail if I want to keep it or not. So I thought I&amp;#8217;d delete the Archives folder and just ignore the feature. Since I was too lazy to reach my keyboard I wanted to do it via the context menu. On every regular folder you have an option in the context menu to delete it (see screenshot). Unfortunately this menu item is missing in the context menu of the Archives folder. Most likely because the Thunderbird developers fear that the average joe might unintentionally delete all the mails in his precious archive. Okay, here are the good news. They weren&amp;#8217;t consequent. After about a half an hour of unnecessary fiddling around I found a convingly simple solution. If you reach for you keyboard you can simply press backspace or delete and Thunderbird will ask you to verify the deletion of Archives. Boohay! After deletion, the folder stays gone as long as you don&amp;#8217;t use the archive function. I hope they don&amp;#8217;t fix this &amp;#8220;bug&amp;#8221;, meaning I hope they don&amp;#8217;t remove the ability to delete the Archives folder via keyboard. By the way, is there any common word in english or german for property of a program which the developer sees as a bug, but the user as a feature? I mean there certainly must be a word for the opposite, meaning an official feature which feels more like a bug to the user, but I don&amp;#8217;t remember it.&lt;/p&gt;</description>
      <pubDate>Tue, 15 Dec 2009 02:10:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:67ba80e8-7fbd-4b8f-96a4-88cbbc146e3b</guid>
      <author>Stefan</author>
      <link>http://loopkid.net/articles/2009/12/15/delete-thunderbird-archives-folder</link>
      <category>English</category>
      <category>Mac OS X</category>
      <category>Thunderbird</category>
      <trackback:ping>http://loopkid.net/articles/trackback/111758</trackback:ping>
    </item>
    <item>
      <title>bad request to google cache</title>
      <description>&lt;p&gt;&lt;img src="/files/bad-request.png" alt="Bad Request"/&gt;&lt;/p&gt;

&lt;p&gt;Those who use Safari 3 on Mac OX 10.5 Leopard might have experienced problems when using the cache functionality of the Google search. After some weeks of Safari usage suddenly all Google cache pages lead to the following error message.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Bad Request - Your client has issued a malformed or illegal request.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Clearing Safaris cache doesn&amp;#8217;t help. Searching for google in the cookie list and deleting all hits doesn&amp;#8217;t help. What does help is deleting all cookies. This of course is a very cumbersome solution since now you have to login again on all your websites and you lose all your preferences. To avoid this you can simply delete all cookie list entries corresponding to the ip adress displayed in the address bar when looking at the google cache error page. Be careful to press &lt;em&gt;Remove&lt;/em&gt; and not &lt;em&gt;Remove all&lt;/em&gt; since the latter wipes out all cookies even those that are not marked. So in my case I&amp;#8217;d simply search for &lt;code&gt;209.85.129.132&lt;/code&gt; and delete all hits.&lt;/p&gt;

&lt;p&gt;&lt;img src="/files/google-cookies.png" alt="Google Cache Cookies"/&gt;&lt;/p&gt;

&lt;p&gt;Booyah, this solves the problem!&lt;/p&gt;</description>
      <pubDate>Fri, 19 Jun 2009 23:37:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:5f184ca7-018d-41a0-88df-6a1e3d978f8c</guid>
      <author>Stefan</author>
      <link>http://loopkid.net/articles/2009/06/19/bad-request-to-google-cache</link>
      <category>Browser</category>
      <category>English</category>
      <category>Mac OS X</category>
      <trackback:ping>http://loopkid.net/articles/trackback/56252</trackback:ping>
    </item>
    <item>
      <title>songbird needs a cd ripper</title>
      <description>&lt;blockquote&gt;
    &lt;p&gt;I have a collection of about 800 CDs which I will eventually be ripping into a lossless format, as laptop harddisks reach a reasonable size. Currently I usually buy 5 CDs a month which I rip into my iTunes. I prefer buying CDs over buying MP3/AAC-Downloads, as they provide better value for the money from my point of view. Songbird would definitely need this feature for me to switch over, as I want an integrated solution for ripping.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you also share the opinion, that &lt;a href="http://www.getsongbird.com/"&gt;Songbird&lt;/a&gt; should have an integrated cd ripper, than you should &lt;a href="http://getsatisfaction.com/songbird/topics/cd_ripping_burning_can_songbird_do_it_yet"&gt;tell the songbird folks&lt;/a&gt;. It seems they actually read the stuff that&amp;#8217;s written there. It&amp;#8217;s probably best to reply directly to Rob Lord&amp;#8217;s comment, as he will probably be notified if his comment receives replies. If you have further suggestitions on the implementation you can &lt;a href="http://bugzilla.songbirdnest.com/show_bug.cgi?id=6743"&gt;write a comment&lt;/a&gt; on the bug tracker.&lt;/p&gt;</description>
      <pubDate>Sun, 15 Mar 2009 12:40:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:f6e38706-4e03-402a-93e7-2ac00de48217</guid>
      <author>Stefan</author>
      <link>http://loopkid.net/articles/2009/03/15/songbird-needs-a-cd-ripper</link>
      <category>English</category>
      <category>Musik</category>
      <trackback:ping>http://loopkid.net/articles/trackback/38836</trackback:ping>
    </item>
    <item>
      <title>quote of the day</title>
      <description>&lt;blockquote&gt;
    &lt;p&gt;The purpose of Ruby is to maximize programming pleasure (Matz)&lt;/p&gt;
&lt;/blockquote&gt;</description>
      <pubDate>Sun, 22 Feb 2009 00:14:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:26dcbf1b-277b-4448-863d-ddfecdd6b09d</guid>
      <author>Stefan</author>
      <link>http://loopkid.net/articles/2009/02/22/quote-of-the-day</link>
      <category>Softwareentwicklung</category>
      <category>English</category>
      <category>Ruby</category>
      <trackback:ping>http://loopkid.net/articles/trackback/33610</trackback:ping>
    </item>
    <item>
      <title>remove extra spacing in thunderbird</title>
      <description>&lt;p&gt;Thunderbird displays nasty extra spacing above and below quotes in the compose window. This lures the author into thinking his mail is nicely spaced, but in reality it isn&amp;#8217;t. What looks nice on the senders side looks totally cramped on the recipients side.&lt;/p&gt;

&lt;p&gt;Here is a simple demonstration.&lt;/p&gt;

&lt;p&gt;The compose window normally looks like this.&lt;/p&gt;

&lt;p&gt;&lt;img src="/files/thunderbird-quote-with-extra-spacing-compose.png" alt="Alt text"/&gt;&lt;/p&gt;

&lt;p&gt;There are no blank lines inserted whatsoever, the spacing comes solely from Thunderbirds misleading stylesheet. The awful awakening comes, when recipient of the mail opens it in his mail client.&lt;/p&gt;

&lt;p&gt;&lt;img src="/files/thunderbird-quote-with-extra-spacing-read-tb.png" alt="Alt text"/&gt;&lt;/p&gt;

&lt;p&gt;Pretty ugly, huh? Okay if you think this is bad, then take a look at how it looks in a webmailer.&lt;/p&gt;

&lt;p&gt;&lt;img src="/files/thunderbird-quote-with-extra-spacing-read-web.png" alt="Alt text"/&gt;&lt;/p&gt;

&lt;p&gt;Illegible! Terrible! No one wants to read mails that look like that. Now let&amp;#8217;s apply a little patch. The compose window without blank lines now looks like this.&lt;/p&gt;

&lt;p&gt;&lt;img src="/files/thunderbird-quote-without-extra-spacing-compose.png" alt="Alt text"/&gt;&lt;/p&gt;

&lt;p&gt;Looks bad? Great, that&amp;#8217;s what it&amp;#8217;s supposed to! What you see there is a much more realistic preview of the mail. This ugly looking mail now drives you into inserting blank lines which is exactly what you should be doing. After inserting the blank lines the compose window looks like this.&lt;/p&gt;

&lt;p&gt;&lt;img src="/files/thunderbird-quote-without-extra-spacing-blank-lines-compose.png" alt="Alt text"/&gt;&lt;/p&gt;

&lt;p&gt;The recipient now sees this.&lt;/p&gt;

&lt;p&gt;&lt;img src="/files/thunderbird-quote-without-extra-spacing-read-tb.png" alt="Alt text"/&gt;&lt;/p&gt;

&lt;p&gt;Much better! Reading is no longer a pain. Now see how the webmailer displays the mail.&lt;/p&gt;

&lt;p&gt;&lt;img src="/files/thunderbird-quote-without-extra-spacing-read-web.png" alt="Alt text"/&gt;&lt;/p&gt;

&lt;p&gt;Wonderful! Beautiful! The way it always should have been. No more ugly illegible mails!&lt;/p&gt;

&lt;p&gt;To remove the nasty extra spacing above and below quotes in Thunderbird&amp;#8217;s compose window just insert the following snippet into your &lt;a href="http://www.mozilla.org/support/thunderbird/edit#content"&gt;userContent.css&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;blockquote[type=cite] {
margin-top: 0 !important;
margin-bottom: 0 !important;
}

blockquote pre {
margin-top: 0 !important;
margin-bottom: 0 !important;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For more &lt;a href="http://forums.mozillazine.org/viewtopic.php?f=28&amp;amp;t=339642"&gt;background information&lt;/a&gt; read the posting on Mozillazine. Interestingly this problem persists since at least five years but no one in the Mozilla team has seemed to care about fixing it.&lt;/p&gt;</description>
      <pubDate>Mon, 05 Jan 2009 02:22:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:30d07e16-6302-43e3-a685-634556e35093</guid>
      <author>Stefan</author>
      <link>http://loopkid.net/articles/2009/01/05/remove-extra-spacing-in-thunderbird</link>
      <category>English</category>
      <category>Mail</category>
      <trackback:ping>http://loopkid.net/articles/trackback/25793</trackback:ping>
    </item>
    <item>
      <title>ruby 1.9 utf-8 mostly works</title>
      <description>&lt;p&gt;I was curious to see how far the implementation of utf-8 in Ruby 1.9 has developed. First we assign a pure Ascii string and check it&amp;#8217;s encoding.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; a = "Restaurant"
=&amp;gt; "Restaurant"
&amp;gt;&amp;gt; a.encoding
=&amp;gt; #&amp;lt;Encoding:US-ASCII&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Okay, nothing spectacular so far. Next we take a Unicode string.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; b = "Café"
=&amp;gt; "Café"
&amp;gt;&amp;gt; b.encoding
=&amp;gt; #&amp;lt;Encoding:UTF-8&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Looking great, now let&amp;#8217;s work with that string.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; b.each_byte {|byte| puts byte}
67
97
102
195
169
=&amp;gt; "Café"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here we see the utf-8 encoded é as two bytes.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; b.each_char {|char| puts char}
C
a
f
é
=&amp;gt; "Café"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Works as expected.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; b.size
=&amp;gt; 4
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In Ruby 1.8 this would have returned 5.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; b.reverse
=&amp;gt; "éfaC"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In Ruby 1.8 this would have generated a broken character at the start.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; b.chop
=&amp;gt; "Caf"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In Ruby 1.8 this would have generated a broken character at the end.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; b.upcase
=&amp;gt; "CAFé"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is where work is still needed! In Ruby 1.8 there is Nikolai Weibull&amp;#8217;s &lt;a href="http://bitwi.se/software/ruby/character-encodings/"&gt;Ruby Character Encodings Library&lt;/a&gt; that does the job.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; require 'encoding/character/utf-8'
=&amp;gt; true
&amp;gt;&amp;gt; b = "Café"
=&amp;gt; "Caf\303\251"
&amp;gt;&amp;gt; b.length
=&amp;gt; 5
&amp;gt;&amp;gt; b = u"Café"
=&amp;gt; u"Caf\303\251"
&amp;gt;&amp;gt; b.length
=&amp;gt; 4
&amp;gt;&amp;gt; b = +"Café" 
=&amp;gt; u"Caf\303\251"
&amp;gt;&amp;gt; b.length 
=&amp;gt; 4
&amp;gt;&amp;gt; puts b.upcase
CAFÉ
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The library however is &lt;a href="http://rubyforge.org/tracker/index.php?func=detail&amp;amp;aid=21150&amp;amp;group_id=1982&amp;amp;atid=7741"&gt;not compatible&lt;/a&gt; with Ruby 1.9. Another outstanding issue is the sorting of arrays containing Unicode strings.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; a = %w[ä a b c]
=&amp;gt; ["ä", "a", "b", "c"]
&amp;gt;&amp;gt; a.sort
=&amp;gt; ["a", "b", "c", "ä"]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The result would be okay, if I wanted swedish sorting order, but what if I wanted german sorting order? This needs to be addressed. There are libraries for this in Java, so Ruby shouldn&amp;#8217;t stand behind!&lt;/p&gt;</description>
      <pubDate>Mon, 07 Jul 2008 21:40:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:b09c8f6a-3bc4-4199-93ad-86d2097786ce</guid>
      <author>Stefan</author>
      <link>http://loopkid.net/articles/2008/07/07/ruby-1-9-utf-8-mostly-works</link>
      <category>English</category>
      <category>Ruby</category>
      <trackback:ping>http://loopkid.net/articles/trackback/8576</trackback:ping>
    </item>
    <item>
      <title>conciseness vs. readability</title>
      <description>&lt;p&gt;To print the contents of all files passed as arguments or in case of no arguments print the contents of stdin you could write&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;puts *ARGF
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;but isn&amp;#8217;t&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;if ARGV.empty?
  puts $stdin.readlines
else
  ARGV.each do |filename|
    puts File.readlines(filename)
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;much more readable?&lt;/p&gt;</description>
      <pubDate>Tue, 01 Jul 2008 03:21:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:4efe33e5-3818-402c-bc07-0189df6c3213</guid>
      <author>Stefan</author>
      <link>http://loopkid.net/articles/2008/07/01/conciseness-vs-readability</link>
      <category>English</category>
      <category>Ruby</category>
      <trackback:ping>http://loopkid.net/articles/trackback/8472</trackback:ping>
    </item>
    <item>
      <title>read file with one line of code</title>
      <description>&lt;p&gt;There are probably at least a have a dozen ways to print the contents of a file in Ruby, here I will present four ways of doing it.&lt;/p&gt;

&lt;p&gt;The first method is rather verbose. Assign a file object and iterate on the file object with the &lt;code&gt;each_line&lt;/code&gt; method and then close the file.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;f = open('file.txt')
f.each_line do |line|
  puts line
end
f.close
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The second method still assigns a file object, but then uses the more compact &lt;code&gt;readlines&lt;/code&gt; instance method and closes the file.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;f = open('file.txt')
puts f.readlines
f.close
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The third method uses block form to access the file and automatically close it.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;open('file.txt') { |f| puts f.readlines }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The fourth method calls the class method &lt;code&gt;readlines&lt;/code&gt; to wrap it all up in one statement.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;puts File.readlines('file.txt')
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Tue, 01 Jul 2008 01:58:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:760b092c-1d98-4618-b7fa-cea31ac3ff8f</guid>
      <author>Stefan</author>
      <link>http://loopkid.net/articles/2008/07/01/read-file-with-one-line-of-code</link>
      <category>English</category>
      <category>Ruby</category>
      <trackback:ping>http://loopkid.net/articles/trackback/8471</trackback:ping>
    </item>
    <item>
      <title>the beauty of ruby 1.9</title>
      <description>&lt;p&gt;Let&amp;#8217;s say we have a string and three arrays&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;string = "672"
java = []
ruby18 = []
ruby19 = []
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now you want to convert the string to an array of integers. If you were writing Ruby in javastyle you would probably write something like&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;i=0
digits = string.split(//)
while i &amp;lt; digits.size do
  java &amp;lt;&amp;lt; digits[i].to_i
  i+=1
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;but since we&amp;#8217;re we&amp;#8217;re doing Ruby in rubystyle it looks more like&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;string.split(//).each { |digit| ruby18 &amp;lt;&amp;lt; digit.to_i }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;which looks &lt;em&gt;much&lt;/em&gt; nicer, but still not quite right, but with Ruby 1.9&amp;#8217;s &lt;a href="http://www.ruby-doc.org/core/classes/String.html#M000777"&gt;&lt;code&gt;chars&lt;/code&gt;&lt;/a&gt; interator it gets even better.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;string.chars { |digit| ruby19 &amp;lt;&amp;lt; digit.to_i }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Goes down like butter, doesn&amp;#8217;t it? Isn&amp;#8217;t that how it always should have been? And the good thing is, there is lots of this good stuff in Ruby 1.9. Maybe in Ruby 2.0 there will even be a &lt;code&gt;to_i&lt;/code&gt; method in the array class, but now I&amp;#8217;m getting carried away.&lt;/p&gt;</description>
      <pubDate>Sat, 28 Jun 2008 12:11:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:f8db2c61-51ea-4fa3-9032-29377f0ed221</guid>
      <author>Stefan</author>
      <link>http://loopkid.net/articles/2008/06/28/the-beauty-of-ruby-1-9</link>
      <category>English</category>
      <category>Ruby</category>
      <trackback:ping>http://loopkid.net/articles/trackback/8426</trackback:ping>
    </item>
    <item>
      <title>beautiful network monitoring</title>
      <description>&lt;p&gt;Monitoring networks with &lt;a href="http://www.tcpdump.org/"&gt;tcpdump&lt;/a&gt; works fine, but even in quiet mode tcpdump outputs too much information if you&amp;#8217;re interested in application layer protocols like HTTP or IMAP. A nice alternative on the command line is &lt;a href="http://ngrep.sourceforge.net/"&gt;ngrep&lt;/a&gt; which has a much more readable output. ngrep filters all tcp packets with an empty data part and strips the header of non-empty tcp packets. The only beauty flaw in my eyes is the dot ngrep inserts for every tab and for every carriage return. In my opinion it should offer an option to specify the tabulator size and just ignore the carriage returns.&lt;/p&gt;

&lt;p&gt;But see for yourself, here the tcpdump output of an IMAP session,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo tcpdump -i en1 -A -s 0 -qtn port imap
tcpdump: verbose output suppressed,
use -v or -vv for full protocol decode
listening on en1, link-type EN10MB (Ethernet),
capture size 65535 bytes
IP 192.168.2.22.50556 &amp;gt; 80.237.145.78.143: tcp 0
E..@..@.@.......P..N.|...7.n........Go.............
/!..........
IP 80.237.145.78.143 &amp;gt; 192.168.2.22.50556: tcp 0
E..&amp;lt;..@.9...P..N.......|.....7.o...............
w.A./!......
IP 192.168.2.22.50556 &amp;gt; 80.237.145.78.143: tcp 0
E..4..@.@.......P..N.|...7.o...............
/!..w.A.
IP 80.237.145.78.143 &amp;gt; 192.168.2.22.50556: tcp 21
E..I..@.9...P..N.......|.....7.o...........
w.A./!..* OK Dovecot ready.

IP 192.168.2.22.50556 &amp;gt; 80.237.145.78.143: tcp 0
E..4.P@.@..j....P..N.|...7.o...............
/!..w.A.
IP 192.168.2.22.50556 &amp;gt; 80.237.145.78.143: tcp 33
E..U.8@.@..`....P..N.|...7.o...............
/!.2w.A.1 LOGIN foo@bar.net password

IP 80.237.145.78.143 &amp;gt; 192.168.2.22.50556: tcp 0
E..4..@.9...P..N.......|.....7.......&amp;lt;.....
w.F'/!.2
IP 80.237.145.78.143 &amp;gt; 192.168.2.22.50556: tcp 17
E..E..@.9...P..N.......|.....7......c......
w.F./!.21 OK Logged in.

IP 192.168.2.22.50556 &amp;gt; 80.237.145.78.143: tcp 0
E..4.0@.@.......P..N.|...7.....?.....D.....
/!.&amp;gt;w.F.
IP 192.168.2.22.50556 &amp;gt; 80.237.145.78.143: tcp 14
E..B.#@.@.......P..N.|...7.....?...........
/!.cw.F.1 LIST """%"

IP 80.237.145.78.143 &amp;gt; 192.168.2.22.50556: tcp 0
E..4..@.9...P..N.......|...?.7.............
w.H./!.c
IP 80.237.145.78.143 &amp;gt; 192.168.2.22.50556: tcp 513
E..5..@.9...P..N.......|...?.7.............
w.H./!.c* LIST (\HasChildren) "." "Trash"
* LIST (\HasNoChildren) "." "Sent"
* LIST (\HasNoChildren) "." "Spam"
* LIST (\HasNoChildren) "." "Sent Messages"
* LIST (\HasNoChildren) "." "Drafts"
* LIST (\HasNoChildren) "." "Spamtraining"
* LIST (\HasNoChildren) "." "Hamtraining"
* LIST (\HasNoChildren) "." "Spamtesting"
* LIST (\HasNoChildren) "." "Hamtesting"
* LIST (\HasNoChildren) "." "Deleted Messages"
* LIST (\HasNoChildren) "." "Spamverdacht"
* LIST (\HasNoChildren) "." "INBOX"
1 OK List completed.

IP 192.168.2.22.50556 &amp;gt; 80.237.145.78.143: tcp 0
E..4]'@.@.8.....P..N.|...7.....@...........
/!.cw.H.
IP 192.168.2.22.50556 &amp;gt; 80.237.145.78.143: tcp 10
E..&amp;gt;.L@.@..c....P..N.|...7.....@.....N.....
/!..w.H.1 LOGOUT

IP 80.237.145.78.143 &amp;gt; 192.168.2.22.50556: tcp 19
E..G..@.9...P..N.......|...@.7.............
w.IP/!..* BYE Logging out

IP 192.168.2.22.50556 &amp;gt; 80.237.145.78.143: tcp 0
E..4.I@.@..p....P..N.|...7.....S.....%.....
/!..w.IP
IP 80.237.145.78.143 &amp;gt; 192.168.2.22.50556: tcp 24
E..L..@.9...P..N.......|...S.7.............
w.IP/!..1 OK Logout completed.

IP 192.168.2.22.50556 &amp;gt; 80.237.145.78.143: tcp 0
E..4C#@.@.R.....P..N.|...7.....l...........
/!..w.IP
IP 192.168.2.22.50556 &amp;gt; 80.237.145.78.143: tcp 0
E..4.;@.@.......P..N.|...7.....l...........
/!..w.IP
IP 80.237.145.78.143 &amp;gt; 192.168.2.22.50556: tcp 0
E..4..@.9...P..N.......|...l.7.......j.....
w.IQ/!..

20 packets captured
28 packets received by filter
0 packets dropped by kernel
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;compared with the corresponding ngrep output.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo ngrep -d en1 -W byline port imap
interface: en1 (192.168.2.0/255.255.255.0)
filter: (ip) and ( port imap )
####
T 80.237.145.78:143 -&amp;gt; 192.168.2.22:50556 [AP]
* OK Dovecot ready..

##
T 192.168.2.22:50556 -&amp;gt; 80.237.145.78:143 [AP]
1 LOGIN foo@bar.net password.

##
T 80.237.145.78:143 -&amp;gt; 192.168.2.22:50556 [AP]
1 OK Logged in..

##
T 192.168.2.22:50556 -&amp;gt; 80.237.145.78:143 [AP]
1 LIST """%".

##
T 80.237.145.78:143 -&amp;gt; 192.168.2.22:50556 [AP]
* LIST (\HasChildren) "." "Trash".
* LIST (\HasNoChildren) "." "Sent".
* LIST (\HasNoChildren) "." "Spam".
* LIST (\HasNoChildren) "." "Sent Messages".
* LIST (\HasNoChildren) "." "Drafts".
* LIST (\HasNoChildren) "." "Spamtraining".
* LIST (\HasNoChildren) "." "Hamtraining".
* LIST (\HasNoChildren) "." "Spamtesting".
* LIST (\HasNoChildren) "." "Hamtesting".
* LIST (\HasNoChildren) "." "Deleted Messages".
* LIST (\HasNoChildren) "." "Spamverdacht".
* LIST (\HasNoChildren) "." "INBOX".
1 OK List completed..

##
T 192.168.2.22:50556 -&amp;gt; 80.237.145.78:143 [AP]
1 LOGOUT.

#
T 80.237.145.78:143 -&amp;gt; 192.168.2.22:50556 [AP]
* BYE Logging out.

##
T 80.237.145.78:143 -&amp;gt; 192.168.2.22:50556 [AFP]
1 OK Logout completed..

28 received, 0 dropped
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Fri, 27 Jun 2008 17:10:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:5b8805e4-8fbb-448a-80a6-cc5b9e934bf1</guid>
      <author>Stefan</author>
      <link>http://loopkid.net/articles/2008/06/27/beautiful-network-monitoring</link>
      <category>English</category>
      <category>Mac OS X</category>
      <category>Linux</category>
      <trackback:ping>http://loopkid.net/articles/trackback/8419</trackback:ping>
    </item>
  </channel>
</rss>
