<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://sniffo.org" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>#sniffo dot org - writeups</title>
 <link>http://sniffo.org/taxonomy/term/11/0</link>
 <description>nice writeups, conveying a message or something.</description>
 <language>en</language>
<item>
 <title>Goodbye sniffo.org/, welcome sindro.me/</title>
 <link>http://sniffo.org/node/201</link>
 <description>&lt;p&gt;I&#039;ll never regret the creation of sniffo.org, and I&#039;ll always thank &lt;a href=&quot;/user/2&quot; class=&quot;bb-url&quot;&gt;MorrigaN&lt;/a&gt; for forcing me to do it, back in 2007. Like the endless days and nights we spent together on IRC in the first years of the new millenium, setting up and managing sniffo.org was fun, until only myself started posting and following it. Much the same that happened to the IRC channel.&lt;/p&gt;

&lt;p&gt;Yeah, I know that I&#039;m the &lt;span style=&quot;font-style:italic&quot;&gt;founder&lt;/span&gt;, and I should keep up the channel, site and feelings. But I ain&#039;t no god and neither wanna be, I didn&#039;t create the past situations nor was the pulsating heart of the #sniffo community. I simply gave my time and soul to it, and all of you inconsciounsly felt it and did the same. That&#039;s why we spent so much good time together. Because of our big big hearts, and the amounts of love that flowed through them &lt;img src=&quot;/sites/all/modules/smileys/packs/example/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; /&gt;.&lt;/p&gt;

&lt;p&gt;Again, I&#039;ll never regret, this is not a &quot;fuck you off&quot; post, quite the opposite, in fact. I love you all, and I&#039;ll never stop thanking you for all the good time we spent together. So good that it&#039;ll never come back, and no one can ever make come it back. We tried, &lt;a href=&quot;/user/2&quot; class=&quot;bb-url&quot;&gt;MorrigaN&lt;/a&gt;, and we failed, because things are constantly changing, and living in the past is a no-brainer &lt;img src=&quot;/sites/all/modules/smileys/packs/example/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; /&gt;.&lt;/p&gt;

&lt;p&gt;Now, back to the subject, I&#039;ve decided to split the &lt;span style=&quot;font-style:italic&quot;&gt;funny bullshits&lt;/span&gt; me and you posted here from &lt;span style=&quot;font-style:italic&quot;&gt;humbly serious and technical&lt;/span&gt; stuff I work on everyday, so I built up &lt;a href=&quot;http://sindro.me/&quot;&gt;http://sindro.me/&lt;/a&gt;, on which I&#039;ll continue posting much more often than I post here. So, click on the link, and add it to your bookmarks and RSS reader! &lt;img src=&quot;/sites/all/modules/smileys/packs/example/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; /&gt;&lt;/p&gt;

&lt;p&gt;~Marcello&lt;/p&gt;</description>
 <comments>http://sniffo.org/node/201#comments</comments>
 <category domain="http://sniffo.org/taxonomy/term/13">english</category>
 <category domain="http://sniffo.org/taxonomy/term/21">IRC</category>
 <category domain="http://sniffo.org/taxonomy/term/11">writeups</category>
 <pubDate>Tue, 17 Mar 2009 13:42:46 +0100</pubDate>
 <dc:creator>vjt</dc:creator>
 <guid isPermaLink="false">201 at http://sniffo.org</guid>
</item>
<item>
 <title>How to mirror a static copy of the opensource.org website</title>
 <link>http://sniffo.org/node/200</link>
 <description>&lt;p&gt;I currently maintain the &lt;a href=&quot;http://opensource.antifork.org/&quot;&gt;italian mirror&lt;/a&gt; of the &lt;a href=&quot;http://opensource.org&quot;&gt;Open Source Initiative&lt;/a&gt; web site, and today I realized that the script I wrote some months ago wasn&#039;t doing its job well.. because the CSS files weren&#039;t downloaded at all, causing a rather unpleasant rendering of the site.&lt;/p&gt;
&lt;p&gt;To mirror opensource org I&#039;m currently using the plain&#039;ol &lt;a href=&quot;http://www.gnu.org/software/wget/&quot;&gt;GNU Wget&lt;/a&gt; -r --mirror and so on. While the good&#039;ol &lt;b&gt;wget&lt;/b&gt; downloads each page prerequisite defined in the HTML source, it doesn&#039;t support @import CSS rules, and doesn&#039;t download images referenced in CSS with url() rules.&lt;/p&gt;
&lt;p&gt;BTW, nothing that can&#039;t be resolved with some regex-fu: that&#039;s why I&#039;m &lt;a href=&quot;http://gist.github.com/61474&quot;&gt;sharing the script&lt;/a&gt; I&#039;m currently using to mirror the opensource.org web site, hoping it will generate either a new mirror or some insights on how to do this job better :).&lt;/p&gt;
&lt;p&gt;The script: &lt;a href=&quot;http://gist.github.com/61474&quot;&gt;update_opensource_mirror.sh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;!--break--&gt;&lt;br /&gt;
Cheers!&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/61474.js&quot;&gt;&lt;/script&gt;</description>
 <comments>http://sniffo.org/node/200#comments</comments>
 <category domain="http://sniffo.org/taxonomy/term/13">english</category>
 <category domain="http://sniffo.org/taxonomy/term/10">nerdish</category>
 <category domain="http://sniffo.org/taxonomy/term/11">writeups</category>
 <pubDate>Tue, 10 Feb 2009 18:47:52 +0100</pubDate>
 <dc:creator>vjt</dc:creator>
 <guid isPermaLink="false">200 at http://sniffo.org</guid>
</item>
<item>
 <title>a permalink_fu improvement: allow modification of permalinks and create redirects on-the-fly</title>
 <link>http://sniffo.org/node/198</link>
 <description>&lt;p&gt;Another spin-off from the &lt;a href=&quot;http://www.visitacsa.it&quot; target=&quot;_blank&quot;&gt;www.visitacsa.it&lt;/a&gt; website: a &lt;a href=&quot;http://github.com/technoweenie/permalink_fu/tree/master&quot; target=&quot;_blank&quot;&gt;permalink_fu&lt;/a&gt; improvement that allows &lt;b&gt;dynamic permalinks&lt;/b&gt;. I know it is an &lt;a href=&quot;http://en.wikipedia.org/wiki/Oxymoron&quot; target=&quot;_blank&quot;&gt;oximoron&lt;/a&gt;, because permalinks should be .. well .. permanent! And because &lt;a href=&quot;http://www.searchlores.org/main.htm&quot; target=&quot;_blank&quot;&gt;search engines&lt;/a&gt; index them, they should never change. But what happens when you publish &lt;em&gt;something&lt;/em&gt;, your permalink is generated with permalink_fu using the &lt;em&gt;title&lt;/em&gt; of your post, and after a couple of days you want to change the title, and the permalink under which the post is accessible as well?&lt;/p&gt;
&lt;p&gt;Following the &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html&quot;&gt;specification&lt;/a&gt;, your app should send out a &lt;em&gt;301 moved permanently&lt;/em&gt; HTTP status when accessing the old permalink and redirect the client to the new Uniform Resource Locator. That&#039;s quite the same thing what my modification to &lt;em&gt;permalink_fu&lt;/em&gt; does: whenever your post attributes are changed, the former and new permalinks are saved to the database, and you can enable your controller to generate &lt;em&gt;302 moved temporarily&lt;/em&gt; redirects when needed. In other words, it checks whether the requested URL is an old permalink, and automagically redirects the client to the new one.&lt;!--break--&gt;&lt;/p&gt;
&lt;p&gt;Everything is done behind the scenes, and the plugin has also got nifty rake tasks to set up the Redirect model and associated migrations. And you can change its name, of course! :)&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;302&lt;/em&gt; code was chosen because the &lt;em&gt;301 permanent&lt;/em&gt; status code &lt;a href=&quot;http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;amp;answer=40132&quot;&gt;has quite disruptive effects on search engines&lt;/a&gt;, but more discussion is welcome.&lt;/p&gt;
&lt;p&gt;Have a look over &lt;a href=&quot;http://github.com/vjt/permalink_fu/tree/master&quot;&gt;my repository at github&lt;/a&gt;, read the &lt;a href=&quot;http://github.com/vjt/permalink_fu/blob/b8d979f28c9795389cc65e9670a3529f805618dc/README&quot;&gt;README&lt;/a&gt; that contains the documentation of the added features, and check out the code! :)&lt;/p&gt;
</description>
 <comments>http://sniffo.org/node/198#comments</comments>
 <category domain="http://sniffo.org/taxonomy/term/13">english</category>
 <category domain="http://sniffo.org/taxonomy/term/10">nerdish</category>
 <category domain="http://sniffo.org/taxonomy/term/11">writeups</category>
 <pubDate>Thu, 29 Jan 2009 19:30:04 +0100</pubDate>
 <dc:creator>vjt</dc:creator>
 <guid isPermaLink="false">198 at http://sniffo.org</guid>
</item>
<item>
 <title>The jQuery ajax-upload-fu plugin</title>
 <link>http://sniffo.org/node/197</link>
 <description>&lt;p&gt;This &lt;a href=&quot;http://gist.github.com/54441&quot;&gt;jQuery plug-in&lt;/a&gt; allows AJAX file uploads without having a fixed file input button. It achieves its goals by installing an OnMouseMove handler over the selected elements, and moving the input button under the mouse cursor.&lt;/p&gt;
&lt;p&gt;The quote that inspired this code is: &quot;If Muhammad won&#039;t go to the the mountain, the mountain will come to Muhammad&quot;,the opposite of &lt;a href=&quot;http://en.wikipedia.org/wiki/If_the_mountain_won&#039;t_come_to_Muhammad&quot;&gt;the more known proverb&lt;/a&gt; :).&lt;/p&gt;
&lt;p&gt;It has been spinned off from the &lt;a href=&quot;http://www.visitacsa.it/&quot; title=&quot;http://www.visitacsa.it/&quot;&gt;http://www.visitacsa.it/&lt;/a&gt; JavaScript codebase, see the &lt;a href=&quot;http://gist.github.com/54441&quot;&gt;gist&lt;/a&gt; for more information, and have a look &lt;a href=&quot;http://www.visitacsa.it/javascripts/business-registration.js&quot;&gt;onto the live app code for an example of its usage&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here is the source code: &lt;!--break--&gt;&lt;/p&gt;
&lt;script src=&quot;http://gist.github.com/54441.js&quot;&gt;&lt;/script&gt;</description>
 <comments>http://sniffo.org/node/197#comments</comments>
 <category domain="http://sniffo.org/taxonomy/term/13">english</category>
 <category domain="http://sniffo.org/taxonomy/term/10">nerdish</category>
 <category domain="http://sniffo.org/taxonomy/term/11">writeups</category>
 <pubDate>Thu, 29 Jan 2009 09:03:32 +0100</pubDate>
 <dc:creator>vjt</dc:creator>
 <guid isPermaLink="false">197 at http://sniffo.org</guid>
</item>
<item>
 <title>The Windows 7 default wallpaper meaning.</title>
 <link>http://sniffo.org/node/196</link>
 <description>&lt;p&gt;When you install the &lt;a href=&quot;http://www.microsoft.com/windows/windows-7/beta-download.aspx&quot; target=&quot;_blank&quot;&gt;developer beta of Windows 7&lt;/a&gt;, after the usual 3 reboot cycle, you are greeted with the following image:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;asset-asset-image asset-align-center&quot;&gt;&lt;img src=&quot;http://sniffo.org/files/vjt/win7 siamese figth fish.png&quot;  title=&quot;Windows 7 fish&quot; alt=&quot;Windows 7 fish&quot; height=&quot;312&quot; width=&quot;416&quot; /&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;It is the &lt;a href=&quot;http://en.wikipedia.org/wiki/Betta_fish&quot; target=&quot;_blank&quot;&gt;Siamese fighting fish&lt;/a&gt;, a beautiful tropical fish, but with an interesting characteristic: it is extremely aggressive. It is popular belief that two males fight themselves even in the wild, but that&#039;s not quite true. This belief descends from the behaviour of the fish into an aquarium, where &lt;em&gt;the victor continuously attacking the loser, eventually causing the loser&#039;s death&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Now, think about the software ecosystem as an aquarium. And think about microsoft into this aquarium. The latest release of Microsoft OS has an aggressive fish as its default skin, and it is alone in this aquarium. And there&#039;s no place for anyone else: they&#039;ll fight whoever adversary, even if it&#039;s from the same species.&lt;/p&gt;

&lt;p&gt;What&#039;s uncertain is .. they&#039;ll succeed, or not? &lt;img src=&quot;/sites/all/modules/smileys/packs/example/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; /&gt;. We&#039;ll see!&lt;/p&gt;</description>
 <comments>http://sniffo.org/node/196#comments</comments>
 <category domain="http://sniffo.org/taxonomy/term/13">english</category>
 <category domain="http://sniffo.org/taxonomy/term/10">nerdish</category>
 <category domain="http://sniffo.org/taxonomy/term/11">writeups</category>
 <pubDate>Wed, 28 Jan 2009 15:19:58 +0100</pubDate>
 <dc:creator>vjt</dc:creator>
 <guid isPermaLink="false">196 at http://sniffo.org</guid>
</item>
<item>
 <title>Pushing git commit messages to lighthouse in a batch</title>
 <link>http://sniffo.org/node/187</link>
 <description>&lt;p&gt;If you use github-provided lighthouse integration, from the &quot;Admin&quot; pages of your git repository, you may have stumbled upon on a glitch: every changeset on lighthouse appears as done by the lighthouse user that configured the integration on github.&lt;/p&gt;

&lt;p&gt;This happens because lighthouse uses the API token to link changeset authors to LH users, and that&#039;s not good when you&#039;re not alone committing &lt;img src=&quot;/sites/all/modules/smileys/packs/example/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; /&gt;.&lt;/p&gt;

&lt;p&gt;A simple solution is to use a post-commit hook, as described &lt;a href=&quot;http://github.com/guides/integrating-git-commit-messages-in-lighthouse/&quot; class=&quot;bb-url&quot;&gt;here&lt;/a&gt;, but that&#039;s not satisfactory because it means that every time you issue git commit on your console, the commit message will go public, and if you &lt;code&gt;--amend&lt;/code&gt; or &lt;code&gt;reset --soft&lt;/code&gt; the index you&#039;ll have to browse to lighthouse and delete the changeset.&lt;/p&gt;

&lt;p&gt;A much smarter solution is to push all changed revs when pushing them to github: I &lt;a href=&quot;http://pastie.org/298043&quot; class=&quot;bb-url&quot;&gt;modified the original post-commit hook&lt;/a&gt; and installed it alongside the &lt;code&gt;git&lt;/code&gt; command in &lt;code&gt;$(dirname `which git`)/&lt;span style=&quot;font-weight:bold&quot;&gt;git-lh&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This gives me a new &lt;code&gt;git lh&lt;/code&gt; command that fetches the current HEAD revision from github using &lt;code&gt;refs/heads/master&lt;/code&gt; and POSTs every changeset between that rev and the current tip in the working tree to lighthouse.&lt;/p&gt;

&lt;p&gt;So, if you issue &lt;code&gt;git lh&lt;/code&gt; before issuing &lt;code&gt;git push&lt;/code&gt;, every change you&#039;re pushing to github will go to lighthouse, too.&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-weight:bold&quot;&gt;UPDATE&lt;/span&gt;: A simple bash script like&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;pre&gt;
#!/bin/bash
git lh &amp;amp;&amp;amp; git push
&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;saved as &lt;code&gt;git-lh-push&lt;/code&gt; saves you from typing two commands when you want to push &lt;img src=&quot;/sites/all/modules/smileys/packs/example/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; /&gt;.&lt;/p&gt;

&lt;p&gt;Have fun!&lt;/p&gt;

&lt;p&gt;References&lt;br /&gt;
&lt;a href=&quot;http://pastie.org/298043&quot; class=&quot;bb-url&quot;&gt;git lh script&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://sniffo.org/node/187#comments</comments>
 <category domain="http://sniffo.org/taxonomy/term/13">english</category>
 <category domain="http://sniffo.org/taxonomy/term/10">nerdish</category>
 <category domain="http://sniffo.org/taxonomy/term/11">writeups</category>
 <pubDate>Wed, 22 Oct 2008 16:22:48 +0200</pubDate>
 <dc:creator>vjt</dc:creator>
 <guid isPermaLink="false">187 at http://sniffo.org</guid>
</item>
<item>
 <title>Il vaso della maionese</title>
 <link>http://sniffo.org/node/186</link>
 <description>&lt;p&gt;&quot;Quando ti sembra di avere troppe cose da gestire nella vita, quando 24 ore in un giorno non sono abbastanza, ricordati del vaso della Maionese e dei due bicchieri di vino...&quot;&lt;/p&gt;

&lt;p&gt;Un professore stava davanti alla sua classe di filosofia e aveva davanti alcuni oggetti.&lt;/p&gt;

&lt;p&gt;Quando la classe incominciò a zittirsi, prese un grande barattolo di maionese vuoto e lo iniziò a riempire di palline da golf. Chiese poi agli studenti se il barattolo fosse pieno e costoro risposero che lo fosse.&lt;/p&gt;

&lt;p&gt;Il professore allora prese un barattolo di ghiaia e la rovesciò nel barattolo di maionese. Lo scosse leggermente e i sassolini si posizionarono negli spazi vuoti, tra le palline da golf. Chiese di nuovo agli studenti se il barattolo fosse pieno e questi concordarono che lo fosse.&lt;/p&gt;

&lt;p&gt;Il professore prese allora una scatola di sabbia e la rovesciò, aggiungendola nel barattolo; ovviamente la sabbia si sparse ovunque all&#039;interno. Chiese ancora una voltase il barattolo fosse pieno e gli studenti risposero con un unanime &quot;Sì!&quot;.&lt;/p&gt;

&lt;p&gt;Il professore estrasse quindi due bicchieri di vino da sotto la cattedra e aggiunse il loro intero contenuto nel barattolo, andando così effettivamente a riempire gli spazi vuoti nella sabbia. Gli studenti risero.&lt;/p&gt;

&lt;p&gt;&quot;Ora&quot;, disse il professore non appena la risata si fu placata, &quot;voglio che consideriate questo barattolo come la vostra Vita. Le palle da golf sono le cose importanti: la vostra famiglia, i vostri bambini, la vostra salute, i vostri amici e le vostre Passioni; le cose per cui, se anche tutto il resto andasse perduto e solo queste rimanessero, la vostra vita continuerebbe ad essere piena.&lt;br /&gt;
I sassolini sono le altre cose che hanno importanza, come il vostro lavoro, la casa, la macchina...&lt;br /&gt;
La sabbia è tutto il resto: le piccole cose.&lt;/p&gt;

&lt;p&gt;Se voi mettete nel barattolo la sabbia per prima, non ci sarà spazio per la ghiaia e nemmeno per le palle da golf.&lt;/p&gt;

&lt;p&gt;Lo stesso vale per la vita: se spendete tutto il vostro tempo e le vostre energie dietro le piccole cose, non avrete più spazio per le cose che sonoimportanti per voi.&lt;/p&gt;

&lt;p&gt;Prestate attenzione alle cose che sono indispensabili per la vostra felicità: giocate con i vostri bambini, godetevi la famiglia ed i genitori finchè ci sono; portate il vostro compagno/a fuori a cena... E non solo nelle occasioni importanti! Dedicatevi a ciò che amate e alle passioni, tanto ci sarà  sempre tempo per pulire la casa o fissare gli appuntamenti. Prendetevi cura per prima cosa delle palle da golf, le cose che contano davvero. Fissate le priorità...&lt;/p&gt;

&lt;p&gt;Il resto è solo sabbia.&lt;/p&gt;

&lt;p&gt;Uno degli studenti alzò la mano e chiese cosa rappresentasse il vino. Il professore sorrise: &quot;Sono felice che tu l&#039;abbia chiesto. Serve solo per mostrarvi che non importa quanto piena possa sembrare la vostra vita: ci sarà sempre spazio per un paio di bicchieri di vino con un amico.&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-style:italic&quot;&gt;[ tks to Valeria Maione for sharing this. Original source unknown. Report it if you know &lt;img src=&quot;/sites/all/modules/smileys/packs/example/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; /&gt; Thanks! ]&lt;/span&gt;&lt;/p&gt;</description>
 <comments>http://sniffo.org/node/186#comments</comments>
 <category domain="http://sniffo.org/taxonomy/term/12">italian</category>
 <category domain="http://sniffo.org/taxonomy/term/11">writeups</category>
 <pubDate>Mon, 20 Oct 2008 17:22:54 +0200</pubDate>
 <dc:creator>vjt</dc:creator>
 <guid isPermaLink="false">186 at http://sniffo.org</guid>
</item>
<item>
 <title>10.5.2 Odissey: a small journey in Mac OS X services and components</title>
 <link>http://sniffo.org/node/127</link>
 <description>&lt;p&gt;Well, I&#039;m really happy with OSX 10.5.2. Even I&#039;m not the one that blamed Apple for the translucent menu bar that everyone dislikes.. well, I like it. I don&#039;t care about the TM menu bar tool, because I haven&#039;t bought (yet) the nifty Time Capsule, I like the spinner in the Airport menu and, most of all, I really like the updates to the BluetoothSCOAudioDriver.kext that drives my bluetooth headset.&lt;/p&gt;

&lt;p&gt;Spotlight also feels faster and faster on every upgrade, and I&#039;m a heavy spotlight user, so this makes me really happy. Thanks Apple engineers!&lt;/p&gt;

&lt;p&gt;Back to the topic: why odissey? Because as per &lt;a href=&quot;/node/117&quot; class=&quot;bb-url&quot;&gt;my battery hints&lt;/a&gt;, I managed to make my MacBook2,1 SHUT DOWN while at 74% of the &quot;Writing files&quot; phase of the combo update... resulting in a completely broken system, as every geek could imagine &lt;img src=&quot;/sites/all/modules/smileys/packs/example/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; /&gt;. Apple updated some libraries, and upon reboot simply nothing worked, and the darwin console was filled with &lt;span style=&quot;font-weight:bold&quot;&gt;lots&lt;/span&gt; of error messages.&lt;/p&gt;

&lt;p&gt;The standard apple fanb^Wuser would have simply archived and installed his system, but hey, I&#039;m a proud geek, and I know that disaster recovery situations are the best ones to learn something about an operating environment, because you have to bring services up and find some way to re-apply the combo update without having the nifty Aqua interface. Luckily enough, on OSX every GUI has its CLI counterpart, following the best &quot;UNIX guidelines&quot; of interest separation and well designed architecture. Furthermore, OSX takes this approach one step further, following the best software engineering principles, where functionalities are implemented in Frameworks and both the GUI and CLI interfaces use it. Well done!&lt;/p&gt;

&lt;p&gt;The odissey started with a CMD-s to boot in single user mode, &lt;code class=&quot;bb-code&quot;&gt;/sbin/fsck -fy&lt;/code&gt;, &lt;code class=&quot;bb-code&quot;&gt;/sbin/mount -uw /&lt;/code&gt; in order to have a writable root. I started directly with a &lt;code class=&quot;bb-code&quot;&gt;hdiutil attach -noverify -verbose -mount required /Users/vjt/Downloads/MacOSXUpdCombo10.5.2.dmg&lt;/code&gt; in order to mount the update disk image, but it failed because the &lt;code class=&quot;bb-code&quot;&gt;diskarbitrationd&lt;/code&gt; wasn&#039;t running. So i fired up &lt;code class=&quot;bb-code&quot;&gt;launchctl&lt;/code&gt; and issued &lt;code class=&quot;bb-code&quot;&gt;load /System/Librar/LaunchDaemons/com.apple.diskarbitrationd.plist&lt;/code&gt;, when I discovered that it needed both the &lt;code class=&quot;bb-code&quot;&gt;configd&lt;/code&gt; daemon and the &lt;code class=&quot;bb-code&quot;&gt;notifyd&lt;/code&gt; daemon, so I loaded them up in launchd and.. YAY! the disk image was correctly mounted in &lt;code class=&quot;bb-code&quot;&gt;/Volumes/Mac OS X Update Combined&lt;/code&gt;!&lt;/p&gt;

&lt;p&gt;Here things started to complicate a bit, because an easy task like &lt;code class=&quot;bb-code&quot;&gt;installer -package MacOSXUpdCombo10.5.2.pkg -target /&lt;/code&gt; failed with &lt;code class=&quot;bb-code&quot;&gt;NSInvalidArgumentException&lt;/code&gt; in &lt;code class=&quot;bb-code&quot;&gt;[IFRunnerProxy requestKeyForRights:askUser:] unrecognized selector sent to instance 0x79ac50&lt;/code&gt;. Well, here the Objective-C method was pretty self-explaining, the installer was trying to ask the user permission to install the package. That&#039;s quite strange, because i was running the &lt;code class=&quot;bb-code&quot;&gt;installer&lt;/code&gt; command as root, so no request should have been issued. I started scratching my head, and thought about the &lt;code class=&quot;bb-code&quot;&gt;DirectoryServices&lt;/code&gt;, maybe because they were unavailable &quot;something wrong&quot;(tm) was happening?&lt;/p&gt;

&lt;p&gt;OK, let&#039;s try loading the &lt;code class=&quot;bb-code&quot;&gt;com.apple.DirectoryServices&lt;/code&gt; property list inside &lt;code class=&quot;bb-code&quot;&gt;launchd&lt;/code&gt;.. it didn&#039;t work and &lt;code class=&quot;bb-code&quot;&gt;dyld&lt;/code&gt; spit out this enlightening error message:&lt;/p&gt;

&lt;p&gt;&lt;pre class=&quot;bb-code-block&quot;&gt;
com.apple.DirectoryServices[11980]: dyld: lazy symbol binding 
  failed: Symbol not found: _res_interrupt_requests_enable 
voyager com.apple.DirectoryServices[11980]:   Referenced from:
  /usr/sbin/DirectoryService
com.apple.DirectoryServices[11980]:   Expected in:
  /usr/lib/libresolv.9.dylib
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;ARGH! Something was changed in the libresolv! I had 10.5.1&#039;s DirectoryServices and 10.5.2&#039;s libresolv! Gotta restore the old version to make DS run. I first tried with a &lt;code class=&quot;bb-code&quot;&gt;netcat&lt;/code&gt; from another 10.5.1 box, but with my surprise the three-way handshake wasn&#039;t completed between the two endpoints so no data could be transferred.&lt;/p&gt;

&lt;p&gt;Luckily, because i already brought up the &lt;code class=&quot;bb-code&quot;&gt;diskarbitration&lt;/code&gt; daemon, I could easily put the library on an USB storage device, plug it in and have it mounted in /Volumes. It did work and Directory Services were up&amp;amp;running.. but still the same ugly &lt;code class=&quot;bb-code&quot;&gt;NSInvalidArgumentException&lt;/code&gt; error when launching the &lt;code class=&quot;bb-code&quot;&gt;installer&lt;/code&gt; utility. Sigh.&lt;/p&gt;

&lt;p&gt;At this point, I gave up because my journey has been interesting enough and I had a really more confortable way to fix up my problem: an USB-attached hard disk with a vanilla Leopard installation from which i could boot up my MacBook, easily double click the disk image update from the Finder and lazily launch an &lt;code class=&quot;bb-code&quot;&gt;installer -target /Volumes/disk0 -package /Volumes/disk0/Users/vjt/Downloads/MacOSXUpdCombo10.5.2.dmg&lt;/code&gt; to re-run all the upgrade procedures that would fix my Leopard installation. So i followed this path, because I had some work to do and could not perseverate in my geeky journey with the Darwin console, even if it had been really entertaining.&lt;/p&gt;

&lt;p&gt;After installer completed its job, I rebooted and a shiny new 10.5.2 greeted me with the usual Mac OS X login window that on my box sports the &quot;All your base are belong to us&quot; slogan &lt;img src=&quot;/sites/all/modules/smileys/packs/example/wink.png&quot; title=&quot;Eye-wink&quot; alt=&quot;Eye-wink&quot; /&gt;.&lt;/p&gt;

&lt;p&gt;Hope you enjoyed this journey as I did, and if you&#039;re a Linux fanb^Wuser don&#039;t underestimate the cleaniness and cleverness of Mac OS X that every Apple geek tries to share with you.&lt;/p&gt;</description>
 <comments>http://sniffo.org/node/127#comments</comments>
 <category domain="http://sniffo.org/taxonomy/term/13">english</category>
 <category domain="http://sniffo.org/taxonomy/term/10">nerdish</category>
 <category domain="http://sniffo.org/taxonomy/term/11">writeups</category>
 <pubDate>Fri, 15 Feb 2008 20:25:59 +0100</pubDate>
 <dc:creator>vjt</dc:creator>
 <guid isPermaLink="false">127 at http://sniffo.org</guid>
</item>
<item>
 <title>Python2.4&#039;s urllib2 broken by default on Solaris Express 5.11</title>
 <link>http://sniffo.org/node/112</link>
 <description>&lt;p&gt;While happily installing prerequisites to build an app on &lt;a href=&quot;http://sun.com/software/solaris&quot; class=&quot;bb-url&quot;&gt;Solaris 10&lt;/a&gt;, i enjoyed having &lt;a href=&quot;http://selenic.com/mercurial&quot; class=&quot;bb-url&quot;&gt;Mercurial&lt;/a&gt; already installed in the &quot;base system&quot;.. except for a BIG issue: digest authentication was broken. I tcpdumped the traffic exchanged between the mercurial client and the CGI server and I saw that no &lt;code class=&quot;bb-code&quot;&gt;Authorization&lt;/code&gt; header was sent, and obivously the server refused to serve the hg repository.&lt;/p&gt;

&lt;p&gt;Before reinstalling python, maybe from source and replacing the default installation or having side by side two different versions, with consequent nuisances and dirt around the system, I tried a very very small patch to urllib2.py that... amusingly enough, fixed my problem:&lt;/p&gt;

&lt;pre&gt;
--- urllib2.py~ Fri Jan 25 02:35:59 2008
+++ urllib2.py  Fri Jan 25 03:27:52 2008
@@ -815,7 +815,7 @@
             auth_val = &#039;Digest %s&#039; % auth
             if req.headers.get(self.auth_header, None) == auth_val:
                 return None
-            req.add_unredirected_header(self.auth_header, auth_val)
+            req.add_header(self.auth_header, auth_val)
             resp = self.parent.open(req)
             return resp
&lt;/pre&gt;

&lt;p&gt;I&#039;m no fscking python expert (but the language is interesting), so don&#039;t ask me *WHY* it works, i simply followed the &lt;code class=&quot;bb-code&quot;&gt;add_header&lt;/code&gt; comment that said &quot;this method is useful for adding authentication headers&quot; and replaced the unredirected_header method with the former. I really don&#039;t know why with Python2.5&#039;s urllib2 &quot;everything works&quot; even with that method, something must be broken somewhere else. A diff between the two urllibs gave me nothing, I really should learn Python one day or another.&lt;/p&gt;

&lt;p&gt;I also found no information by googling keywords such as &amp;lt;&amp;lt;solaris &quot;http {authorization,authentication}&quot; {urllib2,python} {broken,not working} mercurial&amp;gt;&amp;gt; (shell interpolation intended), so I hope this post will be useful to someone &lt;img src=&quot;/sites/all/modules/smileys/packs/example/wink.png&quot; title=&quot;Eye-wink&quot; alt=&quot;Eye-wink&quot; /&gt;.&lt;/p&gt;

&lt;p&gt;Solaris looks like a nice beast, though. I&#039;ll have to learn more about it as well. &lt;img src=&quot;/sites/all/modules/smileys/packs/example/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; /&gt;.&lt;/p&gt;</description>
 <comments>http://sniffo.org/node/112#comments</comments>
 <category domain="http://sniffo.org/taxonomy/term/13">english</category>
 <category domain="http://sniffo.org/taxonomy/term/10">nerdish</category>
 <category domain="http://sniffo.org/taxonomy/term/11">writeups</category>
 <pubDate>Fri, 25 Jan 2008 03:42:46 +0100</pubDate>
 <dc:creator>vjt</dc:creator>
 <guid isPermaLink="false">112 at http://sniffo.org</guid>
</item>
<item>
 <title>E` l&#039;ora dello sbattezzo</title>
 <link>http://sniffo.org/node/108</link>
 <description>&lt;p&gt;Bello dire parlare incazzarsi sull&#039;ingerenza cattolica nello stato.. ma perche` esiste quest&#039;ingerenza? Perche` oggi il vaticano puo` ancora permettersi di parlare a nome del &quot;97% degli italiani&quot; in quanto tale e` la percentuale di battezzati residente sul territorio, percentuale che da` potere a quest&#039;organizzazione.&lt;/p&gt;

&lt;p&gt;La soluzione.. per quanto possa sembrare inutile ed insignificante, e` tirarsi fuori dal club inviando una &lt;a href=&quot;http://www.uaar.it/laicita/sbattezzo/sbattezzo-modulo-per-parroco.pdf&quot; class=&quot;bb-url&quot;&gt;semplice raccomandata&lt;/a&gt; alla chiesa dove si e` stati battezzati.&lt;/p&gt;

&lt;p&gt;Inutile ed insignificante perche` di certo un &lt;code class=&quot;bb-code&quot;&gt;-1&lt;/code&gt; non provochera` affatto un mutamento dello stato delle cose, ma per un non credente &lt;a href=&quot;http://www.buraku.net/?page_id=4&quot; class=&quot;bb-url&quot;&gt;essere fuori&lt;/a&gt; e` prima di tutto una soddisfazione personale di non appartenere piu` ad un&#039;entita` che non approva, secondo e` una questione di coerenza con se` stessi, terzo e` il solito atto da &quot;goccia nel mare&quot; che puo` sembrare pointless ma resta comunque l&#039;unico atto con valore legale e con risultato effettivo che una persona possa compiere contro questa chiesa cattolica malata.&lt;/p&gt;

&lt;p&gt;Personalmente, mi &lt;a href=&quot;http://www.uaar.it/laicita/sbattezzo/&quot; class=&quot;bb-url&quot;&gt;sbattezzo&lt;/a&gt; al piu` presto, e voi?&lt;/p&gt;</description>
 <comments>http://sniffo.org/node/108#comments</comments>
 <category domain="http://sniffo.org/taxonomy/term/12">italian</category>
 <category domain="http://sniffo.org/taxonomy/term/18">politics</category>
 <category domain="http://sniffo.org/taxonomy/term/11">writeups</category>
 <pubDate>Thu, 24 Jan 2008 12:42:19 +0100</pubDate>
 <dc:creator>vjt</dc:creator>
 <guid isPermaLink="false">108 at http://sniffo.org</guid>
</item>
</channel>
</rss>
