<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Le-Blog-&#224;-Dam - Home</title>
  <id>tag:blog.cosinux.org,2010:mephisto/</id>
  <generator version="0.7.2" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  <link href="http://blog.cosinux.org/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://blog.cosinux.org/" rel="alternate" type="text/html"/>
  <updated>2008-09-30T07:54:37Z</updated>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>canatella</name>
    </author>
    <id>tag:blog.cosinux.org,2008-09-30:6349</id>
    <published>2008-09-30T06:31:00Z</published>
    <updated>2008-09-30T07:54:37Z</updated>
    <link href="http://blog.cosinux.org/2008/9/30/a-propos-de-nos-petits-sous" rel="alternate" type="text/html"/>
    <title>A propos de nos petits sous</title>
<content type="html">
            Voici un petit article à se mettre sous la dent pour mieux comprendre la manière dont on se fait entuber tout les jours et particulièrement ses derniers: &lt;a href='http://www.courtfool.info/fr_Secrets_d_argent_interets_et_inflation.htm'&gt;Secrets d'argent, intérêts et inflation&lt;/a&gt;. Et pour mieux comprendre comment on en est arrivé là, plein d'article par Aline De Diéguez: &lt;a href='http://pagesperso-orange.fr/aline.dedieguez/mariali/sommaire_textes.html'&gt;voir les articles sous le point 1&lt;/a&gt;, le dernier est assez intéressant (lire édifiant). A consommer avec modération...
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>chrys</name>
    </author>
    <id>tag:blog.cosinux.org,2008-09-06:6348</id>
    <published>2008-09-06T06:27:00Z</published>
    <updated>2008-09-06T08:57:50Z</updated>
    <category term="C'est la vie"/>
    <category term="Famille"/>
    <category term="Fran&#231;ais"/>
    <link href="http://blog.cosinux.org/2008/9/6/mes-30-ans" rel="alternate" type="text/html"/>
    <title>Mes 30 ans...</title>
<summary type="html">http://blog.cosinux.org/assets/2008/9/6/CoutnrySide_low.jpg</summary><content type="html">
            http://blog.cosinux.org/assets/2008/9/6/CoutnrySide_low.jpg
A l'occassion de mon passage dans la trentaine, je vous invite à revivre une après-midi comme nous en avions l'habitude quand nous avions 20 ans...

Au programme: garden party, bières, concert, bières, musique, bières et soleil (j'espère!)

Rendez-vous le samedi 13 septembre dès 15h chez nous à Clermont, Les Béolles 2.
Concerts et ambiance assurée. Voir programme sur photo ci-dessous.
Pains-saucisses spécials Béolles dès 18h.
Possibilité de camping (prévoir votre tente).
Chateau gonflable pour les enfants.
A l'intérieur en cas de pluie.

Nous souhaitons une vrai fête avec tous nos amis, pas de chichis, pas de gâteaux, pas de cadeaux...

PAF laissé à votre appréciation selon votre débit...

En espérant vous voir nombreux...

Chrystelle
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>canatella</name>
    </author>
    <id>tag:blog.cosinux.org,2008-06-16:6195</id>
    <published>2008-06-16T15:34:00Z</published>
    <updated>2008-06-16T18:23:25Z</updated>
    <category term="C'est la vie"/>
    <category term="Famille"/>
    <category term="Fran&#231;ais"/>
    <link href="http://blog.cosinux.org/2008/6/16/suzanne-et-le-trampoline" rel="alternate" type="text/html"/>
    <title>Suzanne et le trampoline</title>
<content type="html">
            Visiblement, ça lui plait...
&amp;lt;object height='344' width='425'&gt;&amp;lt;param name='movie' value='http://www.youtube.com/v/Qfr2JLtnAuI&amp;hl=fr'&gt;&amp;lt;/param&gt;&amp;lt;embed type='application/x-shockwave-flash' src='http://www.youtube.com/v/Qfr2JLtnAuI&amp;hl=fr' height='344' width='425'&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>canatella</name>
    </author>
    <id>tag:blog.cosinux.org,2008-05-19:6142</id>
    <published>2008-05-19T11:04:00Z</published>
    <updated>2008-05-19T11:10:09Z</updated>
    <category term="Rails Tidy"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2008/5/19/rails-tidy-release" rel="alternate" type="text/html"/>
    <title>Rails tidy release</title>
<content type="html">
            &lt;p&gt;I've released a new version of my Tidy plugin for rails. This one add support for rails 2.0 files extensions. The changes were submitted by Danial Pearce. See &lt;a href='http://blog.cosinux.org/pages/rails-tidy'&gt;there&lt;/a&gt; for more informations.&lt;/p&gt;

&lt;p&gt;As a side note, I ordered the book &lt;a href='http://www.pragprog.com/titles/fr_arr/advanced-rails-recipes'&gt;Advanced Rails Recipes&lt;/a&gt; and discovered that my plugin is mentioned in the &quot;Automatically Validate HTML&quot; recipe. I still haven't got the time to read all the book, but as my plugin is in it, I can only recommend it ;).
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>canatella</name>
    </author>
    <id>tag:blog.cosinux.org,2008-05-19:6141</id>
    <published>2008-05-19T11:00:00Z</published>
    <updated>2008-05-19T11:03:24Z</updated>
    <category term="C'est la vie"/>
    <category term="Famille"/>
    <link href="http://blog.cosinux.org/2008/5/19/des-nouvelles" rel="alternate" type="text/html"/>
    <title>Des nouvelles</title>
<content type="html">
            Bon, il est temps de faire revivre un peu cet endroit.  Je vais tenter, dans les prochains jours, de mettre quelques photos récentes des enfants et de la maison. Comme il faut encore que je les prenne, il va faloir patienter un peu. En attendant, vous pouvez lire le blog de mon frère; &lt;a href='http://sophieetlaurent.blogspot.com/'&gt;http://sophieetlaurent.blogspot.com/&lt;/a&gt;.
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>canatella</name>
    </author>
    <id>tag:blog.cosinux.org,2007-07-27:1016</id>
    <published>2007-07-27T10:48:00Z</published>
    <updated>2007-07-27T10:52:20Z</updated>
    <category term="C'est la vie"/>
    <link href="http://blog.cosinux.org/2007/7/27/classique" rel="alternate" type="text/html"/>
    <title>Classique...</title>
<content type="html">
            &amp;lt;center&gt;
&amp;lt;object height='350' width='425'&gt;&amp;lt;param name='movie' value='http://www.youtube.com/v/YevYBsShxNs'&gt;&amp;lt;/param&gt;&amp;lt;param name='wmode' value='transparent'&gt;&amp;lt;/param&gt;&amp;lt;embed type='application/x-shockwave-flash' src='http://www.youtube.com/v/YevYBsShxNs' height='350' wmode='transparent' width='425'&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;
&lt;br /&gt;
&amp;lt;object height='350' width='425'&gt;&amp;lt;param name='movie' value='http://www.youtube.com/v/0yvHWyvexZA'&gt;&amp;lt;/param&gt;&amp;lt;param name='wmode' value='transparent'&gt;&amp;lt;/param&gt;&amp;lt;embed type='application/x-shockwave-flash' src='http://www.youtube.com/v/0yvHWyvexZA' height='350' wmode='transparent' width='425'&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;
&amp;lt;/center&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>canatella</name>
    </author>
    <id>tag:blog.cosinux.org,2007-06-08:697</id>
    <published>2007-06-08T07:43:00Z</published>
    <updated>2007-06-08T08:32:33Z</updated>
    <category term="C'est la vie"/>
    <category term="English"/>
    <category term="Fran&#231;ais"/>
    <link href="http://blog.cosinux.org/2007/6/8/que-mange-le-monde" rel="alternate" type="text/html"/>
    <title>Que mange le monde</title>
<content type="html">
            &lt;p&gt;&lt;a href='http://www.time.com/time/photogallery/0,29307,1626519_1373664,00.html'&gt;What the world eats&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;maj:&lt;/b&gt; je viens de me rendre compte que le système pour les commentaires était mis en mode modération, ce que je ne fesait pas. Dorénavant, les commentaires seront acceptés et les spams filtrés automatiquement. Je m'excuse pour ceux qui ont commentés et que ça n'a pas marché.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>canatella</name>
    </author>
    <id>tag:blog.cosinux.org,2007-06-05:681</id>
    <published>2007-06-05T10:42:00Z</published>
    <updated>2007-06-07T07:10:06Z</updated>
    <category term="C'est la vie"/>
    <category term="Famille"/>
    <category term="Fran&#231;ais"/>
    <link href="http://blog.cosinux.org/2007/6/5/eco-disco" rel="alternate" type="text/html"/>
    <title>Eco-Disco</title>
<content type="html">
            &lt;p&gt;
&lt;a href='http://www.flickr.com/photos/cosinux/531250388/'&gt;
&lt;img src='http://farm2.static.flickr.com/1383/531250388_265f9595f6.jpg' height='375' alt='00052.jpg' width='500' /&gt;
&lt;/a&gt;

C'est flou, c'est normal.
&lt;/p&gt;

&lt;p&gt;Voici quelques nouvelles du front...&lt;/p&gt;

&lt;p&gt;Hugo fait 4,1Kg et dort &lt;i&gt;presque&lt;/i&gt; toutes ses nuits. Faites-moi penser à ajouter une photo.&lt;/p&gt;

&lt;p&gt;Bon anniversaire Panda, je m'excuse de ne pas être venu, la semaine c'est un peu compliqué.&lt;/p&gt;

&lt;p&gt;Dimanche, je vote &lt;a href='http://www.ecolo.be/'&gt;Ecolo&lt;/a&gt;.
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>canatella</name>
    </author>
    <id>tag:blog.cosinux.org,2007-03-12:214</id>
    <published>2007-03-12T16:28:00Z</published>
    <updated>2007-03-12T16:34:01Z</updated>
    <category term="C'est la vie"/>
    <category term="Famille"/>
    <category term="Fran&#231;ais"/>
    <link href="http://blog.cosinux.org/2007/3/12/une-photo-de-suzanne" rel="alternate" type="text/html"/>
    <title>Une photo de Suzanne</title>
<content type="html">
            Oui je vis toujour et je sais que vous mourrez d'envie de voir une photo récente de Suzanne. 

&amp;lt;center&gt;&lt;img src='http://www.cosinux.org/~dam/suzanne.jpg' /&gt;&amp;lt;/center&gt;

Voilà, A+
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>canatella</name>
    </author>
    <id>tag:blog.cosinux.org,2007-02-21:130</id>
    <published>2007-02-21T11:16:00Z</published>
    <updated>2007-02-21T11:19:45Z</updated>
    <link href="http://blog.cosinux.org/2007/2/21/rubymtp" rel="alternate" type="text/html"/>
    <title>RubyMTP</title>
<content type="html">
            One month ago, I bought a Creative Zen V Plus mp3 player. It's a nice player but I missed easy to use access under Linux (I don't use Windows anymore). I tried the libmtp project but I did not like it much and so I started &lt;a href='http://rubyforge.org/projects/rubymtp/'&gt;RubyMTP&lt;/a&gt; project. It's a Ruby library to connect to MTP devices. For now it provides a filesystem access using Fuse and a podcast application. It need some test so if you feel like it, give it a try.
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>canatella</name>
    </author>
    <id>tag:blog.cosinux.org,2006-12-14:68</id>
    <published>2006-12-14T12:28:00Z</published>
    <updated>2006-12-14T13:00:14Z</updated>
    <category term="C'est la vie"/>
    <category term="Fran&#231;ais"/>
    <link href="http://blog.cosinux.org/2006/12/14/la-flandre-ind&#233;pendante" rel="alternate" type="text/html"/>
    <title>La Flandre ind&#233;pendante</title>
<content type="html">
            &lt;p&gt;Alors là je dis bravo la RTBF. Pour ceux qui ne sont pas au courant, la RTBF a diffusé hier soir un faux JT où de vrais journalistes annonçaient la scission de la Belgique et l'indépendance de la Flandre. Un panneau annonçait avant l'émission qu'il s'agissait d'une fiction et après 1/2 heure d'émission, un bandeau &quot;Ceci est une fiction&quot; était affiché.&lt;/p&gt;

&lt;p&gt;Le résultat: une belle pagaille. Des gens se sont rendus devant le palais royal pour manifester leur attachement à la Belgique, des ambassades ont prévenu leur pays de la scission, j'en passe et des meilleures.&lt;/p&gt;

&lt;p&gt;Le débat sur l'indépendance de la Flandre est très intéressant mais ce qui m'interpelle le plus ici, c'est la réaction des gens. La première chose à faire lorsqu'on apprend une chose pareille c'est de vérifier ailleur. Zapper sur RTL pour voir si il y a aussi un flash spécial ou allumer la radio plutôt que d'envoyer 36 SMS à ses proches pour les prévenir de la fin de la Belgique. Les gens prenent vraiment les paroles des medias pour du pain bénit. Avec un peu de jugeotte, on pouvait se dire que si la flandre annonçait son indépendance,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;la nouvelle ne tomberait pas comme un couperet, il y aurait un minimum de chahut, d'abord au parlement, etc,&lt;/li&gt;
&lt;li&gt;le premier ministre aurait au moins fait une déclaration devant la presse,&lt;/li&gt;
&lt;li&gt;elle ne l'annoncerait pas à 20h30, à l'heure où on se met dans son canapé pour regarder la TV,&lt;/li&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On se croirait revenu à l'époque des chain-mails: si vous ne transmettez pas ce message à 10 personnes, votre maison va brûler. Je n'ai jamais fait suivre ce genre de message, et je suis toujour viv... BOUM ...&lt;/p&gt;

&lt;p&gt;Trève de plaisanteries, je pense plutôt que tout ceux qui ont des commentaires négatifs sur l'émission se sont bien fait avoir et qu'ils râlent de s'être fait berner. Au moins, le débat est sur la table.&lt;/p&gt;

&lt;p&gt;Par contre, la RTBF ne sera plus du tout crédible lors de son prochain flash spécial d'information. François Debrigode a certainement perdu aussi en crédibilité. Le bandeau &quot;Ceci est une fiction&quot; aurait dû être présent dès le début, ou alors ils n'avaient qu'à programmer l'émission un 1er avril, personne n'aurait rien dit.&lt;/p&gt;

&lt;p&gt;En tout cas, ça me fait bien rire. Faites-moi penser à demander à Mr Debrigode de dire au gens pendant le JT du soir de verser 20€ sur mon compte sans quoi la Belgique sera à jamais dissolue.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-12-07:31</id>
    <published>2006-12-07T11:03:00Z</published>
    <updated>2006-12-11T09:08:35Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/12/7/you-not_nil-you-read-this" rel="alternate" type="text/html"/>
    <title>you.not_nil? { |you| read.this }</title>
<content type="html">
            &lt;p&gt;A thing that really annoys me is to check for nil values. For example having to do, in an ERB template&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;h1&gt;my template&lt;/h1&gt;
&amp;lt;% unless a.super['long'].variable['accessor'].nil? %&gt;
&lt;div&gt;&amp;lt;%= do_something_with a.super['long'].variable['accessor'] %&gt;&lt;/div&gt;
&lt;div&gt;&amp;lt;%= do_something_else_with a.super['long'].variable['accessor'] %&gt;&lt;/div&gt;
&amp;lt;% end %&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You'll say that I could use a local variable:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;h1&gt;my template&lt;/h1&gt;
&amp;lt;% the_var = a.super['long'].variable['accessor'] %&gt;
&amp;lt;% unless the_var.nil? %&gt;
&lt;div&gt;&amp;lt;%= do_something_with the_var %&gt;&lt;/div&gt;
&lt;div&gt;&amp;lt;%= do_something_else_with the_var %&gt;&lt;/div&gt;
&amp;lt;% end %&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But I prefer to have a more &quot;Ruby&quot; way for that:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;h1&gt;my template&lt;/h1&gt;
&amp;lt;% a.super['long'].variable['accessor'].not_nil? do |the_var| %&gt;
&lt;div&gt;&amp;lt;%= do_something_with the_var %&gt;&lt;/div&gt;
&lt;div&gt;&amp;lt;%= do_something_else_with the_var %&gt;&lt;/div&gt;
&amp;lt;% end %&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It is mutch nicer. Even more for one liners:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;%= do_something_with some_really_long_var unless some_really_long_var.nil? %&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;becomes&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;%= some_really_long_var.not_nil? { |v| do_something_with v } %&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here is the code for the &quot;not_nil?&quot; method:&lt;/p&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;&lt;span class='r'&gt;class&lt;/span&gt; &lt;span class='cl'&gt;Object&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='fu'&gt;not_nil?&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;     &lt;span class='r'&gt;yield&lt;/span&gt; &lt;span class='pc'&gt;self&lt;/span&gt; &lt;span class='r'&gt;unless&lt;/span&gt; &lt;span class='pc'&gt;self&lt;/span&gt;.nil?&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='r'&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-12-07:30</id>
    <published>2006-12-07T10:35:00Z</published>
    <updated>2008-06-20T09:03:54Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/12/7/get-rid-of-user-passwords-in-rails-using-ssl-client-certificate" rel="alternate" type="text/html"/>
    <title>Get rid of user passwords in Rails using SSL client certificate</title>
<content type="html">
            &lt;p&gt;For an application I'm writing, I needed a way to log in without having to enter a password. You can authenticate a client against a server in Apache using SSL client certificate validation. The problem was to create a link between Apache and the Rails application running under Mongrel. Here is what I've done.&lt;/p&gt;

&lt;h2&gt;Apache and SSL&lt;/h2&gt;

&lt;p&gt;First, you'll need Apache set up with SSL and client certificate validation. &lt;a href='http://www.garex.net/apache/'&gt;There&lt;/a&gt; are &lt;a href='http://www.freebsddiary.org/openssl-client-authentication.php'&gt;howtos&lt;/a&gt; on the web on how to to that, so I won't explain that in full details here. You'll need a server private key and certificate and a client certificate issued by the same authority (or authorities trusting each others). For myself, I use &lt;a href='http://www.cacert.org/'&gt;CAcert&lt;/a&gt; which provides free &quot;ethic&quot; certificates.&lt;/p&gt;

&lt;p&gt;I use Coda Hale great &lt;a href='http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/'&gt;article&lt;/a&gt; to configure my rails apps. Here is what I added to the Apache configuration for having it working with SSL and client certificate validation. Please note that only the lines added or changed are listed here. For it to work, you need to enable the Apache 2 &lt;a href='http://httpd.apache.org/docs/2.2/mod/mod_ssl.html'&gt;SSL&lt;/a&gt; and &lt;a href='http://httpd.apache.org/docs/2.2/mod/mod_headers.html'&gt;headers&lt;/a&gt; modules.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;virtualhost&gt;
  SSLEngine on
  SSLCertificateFile /path/to/cert.pem
  SSLCertificateKeyFile /path/to/private.key
  SSLCACertificateFile /path/to/cacert.pem
  SSLVerifyClient none

  &amp;lt;location&gt;
    SSLVerifyClient require
    SSLVerifyDepth 1
  &amp;lt;/location&gt;

  RequestHeader set X_FORWARDED_PROTO 'https'
  RequestHeader set X_SSL_CLIENT_DN_Email &quot;%{SSL_CLIENT_S_DN_Email}s&quot;
&amp;lt;/virtualhost&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So what's the meaning of all this ?&lt;/p&gt;

&lt;p&gt;On line 1, we say that this virtual host is for connection on port 443 (don't forget to add a &quot;Listen 443&quot; directive to your Apache config). &lt;/p&gt;

&lt;p&gt;Line 2 to 5, we simply configure server side ssl.&lt;/p&gt;

&lt;p&gt;On line 6 to 12, we configure client certificate validation. The line 6 is usefull if you want to require validation only for some specific locations (say 'admin' for example). Line 9, we require client certificate validation for the '/' location. Line 10 says that we need to go up in the authority hierarchy of 1 level maximum (my client and server certificates are issued by the same authority).&lt;/p&gt;

&lt;p&gt;On line 13, we tell rails that we are using the &quot;https&quot; protocol so that links outputted by call to &quot;link_to&quot;, &quot;url_for&quot; and the likes need to start with &quot;https&quot; instead of &quot;http&quot;. &lt;/p&gt;

&lt;h2&gt;SSL, Rails and Mongrel&lt;/h2&gt;

&lt;p&gt;This is the interesting part, specific to using Rails with Mongrel.&lt;/p&gt;

&lt;p&gt;On line 14, we say to Apache to add the &quot;X_SSL_CLIENT_DN_Email&quot; header to the value of  the &quot;DN_Email&quot; field in the SSL client certificate. This is the only way I have found to forward to Mongrel the SSL client certifcate values that are of interest to us.&lt;/p&gt;

&lt;p&gt;Now in your controller, to fetch the email of the user connected:&lt;/p&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;&lt;span class='r'&gt;class&lt;/span&gt; &lt;span class='cl'&gt;ApplicationController&lt;/span&gt; &amp;lt; &lt;span class='co'&gt;ActionController&lt;/span&gt;::&lt;span class='co'&gt;Base&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  before_filter &lt;span class='sy'&gt;:ssl_login&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='fu'&gt;ssl_login&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      session[&lt;span class='sy'&gt;:user&lt;/span&gt;] =  &lt;span class='co'&gt;User&lt;/span&gt;.find_by_email(request.env[&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;HTTP_X_SSL_CLIENT_DN_EMAIL&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;])&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='r'&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;If your Mongrel instances are only listening to your local host network interface (think 127.0.0.1), this should be secure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Apache will prevent anybody &lt;strong&gt;not&lt;/strong&gt; having a valid client certificate to even reach your Mongrel instances,&lt;/li&gt;
&lt;li&gt;for the others, Apache sets the email of the certificate in a header and &lt;strong&gt;overwrite&lt;/strong&gt; the header if already present (so client are unable to forge that header),&lt;/li&gt;
&lt;li&gt;assuming a common authentication scheme, if the user email is in your database, he is allowed to connect.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please do note that if a hacker is able to connect to your Mongrel instances via your local host network interface, he can forge the header and pretend to be someone else. But if he has access to your local host interface, you probably are already in big troubles.&lt;/p&gt;

&lt;p&gt;I hope you found this useful, any comments are of course welcome.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-10-17:29</id>
    <published>2006-10-17T18:03:00Z</published>
    <updated>2006-12-11T09:09:36Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/10/17/version-0-2-of-the-cache-test-plugin" rel="alternate" type="text/html"/>
    <title>Version 0.2 of the Cache Test plugin</title>
<content type="html">
            &lt;p&gt;As the title implies, I have released a new version of my &lt;a href='http://blog.cosinux.org/pages/page-cache-test'&gt;cache logic test&lt;/a&gt; plugin.&lt;/p&gt;


	&lt;p&gt;Ok, I must admit I have been a bit motivated by &lt;a href='http://weblog.rubyonrails.org/2006/10/10/testing-page-caching-with-new-plugin'&gt;that&lt;/a&gt; post =P, but anyway, here you are with some new features.&lt;/p&gt;


	&lt;p&gt;First you are now able to check the actions and fragments caching logic: there are four new methods:&lt;/p&gt;


	&lt;p&gt;- assert\_cache\_actions
- assert\_expire\_actions
- assert\_cache\_fragments
- assert\_expire\_fragments&lt;/p&gt;


	&lt;p&gt;They work quite like the corresponding page method, see the &lt;a href='http://www.cosinux.org/~dam/projects/page-cache-test/doc/classes/Cosinux/FragmentCacheTest/Assertions.html'&gt;documentation&lt;/a&gt; for code and examples.&lt;/p&gt;


	&lt;p&gt;I also changed the way page caching test works. The &lt;span class='caps'&gt;API&lt;/span&gt; is still the same, just the internals have changed. Instead of checking that the page&#8217;s cache files are created or removed, I now hijack the ActionController::Base methods so that they records which page are cached or expired. I then use this information in the assertions. No more fiddling with the file system to know if a file is cached or not.&lt;/p&gt;


	&lt;p&gt;And finally, this release comes with some unit test cases.&lt;/p&gt;


	&lt;p&gt;The fragment code seems to be working, but I have no application that makes heavy use of fragments so if you find bug in it or have suggestions, don&#8217;t hesitate to tell me!&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;update&lt;/em&gt;: I think I have a better idea for the &lt;span class='caps'&gt;API&lt;/span&gt; something along the line of&lt;/p&gt;


&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;&lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='fu'&gt;test_caching&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  assert_caching &lt;span class='r'&gt;do&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    get &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;/my/page&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    assert_page_cached &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;/my/page&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;    get &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;/my/action&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    assert_action_cached &lt;span class='sy'&gt;:controller&lt;/span&gt; =&amp;gt; &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;my&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class='sy'&gt;:action&lt;/span&gt; =&amp;gt; &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;action&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;    get &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;/my/fragment&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    assert_fragment_cached &lt;span class='sy'&gt;:controller&lt;/span&gt; =&amp;gt; &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;my&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, &lt;tt&gt;
&lt;/tt&gt;                                            &lt;span class='sy'&gt;:action&lt;/span&gt; =&amp;gt; &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;fragment&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;,&lt;tt&gt;
&lt;/tt&gt;                                            &lt;span class='sy'&gt;:fragment&lt;/span&gt; =&amp;gt; &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;foo&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='r'&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;I&#8217;ve already implemented it, I&#8217;ll wait for some feedback before releasing a new version.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-10-05:28</id>
    <published>2006-10-05T10:21:00Z</published>
    <updated>2006-12-11T09:10:01Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/10/5/testing-ruby-on-rails-page-caching" rel="alternate" type="text/html"/>
    <title>Testing ruby on rails page caching</title>
<content type="html">
            &lt;p&gt;For the new version of &lt;a href='http://isearch.cosinux.org/'&gt;iSearch&lt;/a&gt;, I used the &lt;a href='http://api.rubyonrails.com/classes/ActionController/Caching/Pages.html'&gt;page caching&lt;/a&gt; feature of &lt;a href='http://www.rubyonrails.com/'&gt;Ruby on Rails&lt;/a&gt; a lot. I also needed to refresh those pages when some model where added, updated or deleted, so I needed to use &lt;a href='http://api.rubyonrails.com/classes/ActionController/Caching/Sweeping.html'&gt;cache sweeping&lt;/a&gt; too.&lt;/p&gt;

&lt;p&gt;Now caching is great, but you need to be sure it works, and what's the best thing you can do to make sure it works? Write tests! But here we have a problem, as I could not find any information about page caching testing. So I decided to add some page caching test helpers to my application, and while I'm at it, released them as a &lt;a href='http://blog.cosinux.org/pages/page-cache-test'&gt;plugin&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here, I will explain how the plugin is working. Go to the 
&lt;a href='http://blog.cosinux.org/pages/page-cache-test'&gt;plugin&lt;/a&gt; page if you want more information about how to download, install and use it.&lt;/p&gt;

&lt;p&gt;First let's have a look at the &lt;a href='http://www.cosinux.org/~dam/projects/page-cache-test/page_cache_test/init.rb'&gt;init.rb&lt;/a&gt; file:&lt;/p&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;&lt;span class='r'&gt;if&lt;/span&gt; &lt;span class='co'&gt;RAILS_ENV&lt;/span&gt; == &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;test&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  require &lt;span class='s'&gt;&lt;span class='dl'&gt;'&lt;/span&gt;&lt;span class='k'&gt;page_cache_test&lt;/span&gt;&lt;span class='dl'&gt;'&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='co'&gt;Test&lt;/span&gt;::&lt;span class='co'&gt;Unit&lt;/span&gt;::&lt;span class='co'&gt;TestCase&lt;/span&gt;.class_eval &lt;span class='r'&gt;do&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    include &lt;span class='co'&gt;Cosinux&lt;/span&gt;::&lt;span class='co'&gt;PageCacheTest&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='r'&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;On line 1, we make sure that we are in the test environment so we don't interfere with other environments. If it is the case, we first load the &lt;a href='http://www.cosinux.org/~dam/projects/page-cache-test/page_cache_test/lib/page_cache_test.rb'&gt;page_cache_test.rb&lt;/a&gt; file on line 2. Then we include the module &lt;tt&gt;Cosinux::PageCacheTest&lt;/tt&gt; in the &lt;tt&gt;Test::Unit::TestCase&lt;/tt&gt; on line 4 to 6.&lt;/p&gt;

&lt;p&gt;Now let's go in the &lt;a href='http://www.cosinux.org/~dam/projects/page-cache-test/page_cache_test/lib/page_cache_test.rb file'&gt;page_cache_test.rb&lt;/a&gt; and see what happens when the &lt;tt&gt;Cosinux::PageCacheTest&lt;/tt&gt; module is included.&lt;/p&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;&lt;span class='r'&gt;module&lt;/span&gt; &lt;span class='cl'&gt;Cosinux::PageCacheTest&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='pc'&gt;self&lt;/span&gt;.included(base)&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='co'&gt;ActionController&lt;/span&gt;::&lt;span class='co'&gt;Base&lt;/span&gt;.public_class_method &lt;span class='sy'&gt;:page_cache_path&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='co'&gt;ActionController&lt;/span&gt;::&lt;span class='co'&gt;Base&lt;/span&gt;.perform_caching = &lt;span class='pc'&gt;true&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='r'&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;The method &lt;tt&gt;self.included&lt;/tt&gt; on line two, defined in the  &lt;tt&gt;Module&lt;/tt&gt; class is executed each time a module is included. So here it is executed because of the include we've just seen in the  &lt;a href='http://www.cosinux.org/~dam/projects/page-cache-test/page_cache_test/init.rb'&gt;init.rb&lt;/a&gt; file.&lt;/p&gt;

&lt;p&gt;In this method,  on line 3, we change the visibility of the method &lt;tt&gt;page_cache_path&lt;/tt&gt; of &lt;tt&gt;ActionController::Base&lt;/tt&gt; so that we can use it in our assertions. The method is used to get the path of the cached file for a url.&lt;/p&gt;

&lt;p&gt;Then, on line 4, we ensure that caching is enabled (it is normally disabled in the test environment).&lt;/p&gt;

&lt;p&gt;So were are we now ? We included the &lt;tt&gt;Cosinux::PageCacheTest&lt;/tt&gt; module in the &lt;tt&gt;Test::Units::TestCase&lt;/tt&gt; class so each method defined in the module is available in the class. There are two instance methods defined in the module:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;tt&gt;assert_cache&lt;/tt&gt;,&lt;/li&gt;
&lt;li&gt;and &lt;tt&gt;assert_expire&lt;/tt&gt;. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's have a look at both of them.&lt;/p&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;15&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;&lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='fu'&gt;assert_cache&lt;/span&gt;(*urls)&lt;tt&gt;
&lt;/tt&gt;  silence &lt;span class='r'&gt;do&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    urls.each &lt;span class='r'&gt;do&lt;/span&gt; |url|&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='co'&gt;ActionController&lt;/span&gt;::&lt;span class='co'&gt;Base&lt;/span&gt;.expire_page(url)&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;if&lt;/span&gt; block_given?&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='r'&gt;yield&lt;/span&gt; *urls&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;else&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    urls.each { |url| get url }&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;  urls.each &lt;span class='r'&gt;do&lt;/span&gt; |url|&lt;tt&gt;
&lt;/tt&gt;    assert_block(&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;url.inspect&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; is not &lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; +&lt;tt&gt;
&lt;/tt&gt;                         &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;cached after executing block&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;) &lt;span class='r'&gt;do&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='co'&gt;File&lt;/span&gt;.exists? page_cache_path(url)&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='r'&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;First, on line 3 to 5, we ensure that the urls we are checking are not in cache by expiring them on line 4. We also make sure that no message is logged by using the &lt;tt&gt;silence&lt;/tt&gt; method which is defined at the end of the file. &lt;/p&gt;

&lt;p&gt;Then, on line 8 and 9, if a block is given, we execute it, giving it the urls as arguments. Otherwise, on line 11, we execute a get request on each of the given urls.&lt;/p&gt;

&lt;p&gt;Finaly, on line 14 to 18, we make sure that the urls are cached by checking that the corresponding files exists on the file system.&lt;/p&gt;

&lt;p&gt;Now to the other method.&lt;/p&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;15&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;&lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='fu'&gt;assert_expire&lt;/span&gt;(*urls)&lt;tt&gt;
&lt;/tt&gt;  silence &lt;span class='r'&gt;do&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    urls.each &lt;span class='r'&gt;do&lt;/span&gt; |url|&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='co'&gt;ActionController&lt;/span&gt;::&lt;span class='co'&gt;Base&lt;/span&gt;.cache_page(&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;testing&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, url)&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;yield&lt;/span&gt; *urls&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;  urls.each &lt;span class='r'&gt;do&lt;/span&gt; |url|&lt;tt&gt;
&lt;/tt&gt;    assert_block(&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;url.inspect&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; is cached&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; +&lt;tt&gt;
&lt;/tt&gt;                         &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt; after executing block&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;) &lt;span class='r'&gt;do&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      ! &lt;span class='co'&gt;File&lt;/span&gt;.exists? page_cache_path(url)&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='r'&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;As you can see, it looks quite the same, excepts a few things.&lt;/p&gt;

&lt;p&gt;First it makes sure that the urls are cached by writing &quot;testing&quot; in the corresponding files on line 4.&lt;/p&gt;

&lt;p&gt;Then we always execute a block, so that the user can take some actions that should make the urls expire, like triggering an action which defines a sweeper.&lt;/p&gt;

&lt;p&gt;And finally, on line 12, we assert that the files corresponding to the urls do not exists anymore.&lt;/p&gt;

&lt;p&gt;That's it. I hope this will explain how this small plugin work and that it will help somebody. Next time, I will write about my experiments with a plugin to create multiple page forms.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-10-03:27</id>
    <published>2006-10-03T18:02:00Z</published>
    <updated>2008-05-08T15:30:03Z</updated>
    <category term="C'est la vie"/>
    <category term="Famille"/>
    <category term="Fran&#231;ais"/>
    <link href="http://blog.cosinux.org/2006/10/3/un-petit-fr&#232;re-ou-une-petite-soeur" rel="alternate" type="text/html"/>
    <title>Un petit fr&#232;re ou une petite soeur ?</title>
<content type="html">
            &lt;p&gt;Ca fait de nouveau longtemps que je n'ai plus donné de nouvelles. En fait, vu que je rentre tout les jours vers 19h30, je n'ai pas trop le temps de blogger.&lt;/p&gt;

&lt;p&gt;Pour ceux qui ne sont pas encore au courant (si il y en a encore), Chrystelle attend famille et nous espérons avoir un petit frère ou une petite soeur pour Suzanne aux environs de début mai. Jusqu'ici, tout va bien, Chrystelle est juste un peu fatiguée.&lt;/p&gt;

&lt;p&gt;Le week-end passé, nous sommes allés à Walibi avec la famille: papa, maman, ma soeur, mon frère, Sophie, Chrystelle, Suzanne, Julien, ma filleule et moi. La journée a été excellente, et je n'ai même pas été malade bien que Julien nous ait obligé à aller sur le Dalton Terror, un bazar qui tombe de très haut très vite et qui vous met le coeur dans les cheveux.&lt;/p&gt;

&lt;p&gt;Ca c'est pour dimanche. Samedi, c'était notre dernier passage en tant qu'assistants d'unité au scout à Fexhe. Après presque 10 ans dans l'unité, je lève le pied. Toutes ces années ont été terribles (dans le bon sens) et je remercie tout les gens que j'ai croisé grâce aux scouts. Et bonne m**** pour la suite à l'unité Zénon Sacré!&lt;/p&gt;

&lt;p&gt;Le week-end encore avant, je suis allé sauter en parachutte avec mon frère. Expérience réussie, sensation extraordinaire. Je vais voir ce que je peux faire pour mettre la video sur le web. En attendant, mon frère a quelques &lt;a href='http://www.flickr.com/photos/76639518@N00/'&gt;photos&lt;/a&gt;. Il ne reste plus qu'à trouver 1200€ pour passer le brevet ;)&lt;/p&gt;

&lt;p&gt;En parlant de photo, il m'en reste un paquet à mettre sur le web, je vais essayer de faire ça un de ses quatres.&lt;/p&gt;

&lt;p&gt;En vous souhaitant bien le bonsoir,&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-10-03:26</id>
    <published>2006-10-03T17:52:00Z</published>
    <updated>2008-05-08T15:29:39Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/10/3/new-isearch-version" rel="alternate" type="text/html"/>
    <title>new iSearch version</title>
<content type="html">
            &lt;p&gt;I have updated my index search engine, you can see (and use) the results at &lt;a href='http://isearch.cosinux.org/'&gt;http://isearch.cosinux.org/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What's new ?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it uses &lt;a href='http://ferret.davebalmain.com/trac'&gt;Ferret&lt;/a&gt; to search the links, so you can use ferret search syntax, and search is quicker,&lt;/li&gt;
&lt;li&gt;it uses &lt;a href='http://code.whytheluckystiff.net/hpricot/'&gt;Hpricot&lt;/a&gt; to extract the links from the index so you can extract only the needed links,&lt;/li&gt;
&lt;li&gt;and I hope it has a better look.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have created to plugin for this project that I will release one I find the time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a plugin to creates multiple page form,&lt;/li&gt;
&lt;li&gt;and a plugin to test page caching.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'll try to blog about that soon.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-09-27:25</id>
    <published>2006-09-27T10:16:00Z</published>
    <updated>2006-12-11T09:11:28Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/9/27/microformats" rel="alternate" type="text/html"/>
    <title>Microformats</title>
<content type="html">
            &lt;p&gt;Have you heard of &lt;a href='http://www.microformats.org/'&gt;microformats&lt;/a&gt; ? &lt;/p&gt;

&lt;p&gt;Microformats are usings predefined XHTML snippets to show common elements in web pages. For example to display a contact, you could use the &lt;a href='http://microformats.org/wiki/hcard'&gt;hCard&lt;/a&gt; which allow you to represent a vCard (like those used in most email tools).&lt;/p&gt;

&lt;p&gt;Why do that ? The hope is that in the near future, you will be able for example to drag and drop a contact on a web page directly into your contact manager application.&lt;/p&gt;

&lt;p&gt;I think I will try to follow those recommendation, so that when the day has come, I will be microformats ready!&lt;/p&gt;

&lt;p&gt;UPDATE: the day has already come, (technorati)[http://technorati.com/contacts/] has a small web application that converts and hCard to a vCard and allows your browser to download it and add it to your contact manager.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-09-01:24</id>
    <published>2006-09-01T10:29:00Z</published>
    <updated>2006-12-11T09:11:44Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/9/1/quick-ruby-on-rails-tip" rel="alternate" type="text/html"/>
    <title>Quick Ruby on Rails tip</title>
<content type="html">
            &lt;p&gt;For one of my project, I have a &lt;code&gt;Project&lt;/code&gt; model where project are referenced by their, hum..., reference. I use this reference to create nice URL like &lt;code&gt;/project/myproj&lt;/code&gt;. The referenced is stored in the database in upper case so I always needed to use project.reference.downcase in the &lt;code&gt;link_to&lt;/code&gt; or &lt;code&gt;url_for&lt;/code&gt; methods. &lt;/p&gt;

&lt;p&gt;I just found out that if you define a to_param method for an object. This method will be called when the object is given as a parameter for a URL. So I added&lt;/p&gt;

&lt;pre&gt;
def to_param
  reference.downcase
end
&lt;/pre&gt;

&lt;p&gt;And now I can use &lt;code&gt;url_for(:controller =&gt; &quot;project&quot;, :reference =&gt; project)&lt;/code&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-08-09:23</id>
    <published>2006-08-09T12:20:00Z</published>
    <updated>2006-12-11T09:12:09Z</updated>
    <category term="C'est la vie"/>
    <category term="Fran&#231;ais"/>
    <link href="http://blog.cosinux.org/2006/8/9/les-photos-de-l-islande" rel="alternate" type="text/html"/>
    <title>Les photos de l'Islande</title>
<content type="html">
            &lt;p&gt;Il est temps de donner des nouvelles.&lt;/p&gt;

&lt;p&gt;Pour ceux qui ne le savent pas, je suis parti en Islande pour le boulot du 9 au 12 juillet. Les photos sont sur &lt;a href='http://www.flickr.com/photos/cosinux/tags/iceland/'&gt;Flickr&lt;/a&gt;. L'Islande est un pays ... surprenant. Très beau mais moins vert que ce à quoi je m'attendais. Très caillouteux avec bien sûr des volcans partout, de l'eau qui bout au milieu de nulle part et du soleil à minuit. C'est d'ailleur grâce à ce dernier que nous avons pu faire une excursion le mardi soir, jusqu'à une heure du matin, les journées étant bien occupées par les meetings.&lt;/p&gt;

&lt;p&gt;Ensuite, le 21 juillet, nous sommes allés avec la jeep des parents rendre visite au camp scout. De Clermont jusqu'a Vielsalm par les petits chemins, sous le soleil et les cheveux aux vent. Le camp était bien situé et tout avait l'air de bien se passer, sous un soleil de plomb. Et non, on n'a pas passé l'après-midi à boire des bières.&lt;/p&gt;

&lt;p&gt;Le samedi 29, on a enterré la vie de garçon de Galago. Là aussi on a rien bu (si si, je vous le jure). La journée a commencé sur le parking Ikea où le preu chevalier Galago a dû se faire fabriquer son épée. Ensuite, nous avons pris l'apéro chez Blanche (de l'eau avec de la menthe). Nous avons dîné avec un sympathique barbecue dans une sympathique maison de Clermont. Maison au demeurant très jolie et entièrement rénovée avec une très belle terrasse. Ensuite nous avons pris la direction de Herve pour aller voir l'arrivée du Ravel, puis retour chez Blanche et enfin, direction la super soirée mega-dance-tour-de-la-mort-que-c'était-bien-surtout-la-musique, où, heureusement pour nous, il y avait aussi un bar. N'oubliez pas de me demander de vous raconter l'une ou l'autre anecdote au sujet de la fin de soirée, celle-ci s'étant avérée assez cocasse voire épique.&lt;/p&gt;

&lt;p&gt;Enfin, le week-end passé a été bien rempli. Vendredi soir, petite soirée entre amis avec mon frère, Sophie, Pinpin, Victor, Seb, Chrystelle et Suzanne. On a été manger des boulettes chez Tchantchès puis boire un verre au Pot et non, je n'ai rien bu (même si c'est contradictoire). &lt;/p&gt;

&lt;p&gt;Samedi c'était le mariage de Laurence et Galago. On est rentré à 5h30 du matin et non, je n'ai rien bu. Le mariage était très réussi et comme je leur ai déjà dis, je suis très heureux pour eux. Je leur souhaite tout le bonheur du monde, pour aujourd'hui comme pour demain, que leur chemin évite les bombes et qu'ils vivent d'amour au quotidien (si c'est de moi).&lt;/p&gt;

&lt;p&gt;Enfin, le dimanche était consacré à la fête à Clermont. Soleil et musique, avec mes parents, mon parrain et Claire, Chri et Oli, Fred et Seb, et Chrystelle et Suzanne. Je me suis visiblement fait remarquer à la soirée de la semaine précédente, ceusses de la jeunesse que je connais avait l'air fort tracassé de mon état. Qu'ils se rassurent, elle s'est très bien terminée (la soirée) (hum hum).&lt;/p&gt;

&lt;p&gt;Maintenant un petit mot de Suzanne avant de poursuivre:&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;cxcsdec rrrrrrrrrrzcdbgtbvg ff dfdððð    bvv+ hg   vvvvvvvvvvvvvvvvvvv&amp;amp;qéz&amp;amp;ssssssssssssSSSSsss &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Hoouuuuu s'est mignooooonnnnnn.&lt;/p&gt;

&lt;p&gt;Poursuivons. &lt;/p&gt;

&lt;p&gt;Ah oui, fête à Clermont, puis feu d'artifice très réussi. Je profite de cet espace d'expression qui m'est offert pour remercier les jeunes de Clermont pour ce qu'ils font. C'est un sacré boulot.&lt;/p&gt;

&lt;p&gt;Enfin, au jour d'aujourd'hui, je suis dans mon lit avec une gastro (non pas une gastronome, une entérite). Pour le futur, dimanche c'est le baptême de Suzanne, puis y'a le 15 août, puis le PukklePop, puis Momalia, puis les vacances. Joli programme.&lt;/p&gt;

&lt;p&gt;Et enfin, pour rire, mais en anglais: &lt;a href='http://xkcd.com/comics/centrifugal_force.png'&gt;une petite bd de physique&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Voilà pour les nouvelles. A bientôt.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;MAJ:&lt;/em&gt; Fred me fait aimablement remarquer qu'il se trouvait à la soirée au Pot.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-07-20:22</id>
    <published>2006-07-20T09:58:00Z</published>
    <updated>2006-12-11T09:12:25Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/7/20/javascript-1-7-and-new-features" rel="alternate" type="text/html"/>
    <title>Javascript 1.7 and new features</title>
<content type="html">
            &lt;p&gt;&lt;a href='http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/bonecho-beta1-candidates/rc3/'&gt;Firefox 2.0 beta&lt;/a&gt; is out and it supports javascript 1.7. The main new features of javascript 1.7 seems to be&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the introduction of generators (did you say yield?),&lt;/li&gt;
&lt;li&gt;the let expressions,&lt;/li&gt;
&lt;li&gt;and destructuring assignment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;amongst &lt;a href='http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7'&gt;others&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can read an explanation on the &lt;a href='http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7'&gt;Mozilla developers web site&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I find the generators thing a bit awkward. I find the Ruby one more intuitive. It's like it is used upside down.&lt;/p&gt;

&lt;p&gt;I know the let expression thing from &lt;a href='http://en.wikipedia.org/wiki/Lisp_programming_language'&gt;Lisp&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;The destructuring assignment is a nice addition to javascript and allow you to do things like&lt;/p&gt;

&lt;pre&gt;[ a, b ] = function_returning_array()&lt;/pre&gt;

&lt;p&gt;Hopefully, these will make programming javascript a bit more intuitive. Let's hope Microsoft will integrate the technology in Internet Explorer 7.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-06-27:21</id>
    <published>2006-06-27T13:25:00Z</published>
    <updated>2006-12-11T09:12:49Z</updated>
    <category term="Famille"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/6/27/le-gouvernement-belge-pour-les-standards-ouverts" rel="alternate" type="text/html"/>
    <title>Le gouvernement belge pour les standards ouverts</title>
<content type="html">
            &lt;p&gt;Lors du dernier conseil des ministres, le gouvernement a adopté la note sur l'utilisation des standards ouverts pour la confection et l'échange de documents bureautiques.&lt;/p&gt;

&lt;p&gt;En d'autre mots, les documents burautiques créés par nos administrations devront être au format &lt;a href='http://fr.wikipedia.org/wiki/ODF'&gt;ODF&lt;/a&gt;. Ce format, qui a été validé par l'&lt;a href='http://www.iso.org/'&gt;organisation internationale pour la standardisation (ISO)&lt;/a&gt; , est un format basé sur &lt;a href='http://fr.wikipedia.org/wiki/XML'&gt;XML&lt;/a&gt;. Autrement dit, il s'agit d'un format que tout le monde peut lire ou écrire, contrairement au format &lt;tt&gt;DOC&lt;/tt&gt; utilisé par la suite Office de Microsoft par exemple.&lt;/p&gt;

&lt;p&gt;Pourquoi est-ce intéressant ?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Les documents administratifs doivent être accessible par tout le monde. Un format ouvert et standard en est la garantie.&lt;/li&gt;
&lt;li&gt;L'utilisation d'un standard garantit l'interopérabilité entre les différents utilisateurs. Avec un format non standard, je suis obligé d'acheter l'application qui sait le lire.&lt;/li&gt;
&lt;li&gt;Il existe un logiciel libre, &lt;a href='http://www.openoffice.org/'&gt;OpenOffice&lt;/a&gt; qui gère ce format. Ce logiciel est entièrement gratuit, possède la majorité des fonctionalités de MS Office et sait aussi lire les documents Word, Excel, etc.&lt;/li&gt;
&lt;li&gt;Si Microsoft décide de changer de format de fichier (souvenez-vous du passage de Office 1997 à Office 2000), vous êtes obligés d'acheter une nouvelle version du produit pour éditer vos documents.&lt;/li&gt;
&lt;li&gt;Cela devrait promouvoir l'utilisation des &lt;a href='http://fr.wikipedia.org/wiki/Logiciel_libre'&gt;logiciels libres&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Liens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;le &lt;a href='http://www.belgium.be/eportal/application?origin=searchResults.jsp&amp;amp;event=bea.portal.framework.internal.refresh&amp;amp;pageid=contentPage&amp;amp;docId=42769'&gt;communiqué&lt;/a&gt; sur le site du gouvernement,&lt;/li&gt;
&lt;li&gt;l'&lt;a href='http://it.slashdot.org/article.pl?sid=06/06/26/1052231'&gt;annonce&lt;/a&gt; sur &lt;a href='http://slashdot.org/'&gt;Slashdot&lt;/a&gt; en anglais.&lt;/li&gt;
&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-06-26:20</id>
    <published>2006-06-26T11:55:00Z</published>
    <updated>2006-12-11T09:13:17Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/6/26/rails-history-0-2" rel="alternate" type="text/html"/>
    <title>Rails History 0.2</title>
<content type="html">
            &lt;p&gt;I've just release a new version of my Ruby On Rails &lt;a href='/pages/rails-history'&gt;history plugin&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;It fixes a bug where a user variable was stored in a class variable instead of a session one so a user going back would make another one skip a page in its history. &lt;/p&gt;

&lt;p&gt;It now doesn't store &lt;tt&gt;PUT&lt;/tt&gt; and &lt;tt&gt;DELETE&lt;/tt&gt; request.&lt;/p&gt;

&lt;p&gt;It adds a new method &lt;tt&gt;peek_last_location&lt;/tt&gt; to look at the history without modifying it, and a &lt;tt&gt;force&lt;/tt&gt; parameter to the &lt;tt&gt;store_location&lt;/tt&gt; method to force storing of a location even if it would normally be skipped (being a post request for example).&lt;/p&gt;

&lt;p&gt;See the &lt;a href='http://www.cosinux.org/~dam/projects/rails-history/rails_history/doc/files/CHANGELOG.html'&gt;changelog&lt;/a&gt; for the full details or download the new release &lt;a href='http://www.cosinux.org/~dam/projects/rails-history/rails_history-0.2.tar.bz2'&gt;here&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-06-25:19</id>
    <published>2006-06-25T12:56:00Z</published>
    <updated>2006-12-11T09:13:37Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/6/25/interview-of-css-author-h&#229;kon-wium-lie" rel="alternate" type="text/html"/>
    <title>Interview of CSS author H&#229;kon Wium Lie</title>
<content type="html">
            &lt;p&gt;&lt;a href='http://www.slashdot.org/'&gt;Slashdot&lt;/a&gt; has a nice interview of the men behind CSS, &lt;a href='http://people.opera.com/howcome/'&gt;Håkon Wium Lie&lt;/a&gt;. If you don't know why we can't make a simple two column layout in pure CSS, &lt;a href='http://interviews.slashdot.org/article.pl?sid=06/06/23/1443203'&gt;read on&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-06-13:18</id>
    <published>2006-06-13T14:36:00Z</published>
    <updated>2006-12-11T09:14:02Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/6/13/emacs-and-ruby-on-rails" rel="alternate" type="text/html"/>
    <title>Emacs and Ruby on Rails</title>
<summary type="html">&lt;p&gt;For those who, like me, are &lt;a href='http://www.gnu.org/software/emacs/'&gt;emacs&lt;/a&gt; maniacs and Ruby on Rails enthusiasts, here are some tips about using your favourite editor with your favourite web framework.&lt;/p&gt;

&lt;p&gt;First, install the &lt;a href='http://rubyforge.org/projects/emacs-rails/'&gt;emacs-rails&lt;/a&gt; mode. It is fully featured with things like &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;switching from controller to related view or helper,&lt;/li&gt;
&lt;li&gt;script/generator integration,&lt;/li&gt;
&lt;li&gt;console and breakpointer integration,&lt;/li&gt;
&lt;li&gt;completion,&lt;/li&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href='http://rubyforge.org/plugins/scmsvn/viewcvs.php/trunk/README?root=emacs-rails&amp;amp;view=markup'&gt;See them all&lt;/a&gt; by yourself.&lt;/p&gt;

&lt;p&gt;Then you will appreciate the &lt;a href='http://cvs.xemacs.org/viewcvs.cgi/XEmacs/packages/xemacs-packages/prog-modes/javascript-mode.el'&gt;javascript&lt;/a&gt; , &lt;a href='http://www.garshol.priv.no/download/software/css-mode/'&gt;css&lt;/a&gt; and the &lt;a href='http://clouder.jp/src/elisp/yaml-mode-0.01.tar.gz'&gt;yaml&lt;/a&gt; mode.&lt;/p&gt;

&lt;p&gt;And finally, install the &lt;a href='http://mmm-mode.sourceforge.net/'&gt;mmm&lt;/a&gt; mode to ease edition of rhtml templates.&lt;/p&gt;

&lt;p&gt;As a bonus, you can have my emacs-rails reference card in &lt;a href='/~dam/files/emacs-rails-quick-ref.ods'&gt;openoffice spreadsheet&lt;/a&gt; or in &lt;a href='/~dam/files/emacs-rails-quick-ref.pdf'&gt;pdf&lt;/a&gt; format.&lt;/p&gt;

&lt;p&gt;Read on to see the content of my emacs.el related to those modes.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;For those who, like me, are &lt;a href='http://www.gnu.org/software/emacs/'&gt;emacs&lt;/a&gt; maniacs and Ruby on Rails enthusiasts, here are some tips about using your favourite editor with your favourite web framework.&lt;/p&gt;

&lt;p&gt;First, install the &lt;a href='http://rubyforge.org/projects/emacs-rails/'&gt;emacs-rails&lt;/a&gt; mode. It is fully featured with things like &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;switching from controller to related view or helper,&lt;/li&gt;
&lt;li&gt;script/generator integration,&lt;/li&gt;
&lt;li&gt;console and breakpointer integration,&lt;/li&gt;
&lt;li&gt;completion,&lt;/li&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href='http://rubyforge.org/plugins/scmsvn/viewcvs.php/trunk/README?root=emacs-rails&amp;amp;view=markup'&gt;See them all&lt;/a&gt; by yourself.&lt;/p&gt;

&lt;p&gt;Then you will appreciate the &lt;a href='http://cvs.xemacs.org/viewcvs.cgi/XEmacs/packages/xemacs-packages/prog-modes/javascript-mode.el'&gt;javascript&lt;/a&gt; , &lt;a href='http://www.garshol.priv.no/download/software/css-mode/'&gt;css&lt;/a&gt; and the &lt;a href='http://clouder.jp/src/elisp/yaml-mode-0.01.tar.gz'&gt;yaml&lt;/a&gt; mode.&lt;/p&gt;

&lt;p&gt;And finally, install the &lt;a href='http://mmm-mode.sourceforge.net/'&gt;mmm&lt;/a&gt; mode to ease edition of rhtml templates.&lt;/p&gt;

&lt;p&gt;As a bonus, you can have my emacs-rails reference card in &lt;a href='/~dam/files/emacs-rails-quick-ref.ods'&gt;openoffice spreadsheet&lt;/a&gt; or in &lt;a href='/~dam/files/emacs-rails-quick-ref.pdf'&gt;pdf&lt;/a&gt; format.&lt;/p&gt;

&lt;p&gt;Read on to see the content of my emacs.el related to those modes.&lt;/p&gt;
&lt;pre&gt;
;;;
;; css mode
(setq cssm-indent-function 'cssm-c-style-indenter)

;;;
;; mmm mode for editing rhtml files
(require 'mmm-mode)
(require 'mmm-auto)
(setq mmm-global-mode 'maybe)
(setq mmm-submode-decoration-level 2)
(set-face-background 'mmm-output-submode-face  &quot;LemonChiffon2&quot;)
(set-face-background 'mmm-code-submode-face    &quot;LavenderBlush2&quot;)
(set-face-background 'mmm-comment-submode-face &quot;tan1&quot;)
(set-face-foreground 'mmm-output-submode-face &quot;Black&quot;)
(set-face-foreground 'mmm-code-submode-face &quot;Black&quot;)
(set-face-foreground 'mmm-comment-submode-face &quot;Red&quot;)
(mmm-add-classes
 '((erb-code
    :submode ruby-mode
    :match-face ((&quot;&amp;lt;%#&quot; . mmm-comment-submode-face)
                 (&quot;&amp;lt;%=&quot; . mmm-output-submode-face)
                 (&quot;&amp;lt;%&quot;  . mmm-code-submode-face))
    :front &quot;&amp;lt;%[#=]?&quot; 
    :back &quot;%&gt;&quot; 
    :insert ((?% erb-code       nil @ &quot;&amp;lt;%&quot;  @ &quot; &quot; _ &quot; &quot; @ &quot;%&gt;&quot; @)
             (?# erb-comment    nil @ &quot;&amp;lt;%#&quot; @ &quot; &quot; _ &quot; &quot; @ &quot;%&gt;&quot; @)
             (?= erb-expression nil @ &quot;&amp;lt;%=&quot; @ &quot; &quot; _ &quot; &quot; @ &quot;%&gt;&quot; @))
    )))
(add-hook 'html-mode-hook
          (lambda ()
            (setq mmm-classes '(erb-code))
            (mmm-mode-on)))
(add-to-list 'auto-mode-alist '(&quot;\\.rhtml$&quot; . html-mode))

;;;
;; yaml mode
(autoload 'yaml-mode &quot;yaml-mode&quot; &quot;YAML&quot; t)
(setq auto-mode-alist
      (append '((&quot;\\.yml$&quot; . yaml-mode)) auto-mode-alist))

;;;
;; rails mode
(defun try-complete-abbrev (old)
  (if (expand-abbrev) t nil))

(setq hippie-expand-try-functions-list
      '(try-complete-abbrev
    try-complete-file-name
    try-expand-dabbrev))

(require 'rails)
(setq rails-use-mongrel t)
&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-06-02:17</id>
    <published>2006-06-02T09:21:00Z</published>
    <updated>2006-12-11T09:14:26Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/6/2/dissecting-the-rails-history-plugin-or-a-little-metaprogramming-by-example" rel="alternate" type="text/html"/>
    <title>Dissecting the Rails History plugin, or a little metaprogramming by example</title>
<content type="html">
            &lt;p&gt;&lt;a href='http://advogato.org/person/fxn/'&gt;Xavier Noria&lt;/a&gt; has written an article on one of the cool features of Ruby, &lt;a href='http://en.wikipedia.org/wiki/Metaprogramming'&gt;metaprogramming&lt;/a&gt;. He does so by looking through the source code of my &lt;a href='http://blog.cosinux.org/pages/rails-history'&gt;Rails History&lt;/a&gt; plugin. &lt;/p&gt;

&lt;p&gt;Have a look at his &lt;a href='http://advogato.org/person/fxn/diary.html'&gt;blog&lt;/a&gt; for the &lt;a href='http://advogato.org/person/fxn/diary.html?start=441' title='Dissecting the Rails History plugin, or a little metaprogramming by example'&gt;article&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-06-01:16</id>
    <published>2006-06-01T20:55:00Z</published>
    <updated>2006-12-11T09:24:13Z</updated>
    <category term="C'est la vie"/>
    <category term="Famille"/>
    <category term="Fran&#231;ais"/>
    <link href="http://blog.cosinux.org/2006/6/1/suzanne-prend-son-bain" rel="alternate" type="text/html"/>
    <title>Suzanne prend son bain</title>
<content type="html">
            Dans la série c'est mignon tout plein, notre petite Suzanne se tient toute seule dans son bain et nous fait des grands sourires:

&amp;lt;center&gt;
&lt;img src='http://www.cosinux.org/photos/2006/06/01/suzanne-dans-le-bain/mq/PICT0002%20(Modifi%C3%A9).JPG' alt='Suzanne sourit dans son bain' /&gt;

Les autres photos ce trouvent [
&lt;a href='http://www.cosinux.org/photos/2006/06/01/suzanne-dans-le-bain'&gt;ici&lt;/a&gt;
&amp;lt;/center&gt;


Le week-end passé étant un long week-end, nous sommes partis à la dernière minute (pourquoi s'organiser à l'avance mmm?) à &lt;a href='http://www.ville-wissant.fr/'&gt;Wissant&lt;/a&gt; en France dans le Nord-Pas-De-Calais. C'est à 350 km de Clermont, mais ça vaut le détour. Rien à voir avec la côte belge (ormis la Stella). Dès que j'aurai copié les photos, je raconterai l'épopée un peu plus en détails.
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-05-21:15</id>
    <published>2006-05-21T13:10:00Z</published>
    <updated>2008-06-20T09:03:26Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/5/21/barcamp-is-behind-us" rel="alternate" type="text/html"/>
    <title>Barcamp is behind us</title>
<content type="html">
            &lt;p&gt;So yersteday was Brussel's Barcamp day. I had a good day, meeting Belgian Rails developer, notably the two people of &lt;a href='http://www.shoob.com/'&gt;shoob&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;I first assisted at Denis Lamotte presentation of Ruby on Rails. It was a well done quick tour of the main ROR features, it just lacked a bit of examples.&lt;/p&gt;

&lt;p&gt;Then I went to see Denis Balencourt &amp;amp; Clo Willaert talking about History &amp;amp; Future of the web. The history part was mostly things I know like the birth of the net, the Amazon revolution, Slashdot, and events all the way up to today. It was nevertheless quite interesting. The second part was about the future of the net. Interesting ideas but the thing with predicting future trends is that you never know when a big revolution will occurs, nor what those revolutions will be about, so maybe in two month from know all those predictions will prove false. All in all, it was a good presentation, although I most enjoyed the first part.&lt;/p&gt;

&lt;p&gt;The next presentation I saw was from Frank Lauwers about Hosting Web 2.0. He explained the current trends in web hosting, most notably that as web application are evolving, the customers need switched from disk space and bandwith to CPU and RAM. CPU is now the barrier on how much host you can put on a same server. He then explained that today, their problem is that customer still want to pay for space and bandwidth and that they are having a hard time getting paid for CPU time. He then went onto debatting with us about the specific needs of Web 2.0 developer. It was enlightening to hear a hardware guy and a nice presentation.&lt;/p&gt;

&lt;p&gt;Bruno Peeters, Measuring web sites was the next presentation. He talked about ways of measuring blog influence on the web. He first explaind the criteria that can be used for measuring influence and then listed some of the existing solutions. Has I am more of a technical guy, this presentation was less interesting to me.&lt;/p&gt;

&lt;p&gt;I then went on with Top of the Pops in Ruby, Peter Forret's presentation. He showed the application he had developped, and explained where ruby helped him. His application is grabbing playlists from &lt;a href='http://www.stubru.be/'&gt;Studio Brussel&lt;/a&gt; and make statistics out of them. I think he has a good idea, but he will shortly have IP problems.&lt;/p&gt;

&lt;p&gt;Then François Lamotte &amp;amp; Denis Balencourt demonstrated their system for leaving audio comments on a Typo blog. It's a nice example of integration of Ruby on Rails and Asterisk, but I don't see myself phoning to a server to leave a comment on a blog. But it surely serves as a demonstration of OpenSource technologies integration and the innovations they allow.&lt;/p&gt;

&lt;p&gt;The last thing I saw was &quot;A RubyOnRails application for a broadcast company: success factors and lessons learned&quot; by Alain Ravet. Alain showed us the contact management application he created for the &lt;a href='http://www.vrt.be/'&gt;VRT&lt;/a&gt;. A great example of agile development with Rails. He then explained us what he has learned from his project. It was a really interesting talk as it is one of the few project I know of in Belgium developed for the enterprise with Ruby On Rails.&lt;/p&gt;

&lt;p&gt;We then had a drink with all the Barcampers and that was the end of the day. &lt;/p&gt;

&lt;p&gt;I did not present my talk as I did not think it would interest people. I was going to show the CONNIE web site I've developed, but it's just another web site. The only interesting thing is that it is made with Rails, and that it didn't took long to create, but that's hard to show in a presentation. The next time, I'll present a more technical topic, diving in some code. As I'm more interested in that kind of thing, I will surely feel more confident in myself.&lt;/p&gt;

&lt;p&gt;All in all, it was a great day. I enjoyed meating Ruby On Rails people and the presentations I saw were all good. We're planning on creating a community around Ruby On Rails developer in Belgium, we'll see how that goes in the next month.&lt;/p&gt;

&lt;p&gt;Last but not least, I have to thank &lt;a href='http://blog.forret.com/'&gt;Peter Forret&lt;/a&gt; for organizing such a nice event.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-04-27:14</id>
    <published>2006-04-27T18:28:00Z</published>
    <updated>2006-12-11T09:15:49Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/4/27/brussels-barcamp" rel="alternate" type="text/html"/>
    <title>Brussels barcamp</title>
<content type="html">
            &lt;p&gt;On the 20th of May will be hold the &lt;a href='http://barcamp.org/BarCampBrusselsForTheImpatient'&gt;Brussels barcamp &lt;/a&gt;. I will be meeting other Belgian rails developers there (and other people too) and I'll be giving a presentation of my work on the CONNIE Belgian Portal.&lt;/p&gt;

&lt;p&gt;The CONNIE Belgian Portal is a web site developed using &lt;a href='http://www.rubyonrails.com/'&gt;RubyOnRails&lt;/a&gt; which use most of the plugins I've developed and has some Web 2.0 features using the great &lt;a href='http://script.aculo.us'&gt;Scriptaculous&lt;/a&gt; javascript library. I'll give a general overview of the portal and then proceed with presentation of the interesting features using Scriptaculous and how I integrate them in RubyOnRails in a way wich makes the site work even without javascript:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the box shading and reordering tool,&lt;/li&gt;
&lt;li&gt;the javascript popup framework,&lt;/li&gt;
&lt;li&gt;the bookmark system.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I might also presents the plugins I've developed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='http://blog.cosinux.org/pages/rails-tidy'&gt;RailsTidy&lt;/a&gt; and&lt;/li&gt;
&lt;li&gt;&lt;a href='http://blog.cosinux.org/pages/rails-history'&gt;History&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I find these thing interesting to present as it shows how extensible the Rails framework is.&lt;/p&gt;

&lt;p&gt;I could also talk about the use of the &lt;a href='http://wiki.globalize-rails.org/wiki/'&gt;Globalize plugin&lt;/a&gt; to allow translation of RoR web applications, as it is particularly usefull in Belgium.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-04-26:13</id>
    <published>2006-04-26T13:01:00Z</published>
    <updated>2006-12-11T09:16:10Z</updated>
    <category term="Fran&#231;ais"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/4/26/google-map" rel="alternate" type="text/html"/>
    <title>Google Map</title>
<content type="html">
            &lt;p&gt;Et bien on dirait que Google Maps c'est mis à l'heure de la Belgique. Voici l'&lt;a href='http://maps.google.com/maps?f=q%40om%3D1&amp;amp;hl=en&amp;amp;q=&amp;amp;t=k&amp;amp;om=1&amp;amp;ll=50.668715,5.884423&amp;amp;spn=0.003203,0.010064'&gt;image satellite de ma maison&lt;/a&gt;.
Enfin plutôt du hameau, ma maison n'est pas si grande ...&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-04-18:12</id>
    <published>2006-04-18T11:41:00Z</published>
    <updated>2006-12-11T09:16:37Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/4/18/railstidy-0-2-released" rel="alternate" type="text/html"/>
    <title>RailsTidy 0.2 released</title>
<content type="html">
            &lt;p&gt;I've just released a new &lt;a href='http://www.cosinux.org/blogs/dam/pages/rails-tidy'&gt;RailsTidy&lt;/a&gt; version. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It adds a better default path for the Tidy dynamic library under MacOSX and Cygwin thanks to Todd Fisher,&lt;/li&gt;
&lt;li&gt;the tasks for testing now use the &lt;tt&gt;test&lt;/tt&gt; namespace wich means you now have to use &lt;tt&gt;rake test:templates&lt;/tt&gt; to validate your templates,&lt;/li&gt;
&lt;li&gt;correct a minor bug.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can download the new version &lt;a href='http://www.cosinux.org/~dam/projects/rails-tidy/rails_tidy-0.2.tar.bz2'&gt;here&lt;/a&gt;. More information can be found on the &lt;a href='http://www.cosinux.org/blogs/dam/pages/rails-tidy'&gt;RailsTidy&lt;/a&gt; page.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-04-13:11</id>
    <published>2006-04-13T13:54:00Z</published>
    <updated>2008-06-20T09:03:08Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/4/13/ubuntu-install-on-sony-vaio-vgn-fs415m" rel="alternate" type="text/html"/>
    <title>Ubuntu install on Sony VAIO VGN-FS415M</title>
<summary type="html">&lt;p&gt;I recently bought a &lt;a href='http://vaio.sony-europe.com/view/ShowProduct.action?product=VGN-FS415M&amp;amp;site=ite_fr_BE&amp;amp;pageType=Overview&amp;amp;category=VN+FS+Series'&gt;Sony VAIO FS415M&lt;/a&gt; laptop. I choose it because &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it's a Sony,&lt;/li&gt;
&lt;li&gt;it was at a moderated price, 1200€,&lt;/li&gt;
&lt;li&gt;wireless chipset is a &lt;a href='http://ipw2200.sourceforge.net/'&gt;Intel PRO 2200BG&lt;/a&gt; which is supported under Linux, &lt;/li&gt;
&lt;li&gt;it has a somewhat wide screen (15.4''),&lt;/li&gt;
&lt;li&gt;video card is an NVidia and&lt;/li&gt;
&lt;li&gt;it looks nice.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For now, I have two drawbacks with it: it lacks TV output and it has only 512Mb of memory. I can't do anything for the first item but buy an adapter, and I won't do that. For the lack of memory, Kingson sells &lt;a href='http://www.ec.kingston.com/ecom/config/modelsinfo.asp?SysID=27172'&gt;compatible modules&lt;/a&gt; priced at about 80€ for a 512Mb module. I think its a good price and their modules have a lifetime waranty, so I'll buy an additional 512Mb mod.&lt;/p&gt;

&lt;p&gt;Read on for my experiments in installing Ubuntu Dapper, XGL and Compiz on it.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;I recently bought a &lt;a href='http://vaio.sony-europe.com/view/ShowProduct.action?product=VGN-FS415M&amp;amp;site=ite_fr_BE&amp;amp;pageType=Overview&amp;amp;category=VN+FS+Series'&gt;Sony VAIO FS415M&lt;/a&gt; laptop. I choose it because &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it's a Sony,&lt;/li&gt;
&lt;li&gt;it was at a moderated price, 1200€,&lt;/li&gt;
&lt;li&gt;wireless chipset is a &lt;a href='http://ipw2200.sourceforge.net/'&gt;Intel PRO 2200BG&lt;/a&gt; which is supported under Linux, &lt;/li&gt;
&lt;li&gt;it has a somewhat wide screen (15.4''),&lt;/li&gt;
&lt;li&gt;video card is an NVidia and&lt;/li&gt;
&lt;li&gt;it looks nice.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For now, I have two drawbacks with it: it lacks TV output and it has only 512Mb of memory. I can't do anything for the first item but buy an adapter, and I won't do that. For the lack of memory, Kingson sells &lt;a href='http://www.ec.kingston.com/ecom/config/modelsinfo.asp?SysID=27172'&gt;compatible modules&lt;/a&gt; priced at about 80€ for a 512Mb module. I think its a good price and their modules have a lifetime waranty, so I'll buy an additional 512Mb mod.&lt;/p&gt;

&lt;p&gt;Read on for my experiments in installing Ubuntu Dapper, XGL and Compiz on it.&lt;/p&gt;
&lt;h3&gt;Ubuntu Dapper installation&lt;/h3&gt;

&lt;p&gt;It's been some time since I choose to install &lt;a href='http://www.ubuntu.com/'&gt;Ubuntu&lt;/a&gt; for my workstations. I keep plain old Debian for my servers. Since Dapper will probably be released in June, I choosed to install it instead of Breezy.&lt;/p&gt;

&lt;p&gt;The install went without a glitch. Networking and wireless were functionnal from the start. I added the line &quot;snd-hda-intel&quot; in /etc/modules to make sound work.&lt;/p&gt;

&lt;p&gt;Configuration of the NVidia video card was as simple as replacing the &quot;nv&quot; driver line in the xorg.conf file with &quot;nvidia&quot; after having followed the instructions in the &lt;a href='http://easylinux.info/wiki/Ubuntu_dapper'&gt;unofficial Ubuntu Dapper guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Having function keys work was a bit more difficult, but I found &lt;a href='http://developer.berlios.de/project/showfiles.php?group_id=4604'&gt;fsfn&lt;/a&gt;&lt;br /&gt;
by searching the forums. You need to compile and install a new version of the &quot;sony_acpi&quot; kernel module and then install the fsfn application. Now all the function keys are working.&lt;/p&gt;

&lt;p&gt;Sleep and hibernate are working too. I had a speed problem when resuming from sleep state. When doing a &quot;echo mem &gt; /sys/acpi/state&quot; everything went quick but when using &quot;/usr/sbin/pmi action sleep&quot;, It took about 150 seconds to come back online. By commenting out lines in /etc/acpi-support/prepare.sh, I found that the &quot;chvt 12&quot; line was causing the lag. For now, I've commented it out and turned on the option to double switch to X in the /etc/default/acpi file. I need to file a bug for that.&lt;/p&gt;

&lt;h3&gt;XGL and Compiz&lt;/h3&gt;

&lt;p&gt;I also could not resist to trying the new XGL and Compiz hype thing. I followed instructions from &lt;a href='http://ubuntuforums.org/showthread.php?t=148351'&gt;this forum thread&lt;/a&gt; . I had just one problem, the screen was garbled. The problem was that the server did not start in 24 bits of color depth mode. So after a quick edit of my xorg.conf file, everything was working. I must say that this XGL and Compiz thing is really nice and it makes the desktop feel very pleasant.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-04-06:10</id>
    <published>2006-04-06T16:47:00Z</published>
    <updated>2008-06-16T15:34:08Z</updated>
    <category term="C'est la vie"/>
    <category term="Famille"/>
    <category term="Fran&#231;ais"/>
    <link href="http://blog.cosinux.org/2006/4/6/qui-voil&#224;-la-petite-suzanne" rel="alternate" type="text/html"/>
    <title>Qui voil&#224; la petite Suzanne ...</title>
<content type="html">
            &lt;p&gt;Et bien, après 9 mois de patience et 12 heures de souffrance comme le dit si bien Marie Laforêt dans sa superbe chanson, Suzanne a daigné pointer le bout de son petit nez (il faut mettre petit devant tout quand on parle d'un bébé). Elle est née le jeudi 30 mars à 20h50. A l'heure ou j'écris ceci, nous sommes de retour à Clermont-Les-Bains-De-Pieds où on essaye de reprendre petit à petit un train de vie normal.&lt;/p&gt;

&lt;p&gt;&amp;lt;center&gt;&lt;a href='http://www.cosinux.org/~dam/photos/2006/03/30/naissance-suzanne/img006.jpeg'&gt;&lt;img src='http://www.cosinux.org/~dam/photos/2006/03/30/naissance-suzanne/img006.jpeg.small.jpeg' alt='Heure H + 30, maman découvre bébé'&gt;&lt;/a&gt;&lt;br /&gt;
Heure H + 30, maman découvre bébé.&amp;lt;/center&gt;&lt;/p&gt;

&lt;p&gt;L'intégrale des photos est &lt;a href='http://www.cosinux.org/~dam/photos/2006/03/30/naissance-suzanne/'&gt;ici&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Déjà un grand merci à tout ceux qui sont passés nous dire coucou à l'hôpital. Puis merci particulièrement au parrain Fred et à Seb pour leur très controversé mais néanmoins très reussi faire-part de naissance. J'essayerai de le scanner et de l'archiver ici pour la postérité. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;MAJ: j'oubliai que c'est aussi sa première apparition sur le web. Pour que Google sache de qui on parle, Suzanne Merenne est la petite fille de Damien Merenne et de Chrystelle Geenen.&lt;/em&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-02-16:9</id>
    <published>2006-02-16T12:29:00Z</published>
    <updated>2006-12-11T09:18:05Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/2/16/isearch-searches-references-on-the-web" rel="alternate" type="text/html"/>
    <title>ISearch: searches references on the web</title>
<content type="html">
            &lt;p&gt;This tool might be usefull to other, so here it is: &lt;a href='/isearch/'&gt;ISearch&lt;/a&gt;. It allows you to search through various references I encoded in it: css, html, rails, ruby,... &lt;/p&gt;

&lt;p&gt;I find it very usefull with a firefox bookmark mapped to a keyword. More info on its &lt;a href='/blogs/dam/pages/isearch'&gt;dedicated page&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-02-15:8</id>
    <published>2006-02-15T13:40:00Z</published>
    <updated>2006-12-11T09:18:43Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/2/15/railstidy" rel="alternate" type="text/html"/>
    <title>RailsTidy</title>
<content type="html">
            &lt;p&gt;I've just published the first version of
RailsTidy.&lt;/p&gt;

&lt;p&gt;RailsTidy is a plugin for &lt;a href='http://www.rubyonrails.com/'&gt;Ruby On Rails&lt;/a&gt;. 
It allows you to&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;validate your rhtml templates,&lt;/li&gt;
&lt;li&gt;validate the html output of your functional tests,&lt;/li&gt;
&lt;li&gt;clean the html generated by rails.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For doing all this, it uses&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='http://tidy.sourceforge.net/'&gt;Tidy&lt;/a&gt;, the popular HTML validator and&lt;/li&gt;
&lt;li&gt;&lt;a href='http://rubyforge.org/projects/tidy'&gt;RubyTidy&lt;/a&gt;, Ruby bindings for Tidy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More on the &lt;a href='/blogs/dam/pages/rails-tidy'&gt;RailsTidy&lt;/a&gt; page.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-02-06:7</id>
    <published>2006-02-06T12:37:00Z</published>
    <updated>2006-12-11T09:19:12Z</updated>
    <category term="Fran&#231;ais"/>
    <category term="Maison"/>
    <link href="http://blog.cosinux.org/2006/2/6/sablage-de-la-maison" rel="alternate" type="text/html"/>
    <title>Sablage de la maison</title>
<content type="html">
            Fin de la semaine passée et ce week-end, les poutres et certains murs de la maison ont été sablés. Voici un aperçu du résultat

&amp;lt;center&gt;
avant sablage&lt;br /&gt;
&lt;a href='http://www.cosinux.org/~dam/photos/2006/02/06/avant-sablage.jpg'&gt;&lt;img src='http://www.cosinux.org/~dam/photos/2006/02/06/avant-sablage.jpg' alt='avant sablage' width='250' /&gt;&lt;/a&gt;

et  après sablage&lt;br /&gt;
&lt;a href='http://www.cosinux.org/~dam/photos/2006/02/06/apres-sablage.jpg'&gt;&lt;img src='http://www.cosinux.org/~dam/photos/2006/02/06/apres-sablage.jpg' alt='avant sablage' width='250' /&gt;&lt;/a&gt;
&amp;lt;/center&gt;

Sur la deuxième photo, on peut voir les pilasses qui portent la dalle de la chambre à l'étage et un petit bout de l'escalier qui monte de la salle à manger vers le salon.

L'étape suivante est maintenant de déterminer ce qu'on va faire avec les planchers du salon et de la cuisine. Soit on bouge tout, on vide la terre qui est au dessus des caves voutées et on coule une chappe légère pour refaire du neuf en plancher ou avec les pierres bleues de la cave, soit on rénove le plancher actuel. A voir...
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-01-24:6</id>
    <published>2006-01-24T13:21:00Z</published>
    <updated>2006-12-11T09:19:34Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/1/24/internet-explorer-on-linux" rel="alternate" type="text/html"/>
    <title>Internet Explorer on Linux</title>
<content type="html">
            &lt;p&gt;I've always found developing web site under Linux much simpler and quicker. I've got my usual tools, scm, etc. The problem is that you always have to check your site on Internet Explorer. You may have two computers or you may be running &lt;a href='http://www.vmware.com/'&gt;VMware&lt;/a&gt; so you can install Windows and check if your site works correctly.&lt;/p&gt;

&lt;p&gt;&lt;a href='http://www.tatanka.com.br/ies4linux/'&gt;Ies4Linux&lt;/a&gt; is the solution to all these problems. It allows you to install Internet Explorer 5.0, 5.5 and 6 on your Linux box using &lt;a href='http://www.winehq.com/'&gt;Wine&lt;/a&gt;. A must have...&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-01-22:5</id>
    <published>2006-01-22T19:51:00Z</published>
    <updated>2006-12-11T09:20:04Z</updated>
    <category term="C'est la vie"/>
    <category term="Fran&#231;ais"/>
    <link href="http://blog.cosinux.org/2006/1/22/londres-et-souper-adi" rel="alternate" type="text/html"/>
    <title>Londres et Souper ADI</title>
<content type="html">
            &lt;h1&gt;Londres&lt;/h1&gt;

&lt;p&gt;Je suis rentré vendredi de Londres. J'ai eu l'occasion de faire un petit tour de la ville, juste assez pour avoir envie d'y retourner en dehors du cadre du boulot. Y'a plus qu'a faire des économies... Par contre il y a encore des problèmes dans les trains en Belgique. Il faut 3h30 pour faire Londres-Bruxelles, mais pour aller de Bruxelles à Liège, il faut encore 1h30 dans un vieux train pas propre. Vive les transports en commun. Quand on sait qu'il faut 40 minutes pour faire le même trajet en voiture, le jour où il n'y aura plus d'usager de la voiture est encore loin.&lt;/p&gt;

&lt;h1&gt;Souper ADI&lt;/h1&gt;

&lt;p&gt;Hier avait lieu le souper d'&lt;a href='http://www.asbl-adi.org/'&gt;ADI&lt;/a&gt;. On a eu 140 souper je pense, ce qui n'est vraiment pas mal.&lt;/p&gt;

&lt;p&gt;&amp;lt;center&gt;&lt;a href='http://www.cosinux.org/~dam/photos/2006/01/21/souper-adi/img021.jpeg'&gt;&lt;img src='http://www.cosinux.org/~dam/photos/2006/01/21/souper-adi/img021.jpeg.small.jpeg' alt='l\'entrée: banane plantin, patate douce et thon'&gt;&lt;/a&gt;&lt;br /&gt;
L'entrée: banane plantin, patate douce et thon.&amp;lt;/center&gt;&lt;/p&gt;

&lt;p&gt;Il n'y a pas eu de problème majeur, ormis le fait qu'il manquait peut-être quelques bouteilles de vin rouge. J'ai aussi pu découvrir les membres d'ADI dans un cadre autre que celui des réunions, et ils sont aussi sympa au réunion qu'en dehors ;).&lt;/p&gt;

&lt;p&gt;&amp;lt;center&gt;&lt;a href='http://www.cosinux.org/~dam/photos/2006/01/21/souper-adi/img018.jpeg'&gt;&lt;img src='http://www.cosinux.org/~dam/photos/2006/01/21/souper-adi/img018.jpeg.small.jpeg' alt='salle comble...'&gt;&lt;/a&gt;&lt;br /&gt;
Salle comble...&amp;lt;/center&gt;&lt;/p&gt;

&lt;p&gt;Pour avoir une aperçu du souper, il suffit de jetter un coup d'oeil au &lt;a href='/~dam/photos/2006/01/21/souper-adi/'&gt;photos&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-01-17:4</id>
    <published>2006-01-17T23:21:00Z</published>
    <updated>2006-12-11T09:20:24Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/1/17/apache-and-fastcgi-setup" rel="alternate" type="text/html"/>
    <title>Apache and FastCgi setup</title>
<content type="html">
            &lt;p&gt;I've just been having problems with my blog. There were too many connections. After &quot;configuring FastCgi as static server&quot;:http://scottstuff.net/blog/articles/2005/07/20/apache-tuning-for-rails-and-fastcgi and reducing MaxClients in apache config, everything seems normal now.&lt;/p&gt;

&lt;p&gt;I still need to figure out why UTF-8 is not automatically detected (at least in my Firefox), but that's for later.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;update:&lt;/em&gt; I've corrected the UTF-8 encoding problem. Apache was sat up with directive AddDefaultCharset on. Disabling it solved the problem.    However I still have another one. A get request return two Content-Type headers where it should only send one.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-01-17:3</id>
    <published>2006-01-17T20:56:00Z</published>
    <updated>2008-06-25T07:51:04Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/1/17/bazaar-ng-and-switchtower" rel="alternate" type="text/html"/>
    <title>Bazaar-ng and SwitchTower</title>
<summary type="html">&lt;p&gt;After having read about &quot;SwitchTower&quot;:http://manuals.rubyonrails.com/read/book/17, I decided to give it a try. SwitchTower is a tool to ease the deployment of your &quot;Ruby on Rails&quot;:http://www.rubyonrails.com/ application. I immediatly liked SwitchTower concepts, but there was a big problem, it had no support for &quot;Bazaar-NG&quot;:http://www.bazaar-ng.org/ which I use for revision control of my apps.&lt;/p&gt;

&lt;p&gt;So I dived into the code and here is the result.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;After having read about &quot;SwitchTower&quot;:http://manuals.rubyonrails.com/read/book/17, I decided to give it a try. SwitchTower is a tool to ease the deployment of your &quot;Ruby on Rails&quot;:http://www.rubyonrails.com/ application. I immediatly liked SwitchTower concepts, but there was a big problem, it had no support for &quot;Bazaar-NG&quot;:http://www.bazaar-ng.org/ which I use for revision control of my apps.&lt;/p&gt;

&lt;p&gt;So I dived into the code and here is the result.&lt;/p&gt;
&lt;p&gt;It Works For Me^TM^ drop this file to the scm directory of your SwitchTower installation.&lt;/p&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;15&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;23&lt;tt&gt;
&lt;/tt&gt;24&lt;tt&gt;
&lt;/tt&gt;25&lt;tt&gt;
&lt;/tt&gt;26&lt;tt&gt;
&lt;/tt&gt;27&lt;tt&gt;
&lt;/tt&gt;28&lt;tt&gt;
&lt;/tt&gt;29&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;30&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;31&lt;tt&gt;
&lt;/tt&gt;32&lt;tt&gt;
&lt;/tt&gt;33&lt;tt&gt;
&lt;/tt&gt;34&lt;tt&gt;
&lt;/tt&gt;35&lt;tt&gt;
&lt;/tt&gt;36&lt;tt&gt;
&lt;/tt&gt;37&lt;tt&gt;
&lt;/tt&gt;38&lt;tt&gt;
&lt;/tt&gt;39&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;40&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;41&lt;tt&gt;
&lt;/tt&gt;42&lt;tt&gt;
&lt;/tt&gt;43&lt;tt&gt;
&lt;/tt&gt;44&lt;tt&gt;
&lt;/tt&gt;45&lt;tt&gt;
&lt;/tt&gt;46&lt;tt&gt;
&lt;/tt&gt;47&lt;tt&gt;
&lt;/tt&gt;48&lt;tt&gt;
&lt;/tt&gt;49&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;50&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;51&lt;tt&gt;
&lt;/tt&gt;52&lt;tt&gt;
&lt;/tt&gt;53&lt;tt&gt;
&lt;/tt&gt;54&lt;tt&gt;
&lt;/tt&gt;55&lt;tt&gt;
&lt;/tt&gt;56&lt;tt&gt;
&lt;/tt&gt;57&lt;tt&gt;
&lt;/tt&gt;58&lt;tt&gt;
&lt;/tt&gt;59&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;60&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;61&lt;tt&gt;
&lt;/tt&gt;62&lt;tt&gt;
&lt;/tt&gt;63&lt;tt&gt;
&lt;/tt&gt;64&lt;tt&gt;
&lt;/tt&gt;65&lt;tt&gt;
&lt;/tt&gt;66&lt;tt&gt;
&lt;/tt&gt;67&lt;tt&gt;
&lt;/tt&gt;68&lt;tt&gt;
&lt;/tt&gt;69&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;70&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;71&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;require &lt;span class='s'&gt;&lt;span class='dl'&gt;'&lt;/span&gt;&lt;span class='k'&gt;switchtower/scm/base&lt;/span&gt;&lt;span class='dl'&gt;'&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='r'&gt;module&lt;/span&gt; &lt;span class='cl'&gt;SwitchTower&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;module&lt;/span&gt; &lt;span class='cl'&gt;SCM&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='c'&gt;# An SCM module for using subversion as your source control tool. This&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='c'&gt;# module is used by default, but you can explicitly specify it by&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='c'&gt;# placing the following line in your configuration:&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='c'&gt;#&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='c'&gt;#   set :scm, :bzr&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='c'&gt;#&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='c'&gt;# Also, this module accepts a &amp;lt;tt&amp;gt;:bzr&amp;lt;/tt&amp;gt; configuration variable,&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='c'&gt;# which (if specified) will be used as the full path to the svn&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='c'&gt;# executable on the remote machine:&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='c'&gt;#&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='c'&gt;#   set :bzr, &amp;quot;/opt/local/bin/bzr&amp;quot;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='r'&gt;class&lt;/span&gt; &lt;span class='cl'&gt;Bzr&lt;/span&gt; &amp;lt; &lt;span class='co'&gt;Base&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='c'&gt;# Return an integer identifying the last known revision in the bzr&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='c'&gt;# repository. (This integer is currently the revision number.) &lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='fu'&gt;latest_revision&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;        &lt;span class='sh'&gt;&lt;span class='dl'&gt;`&lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;bzr&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; revno &lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;configuration.repository&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='dl'&gt;`&lt;/span&gt;&lt;/span&gt;.to_i&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='c'&gt;# Return the number of the revision currently deployed.&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='fu'&gt;current_revision&lt;/span&gt;(actor)&lt;tt&gt;
&lt;/tt&gt;        command = &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;bzr&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; revno &lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;actor.release_path&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; &amp;amp;&amp;amp;&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;        &lt;tt&gt;
&lt;/tt&gt;        run_update(actor, command, &amp;amp;bzr_stream_handler(actor)) &lt;tt&gt;
&lt;/tt&gt;      &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='c'&gt;# Return a string containing the diff between the two revisions. +from+&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='c'&gt;# and +to+ may be in any format that bzr recognizes as a valid revision&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='c'&gt;# identifier. If +from+ is +nil+, it defaults to the last deployed&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='c'&gt;# revision. If +to+ is +nil+, it defaults to the last developed revision.&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='c'&gt;# Pay attention to the fact that as of now bzr does NOT support&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='c'&gt;# diff on remote locations.&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='fu'&gt;diff&lt;/span&gt;(actor, from=&lt;span class='pc'&gt;nil&lt;/span&gt;, to=&lt;span class='pc'&gt;nil&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;        from ||= current_revision(actor)&lt;tt&gt;
&lt;/tt&gt;        to ||= &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;        &lt;span class='sh'&gt;&lt;span class='dl'&gt;`&lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;bzr&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; diff -r &lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;from&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt;..&lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;to&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; &lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;configuration.repository&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='dl'&gt;`&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='c'&gt;# Check out (on all servers associated with the current task) the latest&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='c'&gt;# revision. Uses the given actor instance to execute the command. If&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='c'&gt;# bzr asks for a password this will automatically provide it (assuming&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='c'&gt;# the requested password is the same as the password for logging into the&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='c'&gt;# remote server.)&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='fu'&gt;checkout&lt;/span&gt;(actor)&lt;tt&gt;
&lt;/tt&gt;        op = configuration[&lt;span class='sy'&gt;:checkout&lt;/span&gt;] || &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;branch&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;        command = &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;bzr&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; &lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;op&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; -r&lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;configuration.revision&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; &lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;configuration.repository&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; &lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;actor.release_path&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; &amp;amp;&amp;amp;&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;        run_checkout(actor, command, &amp;amp;bzr_stream_handler(actor)) &lt;tt&gt;
&lt;/tt&gt;      &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='fu'&gt;update&lt;/span&gt;(actor)&lt;tt&gt;
&lt;/tt&gt;        command = &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;cd &lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;actor.current_path&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; &amp;amp;&amp;amp; &lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;bzr&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; pull -q &amp;amp;&amp;amp;&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;        run_update(actor, command, &amp;amp;bzr_stream_handler(actor)) &lt;tt&gt;
&lt;/tt&gt;      &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;tt&gt;
&lt;/tt&gt;      private&lt;tt&gt;
&lt;/tt&gt;        &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='fu'&gt;bzr&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;          configuration[&lt;span class='sy'&gt;:bzr&lt;/span&gt;] || &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;bzr&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;        &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;        &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='fu'&gt;bzr_stream_handler&lt;/span&gt;(actor)&lt;tt&gt;
&lt;/tt&gt;          &lt;span class='co'&gt;Proc&lt;/span&gt;.new &lt;span class='r'&gt;do&lt;/span&gt; |ch, stream, out|&lt;tt&gt;
&lt;/tt&gt;            prefix = &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;stream&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='k'&gt; :: &lt;/span&gt;&lt;span class='il'&gt;&lt;span class='dl'&gt;#{&lt;/span&gt;ch[&lt;span class='sy'&gt;:host&lt;/span&gt;]&lt;span class='dl'&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;            actor.logger.info out, prefix&lt;tt&gt;
&lt;/tt&gt;          &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;        &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='r'&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-01-17:2</id>
    <published>2006-01-17T19:26:00Z</published>
    <updated>2008-06-25T07:53:26Z</updated>
    <category term="English"/>
    <category term="Technos"/>
    <link href="http://blog.cosinux.org/2006/1/17/typo-multi-user-installation" rel="alternate" type="text/html"/>
    <title>Typo multi-user installation</title>
<summary type="html">&lt;p&gt;As you may not see, this blog is powered by &quot;Typo&quot;:http://typo.leetsoft.com/, a cool &quot;Ruby on Rails&quot;:http://www.rubyonrails.com/ driven blog application. However I missed the functionnality of being able to easily host multiple blog on my server. I could not find much info beside a howto which required virtual hosts and implied editing Typo's internal.&lt;/p&gt;

&lt;p&gt;So I write down a script to create blogs easily. It uses symlinks to the real Typo directory and a database per user. It works on Linux using MySQL and Apache. It needs &quot;Ruby&quot;:http://www.ruby-lang.org/ and &quot;Termios&quot;:http://raa.ruby-lang.org/project/ruby-termios/&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;As you may not see, this blog is powered by &quot;Typo&quot;:http://typo.leetsoft.com/, a cool &quot;Ruby on Rails&quot;:http://www.rubyonrails.com/ driven blog application. However I missed the functionnality of being able to easily host multiple blog on my server. I could not find much info beside a howto which required virtual hosts and implied editing Typo's internal.&lt;/p&gt;

&lt;p&gt;So I write down a script to create blogs easily. It uses symlinks to the real Typo directory and a database per user. It works on Linux using MySQL and Apache. It needs &quot;Ruby&quot;:http://www.ruby-lang.org/ and &quot;Termios&quot;:http://raa.ruby-lang.org/project/ruby-termios/&lt;/p&gt;
&lt;p&gt;To use it, &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;download[1] it&lt;/li&gt;
&lt;li&gt;create a directory $DIR, put the script in it.&lt;/li&gt;
&lt;li&gt;Download a Typo &quot;release&quot;:http://typo.leetsoft.com/trac/wiki/DownloadStable
and extract it in $DIR/typo&lt;/li&gt;
&lt;li&gt;edit or create $DIR/typo/database.yml[2]. You can use &quot;ERB&quot;:http://raa.ruby-lang.org/project/erb/ tags in the file. Available variables are user, the user name,@target, the directory in which user blogs are installed and the instance variable of the Manager class.&lt;/li&gt;
&lt;li&gt;edit the $DIR/typo/.htaccess[3], same remark apply.&lt;/li&gt;
&lt;li&gt;create the $DIR/apache.conf.erb[4] file, same remark apply. It will be used as a template to create a config file to include in your apache configuration. An example is attached.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally run ./manage foo and it will &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;create the user directory,&lt;/li&gt;
&lt;li&gt;create a database.yml file,&lt;/li&gt;
&lt;li&gt;ask you the root password for mysql, create and populate database using the Typo MySQL schemas, &lt;/li&gt;
&lt;li&gt;create the apache.conf file&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now restart your apache, pray and try. Send me comments if something went wrong. Don't forget you need to have the correct permissions and look at the source for more parameters, Luke.&lt;/p&gt;

&lt;p&gt;fn1. &quot;manage&quot;:http://www.cosinux.org/blogs/dam/files/manager.rb&lt;/p&gt;

&lt;p&gt;fn2. &quot;database.yml&quot;:http://www.cosinux.org/blogs/dam/files/database.yml&lt;/p&gt;

&lt;p&gt;fn3. &quot;htaccess&quot;:http://www.cosinux.org/blogs/dam/files/htaccess.erb&lt;/p&gt;

&lt;p&gt;fn4. &quot;apache.conf.erb&quot;:http://www.cosinux.org/blogs/dam/files/apache.conf.erb&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.cosinux.org/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:blog.cosinux.org,2006-01-17:1</id>
    <published>2006-01-17T19:06:00Z</published>
    <updated>2006-12-11T09:21:51Z</updated>
    <category term="C'est la vie"/>
    <category term="Fran&#231;ais"/>
    <link href="http://blog.cosinux.org/2006/1/17/bonjour-le-web" rel="alternate" type="text/html"/>
    <title>Bonjour le web</title>
<content type="html">
            &lt;p&gt;Voilà, j'ai mon blog.&lt;/p&gt;

&lt;p&gt;??Déjà!!!??&lt;/p&gt;

&lt;p&gt;Ho ça va hein. Vieux motard que j'aimais. Et non ce n'est pas le blog de l'humour débile bien qu'il y en aura sûrement (et oui je sais il vient déjà d'y en avoir).&lt;/p&gt;

&lt;p&gt;Je compte publier ici mes lubies, mes idées, des bouts de ma vie, les trucs technoïdes sur lesquel je bidouille, mes propositions de réforme de l'ortographe et que sais-je encore. J'espère ainsi faire profiter d'autres de mes expériences et que je pourrais profiter de celle d'autrui.&lt;/p&gt;

&lt;p&gt;Pour commencer, je peux déjà dire que je pars pour Londres demain et que je reviens vendredi et que ce week-end, tout le monde doit ce rendre au &quot;souper ADI&quot;:http://www.asbl-adi.org/textes/agenda/agenda.htm à Jupille samedi soir, au profit de l'asbl.&lt;/p&gt;
          </content>  </entry>
</feed>
