<?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>kill-9.it &#187; Geek</title>
	<atom:link href="http://www.kill-9.it/blog/index.php/category/geek/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kill-9.it/blog</link>
	<description>Coffee for the mind, pizza for the body, sushi for the soul.</description>
	<lastBuildDate>Tue, 19 Oct 2010 17:53:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>A tiny Transmission.app hack</title>
		<link>http://www.kill-9.it/blog/index.php/2010/10/19/a-tiny-transmission-app-hack/</link>
		<comments>http://www.kill-9.it/blog/index.php/2010/10/19/a-tiny-transmission-app-hack/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 17:53:31 +0000</pubDate>
		<dc:creator>zen</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Geek]]></category>

		<guid isPermaLink="false">http://www.kill-9.it/blog/?p=513</guid>
		<description><![CDATA[(A post every 10 months. I hope that does not annoy you :) It will not take long to read, anyway. ) Transmission is a great BitTorrent client. It is full of features (look at the site!), including bandwidth control, and runs on every platform (Linux and Mac :P). You can choose global upload and [...]]]></description>
			<content:encoded><![CDATA[<p>(A post every 10 months. I hope that does not annoy you :) It will not take long to read, anyway. )</p>
<p><a href="http://www.transmissionbt.com/">Transmission</a> is a great BitTorrent client. It is full of features (look at the site!), including bandwidth control, and runs on every platform (Linux and Mac :P).<br />
You can choose global upload and download speeds, or shape single torrents among those you are working with.<br />
At home I have a 10mbit connection to the Internet so I rarely limit the torrents, but most of the time when I do it is to reserve a small quantity of bandwidth for Internet browsing while I wait, or to play online.</p>
<p>Transmission is a bit rigid regarding the possible speeds: the only possible values (for both upload and download) expressed in kilobytes/sec are 5, 10, 20, 30, 40, 50, 75, 100, 150, 200, 250, 500, 750, 1000, 1500, 2000. My home network chokes around 600. I could set for 500k, but where&#8217;s the fun?</p>
<p>So:</p>
<ul>
<li>head to <a href="https://trac.transmissionbt.com/wiki/Building">https://trac.transmissionbt.com/wiki/Building </a> and read thoroughly [the part specifying that you need to have XCode installed, for example]</li>
<li>learn that &#8220;<em>Building the project on Mac requires the source to be retrieved from SVN. Pre-packaged source code will not compile.</em>&#8220;</li>
<li>download the SVN code (uhm, yes. I also have pkgsrc installed):<br />
 <code>svn co svn://svn.transmissionbt.com/Transmission/trunk Transmission</code><br />
       in my case the version number was 2.11 1133-something.
</li>
<li>run a &#8220;dry&#8221; compile run &#8212; this will guarantee that the code is not broken <em>before</em> you start tinkering with it or that you have some local issue (my first time doing actually something with XCode. Easier than I thought, the source has an XCode project file)</li>
<li>find the relevant source files (grep was my friend). In the end I only modified Controller.m and TorrentTableView.m: find the line<br />
<code>const NSInteger speedLimitActionValue[] = { 5, 10, 20, 30, 40, 50, 75,<br />
100, 150, 200, 250, 500, 750, 1000, 1500, 2000, -1 };</code><br />
and modify it to match the speeds you want to be able to use. You can add or remove values as you like as long as the syntax is right.</li>
<li>compile it again and run it. :)</li>
</ul>
<p>If I were a programmer, I&#8217;d have implemented something that would allow the user to choose the speed as he liked &#8212; but this fits my needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kill-9.it/blog/index.php/2010/10/19/a-tiny-transmission-app-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intel&#8217;s Activex</title>
		<link>http://www.kill-9.it/blog/index.php/2009/12/03/intels-activex/</link>
		<comments>http://www.kill-9.it/blog/index.php/2009/12/03/intels-activex/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 19:38:34 +0000</pubDate>
		<dc:creator>zen</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.kill-9.it/blog/?p=495</guid>
		<description><![CDATA[So, who am I supposed to trust? (it turns out that Husdawg LLC is a perfectly &#8220;legal&#8221; ActiveX provider, but Intel does not mention them anywhere &#8212; just hoping people will click through?)]]></description>
			<content:encoded><![CDATA[<p>So, who am I supposed to trust?</p>
<p><a href="http://farm3.static.flickr.com/2562/4137384969_41c4ef5333_o.png"><img src="http://farm3.static.flickr.com/2562/4137384969_41c4ef5333_o.png"/></a></p>
<p>(it turns out that <a href="http://www.husdawg.com/">Husdawg LLC</a> is a perfectly &#8220;legal&#8221; ActiveX provider, but Intel does not mention them anywhere &#8212; just hoping people will click through?)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kill-9.it/blog/index.php/2009/12/03/intels-activex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snow Leopard Trash, again</title>
		<link>http://www.kill-9.it/blog/index.php/2009/11/12/snow-leopard-trash-again/</link>
		<comments>http://www.kill-9.it/blog/index.php/2009/11/12/snow-leopard-trash-again/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 22:58:11 +0000</pubDate>
		<dc:creator>zen</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Geek]]></category>

		<guid isPermaLink="false">http://www.kill-9.it/blog/?p=480</guid>
		<description><![CDATA[At first I did not notice, but emptying the trash took ages, even &#8220;not securely&#8221;. Well, being the geek I am I did a quick dtruss on the Locum process, which spit out a huge list of write_nocancel syscalls. So, it seems it was actually writing stuff over the files I asked him to delete, [...]]]></description>
			<content:encoded><![CDATA[<p>At first I did not notice, but emptying the trash took ages, even &#8220;not securely&#8221;.<br />
Well, being the geek I am I did a quick dtruss on the Locum process, which spit out a huge list of write_nocancel syscalls. So, it seems it was actually writing stuff over the files I asked him to delete, even if I never asked him to (I just did a right click on the Trash icon, and selected &#8220;Empty Trash&#8221;). WTF?</p>
<p>Well, I learned (thanks Google) that Snow Leopard does a secure erase of the trash by default. Annoying.<br />
And that I did not realize that until now. Embarassing.</p>
<p>So, this can be solved at least in two ways:</p>
<p><strong>The GUI one</strong><br />
Go into Finder preferences, Advanced, and uncheck &#8220;Empty Trash securely&#8221;</p>
<p align=center><img src="http://www.kill-9.it/images/finderpref.png" alt="Finder Preferences Window" /></p>
<p>or</p>
<p><strong>the CLI one</strong><br />
Go into ~/Library/Preferences, convert the Finder preferences to xml (it&#8217;s binary by default)<br />
<code>plutil -convert xml1 com.apple.finder.plist</code><br />
and change the stanza</p>
<p><code>        &lt;key&gt;EmptyTrashSecurely&lt;/key&gt;<br />
        &lt;true/&gt;</code><br />
to<code><br />
        &lt;key&gt;EmptyTrashSecurely&lt;/key&gt;<br />
        &lt;false/&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kill-9.it/blog/index.php/2009/11/12/snow-leopard-trash-again/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flickr.com down</title>
		<link>http://www.kill-9.it/blog/index.php/2009/10/20/flickr-com-down/</link>
		<comments>http://www.kill-9.it/blog/index.php/2009/10/20/flickr-com-down/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 17:37:45 +0000</pubDate>
		<dc:creator>zen</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Geek]]></category>

		<guid isPermaLink="false">http://www.kill-9.it/blog/?p=470</guid>
		<description><![CDATA[beepbeep:~ zen$ date Tue Oct 20 19:34:42 CEST 2009 beepbeep:~ zen$ host www.flickr.com www.flickr.com is an alias for www.flickr.vip.mud.yahoo.com. www.flickr.vip.mud.yahoo.com has address 68.142.214.24 www.flickr.vip.mud.yahoo.com mail is handled by 0 . beepbeep:~ zen$ telnet www.flickr.com 80 Trying 68.142.214.24... telnet: connect to address 68.142.214.24: Connection refused telnet: Unable to connect to remote host weird. The very same [...]]]></description>
			<content:encoded><![CDATA[<p><code><br />
beepbeep:~ zen$ date<br />
Tue Oct 20 19:34:42 CEST 2009<br />
beepbeep:~ zen$ host www.flickr.com<br />
www.flickr.com is an alias for www.flickr.vip.mud.yahoo.com.<br />
www.flickr.vip.mud.yahoo.com has address 68.142.214.24<br />
www.flickr.vip.mud.yahoo.com mail is handled by 0 .<br />
beepbeep:~ zen$ telnet www.flickr.com 80<br />
Trying 68.142.214.24...<br />
telnet: connect to address 68.142.214.24: Connection refused<br />
telnet: Unable to connect to remote host<br />
</code></p>
<p>weird.<br />
The very same www.flickr.vip.mud.yahoo.com handles api.flickr.com (which is, unsurprisingly, down).<br />
Doesn&#8217;t look smart from here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kill-9.it/blog/index.php/2009/10/20/flickr-com-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Verbosely emptying the trash</title>
		<link>http://www.kill-9.it/blog/index.php/2009/10/17/verbosely-emptying-the-trash/</link>
		<comments>http://www.kill-9.it/blog/index.php/2009/10/17/verbosely-emptying-the-trash/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 12:01:48 +0000</pubDate>
		<dc:creator>zen</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Geek]]></category>

		<guid isPermaLink="false">http://www.kill-9.it/blog/?p=462</guid>
		<description><![CDATA[Like it happens on Windows, when you decide to delete something OSX simply moves that file or directory to &#8220;the Trash&#8221;, which is just a hidden directory on the volume you&#8217;re deleting from. Then, you right click on the Trash icon and select &#8220;Empty trash&#8221;. This action pops up a small window like this: I [...]]]></description>
			<content:encoded><![CDATA[<p>Like it happens on Windows, when you decide to delete something OSX simply moves that file or directory to &#8220;the Trash&#8221;, which is just a hidden directory on the volume you&#8217;re deleting from. Then, you right click on the Trash icon and select &#8220;Empty trash&#8221;.<br />
This action pops up a small window like this:</p>
<p align=center>
<img src="http://www.kill-9.it/images/osxtrash.png" alt="osx trash progress window" />
</p>
<p>I grew tired of asking myself what OSX was deleting (the operation can take a while, especially when &#8212; as I often do &#8212; you&#8217;re doing a secure erase) so this ugly one-liner, run as root, will give you the file the OS is working on:</p>
<p><code><br />
ps auxw | grep -i locum | grep -v grep | awk &#039;{print $2}&#039; | xargs lsof -p | grep -i Trash | awk &#039;{print $9}&#039;<br />
</code></p>
<p>It will output something like this:<br />
<code>/Volumes/FAT80GB/.Trashes/502/xcode3210a432.dmg</code></p>
<p>You can wrap that command inside the usual while/sleep loop if you want something that keeps you updated on what is going on &#8212; or make it an alias for your favourite shell.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kill-9.it/blog/index.php/2009/10/17/verbosely-emptying-the-trash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snow Leopard, ssh-agent and an everlasting memory</title>
		<link>http://www.kill-9.it/blog/index.php/2009/10/06/snow-leopard-ssh-agent-and-an-everlasting-memory/</link>
		<comments>http://www.kill-9.it/blog/index.php/2009/10/06/snow-leopard-ssh-agent-and-an-everlasting-memory/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 19:31:11 +0000</pubDate>
		<dc:creator>zen</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.kill-9.it/blog/?p=423</guid>
		<description><![CDATA[If you recently switched from an older (pre 10.6) version of OS X to the latest baby, and have the old habit of using ssh to connect around, you may have noticed a singular behaviour: while the older versions always asked you for a passphrase (you have a passphrase set on your private key, right?) [...]]]></description>
			<content:encoded><![CDATA[<p>If you recently switched from an older (pre 10.6) version of OS X to the latest baby, and have the old habit of using ssh to connect around, you may have noticed a singular behaviour: while the older versions always asked you for a passphrase (<em>you <strong>have</strong> a passphrase set on your private key, right?</em>) the new OS 10.6.x does it <strong>just the first time</strong> you use it.</p>
<p>Now, no doubt it is handy and user-friendly and automagical and&#8230; but I feel it disturbing: if by chance I hand over the laptop to somebody for a quick glance at a web page, for example, she can use it to connect anywhere without my consent &#8212; ok, I&#8217;m oversimplifying, but you get the idea.</p>
<p>The mistery lies into our old friend ssh-agent: it is spawn using<br />
<code>/System/Library/LaunchAgents/org.openbsd.ssh-agent.plist</code><br />
<em>[on a single line for yout copying pleasure]</em> as a configuration file and it will cache your passphrase the first time you use ssh.<br />
Up to here it&#8217;s fine.</p>
<p>What is troublesome to me is that the default cache time is unlimited (see the man page, this is the default behaviour when it is launched without specifying a &#8220;-t&#8221; option) therefore it will never forget the passphrase until I logout &#8212; being the only user of my laptop, this does not happen often.</p>
<p>Enter the joy of xml configuration files: edit the <code>org.openbsd.ssh-agent.plist</code>, and add the option to your liking, that is change this<br />
<code><br />
&lt;array&gt;<br />
&lt;string&gt;/usr/bin/ssh-agent&lt;/string&gt;<br />
&lt;string&gt;-l&lt;/string&gt;<br />
&lt;/array&gt;<br />
</code><br />
to something like this<br />
<code><br />
&lt;array&gt;<br />
&lt;string&gt;/usr/bin/ssh-agent&lt;/string&gt;<br />
&lt;string&gt;-l&lt;/string&gt;<br />
&lt;string&gt;-t&lt;/string&gt;<br />
&lt;string&gt;120&lt;/string&gt;<br />
&lt;/array&gt;<br />
</code><br />
if a couple of minutes of &#8220;grace period&#8221; suit your usage.<br />
Then, just kill the process &#8212; it will spawn again the next time you use ssh.</p>
<p>[By the way:<br />
Dear Internet, posting code like the XML up here sucks big time.<br />
It took me more time to format the two snippets to render correctly then writing the whole post.<br />
What do you use to ease this pain?<br />
thank you.]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kill-9.it/blog/index.php/2009/10/06/snow-leopard-ssh-agent-and-an-everlasting-memory/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>(OsX) Nuova icona per le preferenze energetiche</title>
		<link>http://www.kill-9.it/blog/index.php/2009/08/16/osx-nuova-icona-per-le-preferenze-energetiche/</link>
		<comments>http://www.kill-9.it/blog/index.php/2009/08/16/osx-nuova-icona-per-le-preferenze-energetiche/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 11:47:27 +0000</pubDate>
		<dc:creator>zen</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Italiano]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.kill-9.it/blog/?p=396</guid>
		<description><![CDATA[Io me ne sono accorto solo stamattina, ma avete fatto caso che l&#8217;icona di &#8220;Energy Saver&#8221; e` stata trasformata dalla convenzionale lampadina a quella &#8212; molto piu` moderna &#8212; che ormai e` obbligatoria?]]></description>
			<content:encoded><![CDATA[<p>Io me ne sono accorto solo stamattina, ma avete fatto caso che l&#8217;icona di &#8220;Energy Saver&#8221; e` stata trasformata dalla convenzionale lampadina a quella &#8212; molto piu` moderna &#8212; che ormai e` obbligatoria?</p>
<div class="wp-caption aligncenter" style="width: 590px"><img alt="Energy Saver Icon" src="http://www.kill-9.it/images/energyicon.png" title="Energy Saver Icon" width="580" height="224" /><p class="wp-caption-text">Energy Preferences Icon</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.kill-9.it/blog/index.php/2009/08/16/osx-nuova-icona-per-le-preferenze-energetiche/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bump alla v2.5! Yeah.</title>
		<link>http://www.kill-9.it/blog/index.php/2009/08/15/bump-alla-v2-5-yeah/</link>
		<comments>http://www.kill-9.it/blog/index.php/2009/08/15/bump-alla-v2-5-yeah/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 10:18:27 +0000</pubDate>
		<dc:creator>zen</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Italiano]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.kill-9.it/blog/?p=372</guid>
		<description><![CDATA[Ieri sera ho deciso che era ora di portare a 2.5 la &#8220;versione&#8221; di questo blog su cui scrivo sempre piu` di rado. Non temete: queste pagine continuano ad esser servite da vigorosi 167Mhz di CPU e 192Mb di ram, ma ho fatto oggi il &#8220;porting&#8221; da un eccellente webserver leggero (lighttpd) che pero` mi [...]]]></description>
			<content:encoded><![CDATA[<p>Ieri sera ho deciso che era ora di portare a 2.5 la &#8220;versione&#8221; di questo blog su cui scrivo sempre piu` di rado.<br />
Non temete: queste pagine continuano ad esser servite da vigorosi 167Mhz di CPU e 192Mb di ram, ma ho fatto oggi il &#8220;porting&#8221; da un eccellente webserver leggero (<a href="http://www.lighttpd.net/">lighttpd</a>) che pero` mi dava alcuni problemi ad <a href="http://wiki.nginx.org/Main">nginx</a>.</p>
<p>Avevo sempre avuto la curiosita` di provare nginx, ma l&#8217;ultima volta che ci avevo guardato era ricco di documentazione, in una sola lingua, e non quella che speravo: il russo. :-)</p>
<p>Invece dopo aver dato un&#8217;occhiata al <a href="http://wiki.nginx.org/Main">wiki di documentazione</a>, oggi ci ho provato.<br />
E` stata una migrazione pressoche` indolore, a parte un fastidioso problema (mio) all&#8217;interno di una <i>stanza</i> di configurazione (sua). Una volta capito il perche` alcune cose non funzionavano come mi aspettavo (dopo che mettere l&#8217;access.log a livello di debug, aver ricompilato l&#8217;eseguibile con <code>--with-debug</code>, e &#8212; alla soglia della disperazione &#8212; essermi attaccato con <code>ktrace</code> all&#8217;eseguibile).</p>
<p>Rispetto a &#8220;lighty&#8221; la complessita` del file di configurazione e` forse di poco minore, come l&#8217;occupazione di memoria. Le performance sono per entrambi indiscutibili, nei prossimi mesi vedremo se quello che mi ha spinto a provare altro rispetto a lighty funziona meglio.<br />
Da sottolineare che rispetto a lighty (singolo processo, singolo thread e I/O non bloccante con poll/epoll/kqueue/&#8230;), nginx e` piu` &#8220;alla Apache&#8221;, con un processo master e un numero configurabile di figli.<br />
Apprezzabile, dal mio punto di vista, che nginx di default tenda ad installarsi in una directory di /usr/local dentro cui mette tutto (log, configurazione, file html): dal mio punto di vista questo permette di mantenere piu` pulito il filesystem.<br />
Se siete interessati, qui c&#8217;e` <a href="https://calomel.org/nginx.html">un documento</a> che spiega come configurarlo con particolare attenzione alla sicurezza.</p>
<p>Una curiosita`: lighttpd e` un progetto figlio di Dan Kegel, autore dell&#8217;interessante documento (nonostante sia del 2006) &#8220;<a href="http://www.kegel.com/c10k.html">The C10K problem</a>&#8221; &#8212; problema che anche nginx afferma esplicitamente di risolvere. :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kill-9.it/blog/index.php/2009/08/15/bump-alla-v2-5-yeah/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

