<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>linkfluence|labs</title>
  <link rel="alternate" href="http://labs.linkfluence.net/" type="text/html"/>
  <updated>2010-09-07T12:00:08+02:00</updated>
  <generator>Plagger/0.7.17</generator>
  <subtitle>from Linkfluence</subtitle>
  <id>tag:labs.linkfluence.net,2006:smartfeed:all</id>
  <entry>
    <title>Embedded archives in your shell scripts</title>
    <link rel="alternate" href="http://erralt.wordpress.com/2010/08/16/embedded-archives-in-your-shell-scripts/" type="text/html"/>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">My problem was how to make an install of my servers with different files to create/modify with only one script, just using a copy/paste into my SSH console ?
It’s pretty easy to do, good news.
The principle is to have a variable which contains all the files we need in the script.
It’s done with base64 command which ensure me to have a string that does not interfere with the rest of my script.
How to use ? What to put in the variable ?
For an entire archive :
ARCHIVE = `tar -c /path/to/files | gzip | base64`
or just one file :
ARCHIVE = `cat /path/to/file | gzip | base64`
If you don’t want to compress, remove gzip step.
The variable looks like a simple hexadecimal string. Put it in one line (it could work when it’s truncated but i met some problems).
ARCHIVE = "PD9YTUwgdmVyc2lvbj0iMS4xIiBlbmNvZGluZz0iVVRGLTgiPz4NPCFET0NUWVBFIGtleWJvYXJkIFBVQkxJQyAiIiAiZmlsZTovL2xvY2FsaG9zdC9TeXN0ZW0vTGlicmFyeS9EVERzL0tleWJvYXJkTGF5b3V0LmR0ZCI+DTwhLS1MYXN0IGVkaXRlZCBieSBVa2VsZWxlIHZlcnNpb24gZW1hIiBvdXRwdXQ9IsKoIi8+DSAgICA8L3Rlcm1pbmF0b3JzPg08L2tleWJvYXJkPg0="
And finally just do the reverted actions in order to restore files contained in $ARCHIVE.
For an archive :
echo $ARCHIVE | base64 -d | gzip -d | tar -x
 (use -t option instead of -x of tar to control what you are doing)
or just one file :
echo $ARCHIVE | base64 -d | gzip -d | cat &gt; destination-file
If you don’t want to compress, remove gzip -d step.
         </div>
    </summary>
    <content type="html">&lt;p&gt;My problem was how to make an install of my servers with different files to create/modify with only one script, just using a copy/paste into my SSH console ?&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s pretty easy to do, good news.&lt;/p&gt;
&lt;p&gt;The principle is to have a variable which contains all the files we need in the script.&lt;br /&gt;
It&amp;#8217;s done with &lt;strong&gt;base64&lt;/strong&gt; command which ensure me to have a string that does not interfere with the rest of my script.&lt;/p&gt;
&lt;p&gt;How to use ? What to put in the variable ?&lt;/p&gt;
&lt;p&gt;For an entire archive :&lt;br /&gt;
&lt;code&gt;ARCHIVE = `tar -c /path/to/files | gzip | base64`&lt;/code&gt;&lt;br /&gt;
or just one file :&lt;br /&gt;
&lt;code&gt;ARCHIVE = `cat /path/to/file | gzip | base64`&lt;/code&gt;&lt;br /&gt;
If you don&amp;#8217;t want to compress, remove &lt;strong&gt;gzip&lt;/strong&gt; step.&lt;/p&gt;
&lt;p&gt;The variable looks like a simple hexadecimal string. Put it in one line (it could work when it&amp;#8217;s truncated but i met some problems).&lt;br /&gt;
&lt;code&gt;ARCHIVE = "PD9YTUwgdmVyc2lvbj0iMS4xIiBlbmNvZGluZz0iVVRGLTgiPz4NPCFET0NUWVBFIGtleWJvYXJkIFBVQkxJQyAiIiAiZmlsZTovL2xvY2FsaG9zdC9TeXN0ZW0vTGlicmFyeS9EVERzL0tleWJvYXJkTGF5b3V0LmR0ZCI+DTwhLS1MYXN0IGVkaXRlZCBieSBVa2VsZWxlIHZlcnNpb24gZW1hIiBvdXRwdXQ9IsKoIi8+DSAgICA8L3Rlcm1pbmF0b3JzPg08L2tleWJvYXJkPg0="&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And finally just do the reverted actions in order to restore files contained in $ARCHIVE.&lt;br /&gt;
For an archive :&lt;br /&gt;
&lt;code&gt;echo $ARCHIVE | base64 -d | gzip -d | tar -x&lt;/code&gt;&lt;br /&gt;
&lt;em&gt; (use &lt;strong&gt;-t&lt;/strong&gt; option instead of &lt;strong&gt;-x&lt;/strong&gt; of tar to control what you are doing)&lt;/em&gt;&lt;br /&gt;
or just one file :&lt;br /&gt;
&lt;code&gt;echo $ARCHIVE | base64 -d | gzip -d | cat &amp;gt; destination-file&lt;/code&gt;&lt;br /&gt;
If you don&amp;#8217;t want to compress, remove &lt;strong&gt;gzip -d&lt;/strong&gt; step.&lt;/p&gt;
&lt;br /&gt;  &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/erralt.wordpress.com/327/"&gt;&lt;img alt="" src="http://feeds.wordpress.com/1.0/comments/erralt.wordpress.com/327/"&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/erralt.wordpress.com/327/"&gt;&lt;img alt="" src="http://feeds.wordpress.com/1.0/delicious/erralt.wordpress.com/327/"&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/erralt.wordpress.com/327/"&gt;&lt;img alt="" src="http://feeds.wordpress.com/1.0/facebook/erralt.wordpress.com/327/"&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/erralt.wordpress.com/327/"&gt;&lt;img alt="" src="http://feeds.wordpress.com/1.0/twitter/erralt.wordpress.com/327/"&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/erralt.wordpress.com/327/"&gt;&lt;img alt="" src="http://feeds.wordpress.com/1.0/stumble/erralt.wordpress.com/327/"&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/erralt.wordpress.com/327/"&gt;&lt;img alt="" src="http://feeds.wordpress.com/1.0/digg/erralt.wordpress.com/327/"&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/erralt.wordpress.com/327/"&gt;&lt;img alt="" src="http://feeds.wordpress.com/1.0/reddit/erralt.wordpress.com/327/"&gt;&lt;/a&gt; &lt;img alt="" src="http://stats.wordpress.com/b.gif?host=erralt.wordpress.com&amp;amp;blog=4831339&amp;amp;post=327&amp;amp;subd=erralt&amp;amp;ref=&amp;amp;feed=1"&gt;</content>
    <category term="Administration LF Linux base64 gzip howto scripts shell tar"/>
    <published>2010-08-16T10:41:36Z</published>
    <updated>2010-08-16T10:41:36Z</updated>
    <author>
      <name>erralt</name>
    </author>
    <id>tag:labs.linkfluence.net,2006:http://erralt.wordpress.com/?p=327</id>
    <link xmlns="http://purl.org/atom/ns#" rel="enclosure" type="" href="" length=""/>
  </entry>
  <entry>
    <title>TypeMatrix french key layout for Mac OS X</title>
    <link rel="alternate" href="http://erralt.wordpress.com/2010/07/31/typematrix-french-key-layout-for-mac-os-x/" type="text/html"/>
    <summary type="text">Here is the TypeMatrix French keylayout file for Mac OS X : http://www.erralt.info/TypeMatrix-Fr-MacOSX.keylayout
For the french key layout of typematrix keyboards (be sure to switch to « 102 keys keyboard » using « Fn+F2″ combination) :

Follow these instructions http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;id=Ukelele in order to install the new key layout. Check « TypeMatrix-Fr-MacOSX » input method.
You’re now ready to type in french !
         </summary>
    <content type="html">&lt;p&gt;Here is the TypeMatrix French keylayout file for Mac OS X : &lt;a href="http://www.erralt.info/TypeMatrix-Fr-MacOSX.keylayout"&gt;http://www.erralt.info/TypeMatrix-Fr-MacOSX.keylayout&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For the french key layout of typematrix keyboards (be sure to switch to &amp;laquo;&amp;nbsp;102 keys keyboard&amp;nbsp;&amp;raquo; using &amp;laquo;&amp;nbsp;Fn+F2&amp;#8243; combination) :&lt;br /&gt;
&lt;a href="http://erralt.files.wordpress.com/2010/07/typematrix-fr-macosx.jpg"&gt;&lt;img src="http://erralt.files.wordpress.com/2010/07/typematrix-fr-macosx.jpg?w=300&amp;amp;h=120" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Follow these instructions &lt;a href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;amp;id=Ukelele"&gt;http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;amp;id=Ukelele&lt;/a&gt; in order to install the new key layout. Check &amp;laquo;&amp;nbsp;TypeMatrix-Fr-MacOSX&amp;nbsp;&amp;raquo; input method.&lt;/p&gt;
&lt;p&gt;You&amp;#8217;re now ready to type in french !&lt;/p&gt;
&lt;br /&gt;  &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/erralt.wordpress.com/301/"&gt;&lt;img alt="" src="http://feeds.wordpress.com/1.0/comments/erralt.wordpress.com/301/"&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/erralt.wordpress.com/301/"&gt;&lt;img alt="" src="http://feeds.wordpress.com/1.0/delicious/erralt.wordpress.com/301/"&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/erralt.wordpress.com/301/"&gt;&lt;img alt="" src="http://feeds.wordpress.com/1.0/facebook/erralt.wordpress.com/301/"&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/erralt.wordpress.com/301/"&gt;&lt;img alt="" src="http://feeds.wordpress.com/1.0/twitter/erralt.wordpress.com/301/"&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/erralt.wordpress.com/301/"&gt;&lt;img alt="" src="http://feeds.wordpress.com/1.0/stumble/erralt.wordpress.com/301/"&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/erralt.wordpress.com/301/"&gt;&lt;img alt="" src="http://feeds.wordpress.com/1.0/digg/erralt.wordpress.com/301/"&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/erralt.wordpress.com/301/"&gt;&lt;img alt="" src="http://feeds.wordpress.com/1.0/reddit/erralt.wordpress.com/301/"&gt;&lt;/a&gt; &lt;img alt="" src="http://stats.wordpress.com/b.gif?host=erralt.wordpress.com&amp;amp;blog=4831339&amp;amp;post=301&amp;amp;subd=erralt&amp;amp;ref=&amp;amp;feed=1"&gt;</content>
    <category term="LF MacOSX"/>
    <published>2010-07-31T12:28:02Z</published>
    <updated>2010-07-31T12:28:02Z</updated>
    <author>
      <name>erralt</name>
    </author>
    <id>tag:labs.linkfluence.net,2006:http://erralt.wordpress.com/?p=301</id>
    <link xmlns="http://purl.org/atom/ns#" rel="enclosure" type="" href="" length=""/>
    <link xmlns="http://purl.org/atom/ns#" rel="enclosure" type="" href="" length=""/>
  </entry>
  <entry>
    <title>Github Communities Posters for shipping</title>
    <link rel="alternate" href="http://lumberjaph.net/github-poster-to-ship.html" type="text/html"/>
    <summary>R2l0aHViIFBvc3RlcgoKSSd2ZSBmaW5hbGx5IGZvdW5kIGEgcHJpbnRlciB0aGF0IGNhbiBkbyBpbnRlcm5hdGlvbmFsIHNoaXBwaW5nIGZvciByZWFzb25hYmxlIGNvc3RzLiBUaGUgcHJpY2Ugd2lsbCBiZSA2NcOiwoLCrCwgYW5kIGEgcGF5cGFsIGFjY291bnQgd2lsbCBiZSBzZXR1cCBzb29uLgoKCgoKClNvLCBpZiB5b3UncmUgaW50ZXJlc3RlZCBieSBhIHBvc3RlciBpbiBBMSBzaXplLCBzZW5kIG1lIGEgbWFpbC4gSSdsbCBuZWVkIGF0IGxlYXN0IDE1IHBlcnNvbnMgdG8gYmUgYWJsZSB0byBkbyB0aGlzLiBTbyBjb250YWN0IG1lLCBhbmQgSSB3aWxsIGtlZXAgeW91IGluZm9ybWVkLgoKQnk6IGZyYW5jayBvbiAyMDEwLTA2LTMwVDIwOjA5OjEwCgpUYWdzOiBnaXRodWIKCnBlcm1hbGluawo=</summary>
    <content>PGFydGljbGU+PGRpdiBjbGFzcz0iZW50cnkiPjxoMiBpZD0iZ2l0aHVicG9zdGVyIj5HaXRodWIgUG9zdGVyPC9oMj4KCjxwPkkndmUgZmluYWxseSBmb3VuZCBhIHByaW50ZXIgdGhhdCBjYW4gZG8gaW50ZXJuYXRpb25hbCBzaGlwcGluZyBmb3IgcmVhc29uYWJsZSBjb3N0cy4gVGhlIHByaWNlIHdpbGwgYmUgNjXDosKCwqwsIGFuZCBhIHBheXBhbCBhY2NvdW50IHdpbGwgYmUgc2V0dXAgc29vbi48L3A+Cgo8cD48Y2VudGVyPgo8YSBocmVmPSJodHRwOi8vZnIubGlua2ZsdWVuY2UubmV0L3Bvc3RlcnMvIj48aW1nIHNyYz0iaHR0cDovL2ZyLmxpbmtmbHVlbmNlLm5ldC93cC1jb250ZW50L2ltYWdlcy9hdGxhcy9naXRodWJfdGh1bWIucG5nIj48L2E+CjwvY2VudGVyPjwvcD4KCjxwPlNvLCBpZiB5b3UncmUgaW50ZXJlc3RlZCBieSBhIHBvc3RlciBpbiBBMSBzaXplLCA8YSBocmVmPSIvY29udGFjdC8iPnNlbmQgbWUgYSBtYWlsPC9hPi4gSSdsbCBuZWVkIGF0IGxlYXN0IDE1IHBlcnNvbnMgdG8gYmUgYWJsZSB0byBkbyB0aGlzLiBTbyBjb250YWN0IG1lLCBhbmQgSSB3aWxsIGtlZXAgeW91IGluZm9ybWVkLjwvcD4KCjxwPkJ5OiBmcmFuY2sgb24gMjAxMC0wNi0zMFQyMDowOToxMDwvcD4KCjxwPlRhZ3M6IDxhIGhyZWY9Imh0dHA6Ly9sdW1iZXJqYXBoLm5ldC9naXRodWIucnNzIj5naXRodWI8L2E+PC9wPgoKPHA+PGEgaHJlZj0iaHR0cDovL2x1bWJlcmphcGgubmV0L2dpdGh1Yi1wb3N0ZXItdG8tc2hpcC5yc3MiPnBlcm1hbGluazwvYT48L3A+CjwvZGl2PjwvYXJ0aWNsZT4=</content>
    <published>2010-06-30T20:09:10Z</published>
    <updated>2010-06-30T20:09:10Z</updated>
    <author>
      <name>nobody</name>
    </author>
    <id>tag:labs.linkfluence.net,2006:http://lumberjaph.net/github-poster-to-ship.html</id>
  </entry>
  <entry>
    <title>No www !</title>
    <link rel="alternate" href="http://labs.linkfluence.net/~cmaussan/blog/2010/06/29/no-www/" type="text/html"/>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">Grâce à Sunfox (avec lequel je ne suis pas complètement d’accord : il est un peu extrême dans la suppression pure et simple du TLD), je découvre, le site le plus utile au web : no-www.org !
Au passage, si vous avez raté la conversation sur les shorteners d’URL, ça a commencé chez Twitter qui ferait mieux de rajouter un attribut url à leur modèle NoSQL. A propos, il faudra qu’on m’explique quel peut-être le modèle d’une startup fabriquant un shortener, surtout quand elle adhère au 301works ; se faire racheter avant de dépasser les 20 caractères ?
</div>
    </summary>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p>Grâce à <a href="http://sunfox.org/blog/2010/06/21/renverser-les-urls/">Sunfox</a> (avec lequel je ne suis pas complètement d’accord : il est un peu extrême dans la suppression pure et simple du <a href="http://en.wikipedia.org/wiki/TLD">TLD</a>), je découvre, le site le plus utile au web : <a href="http://no-www.org/">no-www.org</a> !</p>
<p>Au passage, si vous avez raté <a href="http://www.google.com/buzz/dclinton/JKoWPTAAyvw/More-thoughts-on-URL-shorteners-This-post-explores">la conversation sur les shorteners d’URL</a>, ça a commencé <a href="http://blog.twitter.com/2010/06/links-and-twitter-length-shouldnt.html">chez Twitter</a> qui ferait mieux de rajouter un attribut <code>url</code> à leur modèle NoSQL. A propos, il faudra qu’on m’explique quel peut-être le modèle d’une startup fabriquant un shortener, surtout quand elle adhère au <a href="http://www.301works.org/">301works</a> ; se faire racheter avant de dépasser les 20 caractères ?</p>
</div>
    </content>
    <category term="forecasting shortener url"/>
    <published>2010-06-29T15:36:42Z</published>
    <updated>2010-06-29T15:36:42Z</updated>
    <author>
      <name>cmaussan</name>
    </author>
    <id>tag:labs.linkfluence.net,2006:http://labs.linkfluence.net/~cmaussan/blog/?p=56</id>
  </entry>
  <entry>
    <title>presque</title>
    <link rel="alternate" href="http://lumberjaph.net/presque-new_features.html" type="text/html"/>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">presque

I've added a few new features to presque.

presque is a persistant job queue based on Redis and Tatsumaki.

A short list of current features implemented:


jobs are JSON object
possibility to stop/start queues
jobs can be delayed to run after a certain date in the future
workers can register themself, doing this, you can know when a worker started, what he have done, ...
statistics about queue, jobs, and workers
possible to store and fetch jobs in batch
a job can be unique


The REST interface is simple, and there is only a few methods. It's fast (I will provide numbers soon from our production environment), and workers can be implemented in any languages.

There have been a lot of refactoring lately. The main features missing right now are a simple HTML interface that will display various informations, pulling the data from the REST API (hint : if someone want to help to design this one ... :) ), websocket (sending a message to all workers).

There is a Perl client to the REST API: net::presque, that you can use with net::http::console:

perl bin/http-console --api_lib Net::Presque --url http://localhost:5000
http://localhost:5000&gt; fetch_job {"queue_name":"twitter_stream"}
{
   "text" : "Australias new prime minister - julia gillard is our 27th prime minister.",
   "user" : "Lov3LifeAlways"
}


I've also wrote a better worker for Perl. It's a Moose::Role that you apply to your class. You need to write a work method, and your done. This worker handle retries, provide a logger, ... As for resque, there is two dispatcher:


normal : the worker grab a job, process it, then ask for the next job
fork : the worker grab a job, fork, let the child do the job and exit, while the parent ask for the next job. As resque says, "Resque assumes chaos". And me too, I like (ordered) chaos


I hope to finish the documentation and to writes one or two more workers as example (maybe in Python and javascript/node.js) soon to be able to tag a first version, and to collect some info about how many jobs have been processed at work (we use it to do url resolution and collect twitter data among few other things). Although I'm not sure I will release it to CPAN.

By: franck on 2010-06-25T08:59:53

Tags: presque redis

permalink
</div>
    </summary>
    <content type="html">&lt;article&gt;&lt;div class="entry"&gt;&lt;h2 id="presque"&gt;presque&lt;/h2&gt;

&lt;p&gt;I've added a few new features to &lt;a href="http://github.com/franckcuny/presque"&gt;presque&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://lumberjaph.net/presque-a-redis---tatsumaki-based-message-queue.html"&gt;presque&lt;/a&gt; is a persistant job queue based on &lt;a href="http://github.com/antirez/redis"&gt;Redis&lt;/a&gt; and &lt;a href="" http://github.com/miyagawa/tatsumaki"&gt;Tatsumaki&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A short list of current features implemented:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;jobs are JSON object&lt;/li&gt;
&lt;li&gt;possibility to stop/start queues&lt;/li&gt;
&lt;li&gt;jobs can be delayed to run after a certain date in the future&lt;/li&gt;
&lt;li&gt;workers can register themself, doing this, you can know when a worker started, what he have done, ...&lt;/li&gt;
&lt;li&gt;statistics about queue, jobs, and workers&lt;/li&gt;
&lt;li&gt;possible to store and fetch jobs in batch&lt;/li&gt;
&lt;li&gt;a job can be unique&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The REST interface is simple, and there is only a few methods. It's fast (I will provide numbers soon from our production environment), and workers can be implemented in any languages.&lt;/p&gt;

&lt;p&gt;There have been a lot of refactoring lately. The main features missing right now are a simple HTML interface that will display various informations, pulling the data from the REST API (hint : if someone want to help to design this one ... :) ), websocket (sending a message to all workers).&lt;/p&gt;

&lt;p&gt;There is a Perl client to the REST API: &lt;a href="http://github.com/franckcuny/net-presque"&gt;net::presque&lt;/a&gt;, that you can use with &lt;a href="http://github.com/franckcuny/net-http-console"&gt;net::http::console&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;perl bin/http-console --api_lib Net::Presque --url http://localhost:5000
http://localhost:5000&amp;gt; fetch_job {"queue_name":"twitter_stream"}
{
   "text" : "Australias new prime minister - julia gillard is our 27th prime minister.",
   "user" : "Lov3LifeAlways"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I've also wrote a better &lt;a href="http://github.com/franckcuny/presque-worker"&gt;worker for Perl&lt;/a&gt;. It's a Moose::Role that you apply to your class. You need to write a &lt;strong&gt;work&lt;/strong&gt; method, and your done. This worker handle retries, provide a logger, ... As for &lt;a href="http://github.com/defunkt/resque"&gt;resque&lt;/a&gt;, there is two dispatcher:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;normal : the worker grab a job, process it, then ask for the next job&lt;/li&gt;
&lt;li&gt;fork : the worker grab a job, fork, let the child do the job and exit, while the parent ask for the next job. As resque says, "Resque assumes chaos". And me too, I like (ordered) chaos&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope to finish the documentation and to writes one or two more workers as example (maybe in Python and javascript/node.js) soon to be able to tag a first version, and to collect some info about how many jobs have been processed at work (we use it to do url resolution and collect twitter data among few other things). Although I'm not sure I will release it to CPAN.&lt;/p&gt;

&lt;p&gt;By: franck on 2010-06-25T08:59:53&lt;/p&gt;

&lt;p&gt;Tags: &lt;a href="http://lumberjaph.net/presque.rss"&gt;presque&lt;/a&gt; &lt;a href="http://lumberjaph.net/redis.rss"&gt;redis&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://lumberjaph.net/presque-new_features.rss"&gt;permalink&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/article&gt;</content>
    <published>2010-06-25T08:59:53Z</published>
    <updated>2010-06-25T08:59:53Z</updated>
    <author>
      <name>nobody</name>
    </author>
    <id>tag:labs.linkfluence.net,2006:http://lumberjaph.net/presque-new_features.html</id>
  </entry>
  <entry>
    <title>Enfin une factory avec Moose :)</title>
    <link rel="alternate" href="http://labs.linkfluence.net/~cmaussan/blog/2010/06/23/enfin-une-factory-avec-moose/" type="text/html"/>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">Youpi ! MooseX::AbstractFactory
</div>
    </summary>
    <content type="html">&lt;p&gt;Youpi ! &lt;a href="http://search.cpan.org/dist/MooseX-AbstractFactory/lib/MooseX/AbstractFactory.pm"&gt;MooseX::AbstractFactory&lt;/a&lt;/p&gt;
</content>
    <category term="forecasting perl"/>
    <published>2010-06-23T15:59:48Z</published>
    <updated>2010-06-23T15:59:48Z</updated>
    <author>
      <name>cmaussan</name>
    </author>
    <id>tag:labs.linkfluence.net,2006:http://labs.linkfluence.net/~cmaussan/blog/?p=54</id>
  </entry>
  <entry>
    <title>Monthly Dancer meeting</title>
    <link rel="alternate" href="http://lumberjaph.net/dancer-meeting.html" type="text/html"/>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">A Monthly Dancer meeting

I've been contributing to Dancer for a few months now, and the discussions occurs mainly on IRC (irc.perl.org, #dancer) or on the Mailing List.

Last weekend, I had the occasion to meet sukria during the French Perl Workshop. This has been really productive, we had the occasion to talk about Plack, the templating system, websocket, ... and I really think we should have met before. It was also the occasion to meet another contributor, eiro, with whom I've been able to share some knowledge about Plack.

During the workshop, I made a talk about Plack and the Middlewares. The direct result of this is the last feature added by sukria: middlewares can be set in the configuration file of your Dancer application, and will be loaded for you.

The next release of Dancer won't generate an app.psgi file anymore, so you will only need to edit your environment file (like deployement.yaml), and add the following configuration:

warnings: 1
auto_reload: 1
plack_middlewares:
  Debug:
    - panels
    -
      - Response
      - Dancer::Version
      - Dancer::Settings


and your application will load some Plack::Middleware::Debug and Dancer::Debug panels.

Sukria has suggested a monthly drinkup meeting for people in/near Paris, to talk about Dancer and Plack, in a pub or another place where we can bring a laptop, have some beers and share idea/codes and other exchange technicals thoughts.

I hope to meet more Dancer developers and users in a near future (sawyer at Pise maybe ?).

By: franck cuny on 2010-06-20T16:18:23

Tags: Perl Dancer

permalink
</div>
    </summary>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <article>
          <div class="entry"><h2 id="amonthlydancermeeting">A Monthly Dancer meeting</h2>

<p>I've been contributing to Dancer for a few months now, and the discussions occurs mainly on IRC (irc.perl.org, #dancer) or on <a href="http://lists.perldancer.org/cgi-bin/listinfo/dancer-users">the Mailing List</a>.</p>

<p>Last weekend, I had the occasion to meet sukria during the French Perl Workshop. This has been really productive, we had the occasion to talk about Plack, the templating system, websocket, ... and I really think we should have met before. It was also the occasion to meet another contributor, eiro, with whom I've been able to share some knowledge about Plack.</p>

<p>During the workshop, I made a talk about Plack and the Middlewares. The direct result of this is <a href="http://github.com/sukria/Dancer/commit/5ee83a5206e08256d7326f92c2f2f62c5e035ba9#L0R440">the last feature added by sukria</a>: middlewares can be set in the configuration file of your Dancer application, and will be loaded for you.</p>

<p>The next release of Dancer won't generate an <strong>app.psgi</strong> file anymore, so you will only need to edit your environment file (like <em>deployement.yaml</em>), and add the following configuration:</p>

<pre><code>warnings: 1
auto_reload: 1
plack_middlewares:
  Debug:
    - panels
    -
      - Response
      - Dancer::Version
      - Dancer::Settings
</code></pre>

<p>and your application will load some <a href="http://search.cpan.org/perldoc?Plack::Middleware::Debug">Plack::Middleware::Debug</a> and <a href="http://search.cpan.org/dist/Dancer-Debug/">Dancer::Debug</a> panels.</p>

<p>Sukria has suggested a monthly drinkup meeting for people in/near Paris, to talk about Dancer and Plack, in a pub or another place where we can bring a laptop, have some beers and share idea/codes and other exchange technicals thoughts.</p>

<p>I hope to meet more Dancer developers and users in a near future (sawyer at Pise maybe ?).</p>

<p>By: franck cuny on 2010-06-20T16:18:23</p>

<p>Tags: <a href="http://lumberjaph.net/Perl.rss">Perl</a> <a href="http://lumberjaph.net/Dancer.rss">Dancer</a></p>

<p><a href="http://lumberjaph.net/dancer-meeting.rss">permalink</a></p>
</div>
        </article>
      </div>
    </content>
    <published>2010-06-20T16:18:23Z</published>
    <updated>2010-06-20T16:18:23Z</updated>
    <author>
      <name>nobody</name>
    </author>
    <id>tag:labs.linkfluence.net,2006:http://lumberjaph.net/dancer-meeting.html</id>
  </entry>
  <entry>
    <title>FPW 2010 summary</title>
    <link rel="alternate" href="http://lumberjaph.net/fpw2010-summary.html" type="text/html"/>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">my small French Perl Workshop summary

First, no more
welsh. Ever.

Even if Calais was not the easiest destination for every one, it was a
really fun and intersting two days. I met nice folks, had great
discussions and drink good beers.

For those who missed this workshop, a short summary for you:


had excellent discussions with sukria about the future of Dancer
fun facts about time zone and unicode with maddingue, rgs and fperrad
interesting chat with fperrad about lua and parrot
convinced more people that Plack is the future for Perl Web development
beers, and more beers with sukria, jerome, arnaud, rgs, camille and stephane.
talked with Marc about Plack, Dancer, and other stuff




My slides are available online (in french):


introduction to github: slideshare and PDF
github explorer: slideshare and PDF


And to finish, two other summaries: sukria's
one
and twitter's timeline; and some pictures on flickr..

Thanks to laurent and sebastien for their hard work on organizing this conference.

By: franck on 2010-06-13T11:06:20

Tags: fpw perl conference

permalink
</div>
    </summary>
    <content type="html">&lt;article&gt;&lt;div class="entry"&gt;&lt;h2 id="mysmallfrenchperlworkshopsummary"&gt;my small French Perl Workshop summary&lt;/h2&gt;

&lt;p&gt;First, no more
&lt;a href="http://en.wikipedia.org/wiki/Welsh_rarebit"&gt;welsh&lt;/a&gt;. Ever.&lt;/p&gt;

&lt;p&gt;Even if Calais was not the easiest destination for every one, it was a
really fun and intersting two days. I met nice folks, had great
discussions and drink good beers.&lt;/p&gt;

&lt;p&gt;For those who missed this workshop, a short summary for you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;had excellent discussions with &lt;a href="http://www.sukria.net/fr/"&gt;sukria&lt;/a&gt; about the future of &lt;a href="http://github.com/sukria/dancer"&gt;Dancer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;fun facts about time zone and unicode with &lt;a href="http://twitter.com/maddingue"&gt;maddingue&lt;/a&gt;, &lt;a href="http://twitter.com/octoberequus"&gt;rgs&lt;/a&gt; and &lt;a href="http://github.com/fperrad"&gt;fperrad&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;interesting chat with fperrad about lua and parrot&lt;/li&gt;
&lt;li&gt;convinced more people that Plack &lt;strong&gt;is&lt;/strong&gt; the future for Perl Web development&lt;/li&gt;
&lt;li&gt;beers, and more beers with sukria, jerome, &lt;a href="http://twitter.com/ephoz"&gt;arnaud&lt;/a&gt;, rgs, &lt;a href="http://twitter.com/cmaussan"&gt;camille&lt;/a&gt; and &lt;a href="sraux"&gt;stephane&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;talked with &lt;a href="http://www.tinybox.net/"&gt;Marc&lt;/a&gt; about Plack, Dancer, and other stuff&lt;/p&gt;

&lt;p&gt;&lt;img src="http://farm5.static.flickr.com/4045/4695068097_1193f8c4d6.jpg" alt="diner"&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My slides are available online (in french):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;introduction to github: &lt;a href="http://www.slideshare.net/franckcuny/github-explorer"&gt;slideshare&lt;/a&gt; and &lt;a href="http://franck.lumberjaph.net/slides/github-explorer.pdf"&gt;PDF&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;github explorer: &lt;a href="http://www.slideshare.net/franckcuny/introduction-a-plack"&gt;slideshare&lt;/a&gt; and &lt;a href="http://franck.lumberjaph.net/slides/introduction_a_plack.pdf"&gt;PDF&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And to finish, two other summaries: &lt;a href="http://www.sukria.net/fr/archives/2010/06/12/french-perl-workshop-2010-report/"&gt;sukria's
one&lt;/a&gt;
and &lt;a href="http://twitter.com/#search?q=%23fpw2010"&gt;twitter's timeline&lt;/a&gt;; and &lt;a href="http://www.flickr.com/photos/franck_/sets/72157624263416548/"&gt;some pictures on flickr.&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks to laurent and sebastien for their hard work on organizing this conference.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By: franck on 2010-06-13T11:06:20&lt;/p&gt;

&lt;p&gt;Tags: &lt;a href="http://lumberjaph.net/fpw.rss"&gt;fpw&lt;/a&gt; &lt;a href="http://lumberjaph.net/perl.rss"&gt;perl&lt;/a&gt; &lt;a href="http://lumberjaph.net/conference.rss"&gt;conference&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://lumberjaph.net/fpw2010-summary.rss"&gt;permalink&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/article&gt;</content>
    <published>2010-06-13T11:06:20Z</published>
    <updated>2010-06-13T11:06:20Z</updated>
    <author>
      <name>nobody</name>
    </author>
    <id>tag:labs.linkfluence.net,2006:http://lumberjaph.net/fpw2010-summary.html</id>
  </entry>
  <entry>
    <title>Moosex::Net::API - update</title>
    <link rel="alternate" href="http://lumberjaph.net/moosex-net-api-update.html" type="text/html"/>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">MooseX::Net::API - update

MooseX::Net::API is a
module to help writing clients for RESTful (and even non-RESTful)
WebServices:

package my::api;
use MooseX::Net::API;

net_api_declare myapi =&gt; (
    api_base_url =&gt; 'http://api....',
    api_format   =&gt; 'json',
);

net_api_method users =&gt; (
    method      =&gt; 'GET',
    path        =&gt; '/users/:country',
    description =&gt; 'fetch a list of users',
    params      =&gt; [qw/country/],
    expected    =&gt; [qw/200 404/],
);


We've been using this module at work for the last few months on various
internal APIs, and I'm pretty pleased with the result so far.

Lately I've started to rework the core. I've tried to split most of the
functionalities into roles, and rework the code that generates the various
methods. I've also added methods to access miscellaneous information :

my $client = my::api-&gt;new;

# to get a list of API methods
$client-&gt;meta-&gt;get_all_net_api_methods();

# find an API method
my $method = $client-&gt;meta-&gt;find_net_api_method_by_name('users');

# and now informations about the method
say $method-&gt;documentation;

name:        users
description: fetch a list of useres
method:      GET
path:        /users/:country
arguments:   country
expected:    200, 404


It's not yet complete, but a new version will be available soon on
CPAN. Here is a list of some more features I plan to add quickly:


better internal API
better authorization support (OAuth!)
add more methods to provide better introspection
better unserialization
more tests and better documentation
generate POD via a PODWeaver plugin ?
plugins ?
renaming ? (not sure it really fits in the MooseX:: namespace)


http-console

I've also started
Net::HTTP::Console. It's
inspired by http-console. It
relies on MX::Net::API, and can use any libraries written with
MX::Net::API, as well as any raw RESTful API. As an example, let's use it
on twitter.

http-console --url http://api.twitter.com --format json

http://127.0.0.1:5984&gt; GET /1/statuses/public_timeline
[
    {
      "source" : "web",
      "favorited" : false,
      "geo" : null,
      "coordinates" : null,
      "place" : null,
      ...
    }
]

http://127.0.0.1:5984&gt; show headers
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
last-modified: Mon, 07 Jun 2010 15:27:12 GMT
x-transaction: 1275924432-94882-31146
x-ratelimit-reset: 1275925258
...


You can call any method from the twitter API (at the exception of the
ones that require authentication: it's not supported yet).

You can also use it with any library that uses MX::Net::API:

http-console --lib Net::Backtweet

http://api.backtweet.com&gt; help command
available commands:
- tweets_by_url
- stats_by_url
- good_tweets_by_url

http://api.backtype.com&gt; help command tweets_by_url
name:        tweets_by_url
description: Retrieve tweets that link to a given URL, whether the links are shortened or unshortened.
method:      GET
path:        /tweets/search/links

http://api.backtype.com&gt; stats_by_url {"q":"http://lumberjaph.net","key":s3kr3t"}
{
   "tweetcount" : 388
}


Arguments to the methods are serialized in JSON format. Not sure if it's the
best idea I will see if it needs improvement while using it. You can
also perform POST and PUT with content.

http://localhost:5984&gt; POST /test_rtgi_fetcher {"foo":"bar"}
{
   "ok" : true,
   "rev" : "1-fe67006eb0e02e5f0057b5b2a6672391",
   "id" : "fe3175615a34eb28153479307c000f26"
}


It's far from being complete at the moment, but I will extend it
quickly. Right now, you can define global headers, and get help for
all methods in your MX::Net::API library. Authentication is on top of my
priority list, as is alias creation, so instead of doing (on a
non-moosex::net::api lib):

GET /users/


you will do:

alias users/:country as users


then:

users {"country":"france"}


(and yes, I've switched from wordpress to blawd)

By: franck on 2010-06-10T11:55:00

Tags: moosex moose rest http-console

permalink
</div>
    </summary>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <article>
          <div class="entry"><h2 id="moosex::net::api-update">MooseX::Net::API - update</h2>

<p><a href="http://github.com/franckcuny/moosex-net-api">MooseX::Net::API</a> is a
module to help writing clients for RESTful (and even non-RESTful)
WebServices:</p>

<pre><code>package my::api;
use MooseX::Net::API;

net_api_declare myapi =&gt; (
    api_base_url =&gt; 'http://api....',
    api_format   =&gt; 'json',
);

net_api_method users =&gt; (
    method      =&gt; 'GET',
    path        =&gt; '/users/:country',
    description =&gt; 'fetch a list of users',
    params      =&gt; [qw/country/],
    expected    =&gt; [qw/200 404/],
);
</code></pre>

<p>We've been using this module at work for the last few months on various
internal APIs, and I'm pretty pleased with the result so far.</p>

<p>Lately I've started to rework the core. I've tried to split most of the
functionalities into roles, and rework the code that generates the various
methods. I've also added methods to access miscellaneous information :</p>

<pre><code>my $client = my::api-&gt;new;

# to get a list of API methods
$client-&gt;meta-&gt;get_all_net_api_methods();

# find an API method
my $method = $client-&gt;meta-&gt;find_net_api_method_by_name('users');

# and now informations about the method
say $method-&gt;documentation;

name:        users
description: fetch a list of useres
method:      GET
path:        /users/:country
arguments:   country
expected:    200, 404
</code></pre>

<p>It's not yet complete, but a new version will be available soon on
CPAN. Here is a list of some more features I plan to add quickly:</p>

<ul>
<li>better internal API</li>
<li>better authorization support (OAuth!)</li>
<li>add more methods to provide better introspection</li>
<li>better unserialization</li>
<li>more tests and better documentation</li>
<li>generate POD via a PODWeaver plugin ?</li>
<li>plugins ?</li>
<li>renaming ? (not sure it really fits in the MooseX:: namespace)</li>
</ul>

<h2 id="http-console">http-console</h2>

<p>I've also started
<a href="http://github.com/franckcuny/net-http-console"><strong>Net::HTTP::Console</strong></a>. It's
inspired by <a href="http://github.com/cloudhead/http-console">http-console</a>. It
relies on MX::Net::API, and can use any libraries written with
MX::Net::API, as well as any <em>raw</em> RESTful API. As an example, let's use it
on twitter.</p>

<pre><code>http-console --url http://api.twitter.com --format json

http://127.0.0.1:5984&gt; GET /1/statuses/public_timeline
[
    {
      "source" : "web",
      "favorited" : false,
      "geo" : null,
      "coordinates" : null,
      "place" : null,
      ...
    }
]

http://127.0.0.1:5984&gt; show headers
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
last-modified: Mon, 07 Jun 2010 15:27:12 GMT
x-transaction: 1275924432-94882-31146
x-ratelimit-reset: 1275925258
...
</code></pre>

<p>You can call any method from the twitter API (at the exception of the
ones that require authentication: it's not supported yet).</p>

<p>You can also use it with any library that uses MX::Net::API:</p>

<pre><code>http-console --lib Net::Backtweet

http://api.backtweet.com&gt; help command
available commands:
- tweets_by_url
- stats_by_url
- good_tweets_by_url

http://api.backtype.com&gt; help command tweets_by_url
name:        tweets_by_url
description: Retrieve tweets that link to a given URL, whether the links are shortened or unshortened.
method:      GET
path:        /tweets/search/links

http://api.backtype.com&gt; stats_by_url {"q":"http://lumberjaph.net","key":s3kr3t"}
{
   "tweetcount" : 388
}
</code></pre>

<p>Arguments to the methods are serialized in JSON format. Not sure if it's the
best idea I will see if it needs improvement while using it. You can
also perform POST and PUT with content.</p>

<pre><code>http://localhost:5984&gt; POST /test_rtgi_fetcher {"foo":"bar"}
{
   "ok" : true,
   "rev" : "1-fe67006eb0e02e5f0057b5b2a6672391",
   "id" : "fe3175615a34eb28153479307c000f26"
}
</code></pre>

<p>It's far from being complete at the moment, but I will extend it
quickly. Right now, you can define global headers, and get help for
all methods in your MX::Net::API library. Authentication is on top of my
priority list, as is alias creation, so instead of doing (on a
non-moosex::net::api lib):</p>

<pre><code>GET /users/
</code></pre>

<p>you will do:</p>

<pre><code>alias users/:country as users
</code></pre>

<p>then:</p>

<pre><code>users {"country":"france"}
</code></pre>

<p>(and yes, I've switched from wordpress to <a href="http://github.com/perigrin/blawd">blawd</a>)</p>

<p>By: franck on 2010-06-10T11:55:00</p>

<p>Tags: <a href="http://lumberjaph.net/moosex.rss">moosex</a> <a href="http://lumberjaph.net/moose.rss">moose</a> <a href="http://lumberjaph.net/rest.rss">rest</a> <a href="http://lumberjaph.net/http-console.rss">http-console</a></p>

<p><a href="http://lumberjaph.net/moosex-net-api-update.rss">permalink</a></p>
</div>
        </article>
      </div>
    </content>
    <published>2010-06-10T11:55:00Z</published>
    <updated>2010-06-10T11:55:00Z</updated>
    <author>
      <name>nobody</name>
    </author>
    <id>tag:labs.linkfluence.net,2006:http://lumberjaph.net/moosex-net-api-update.html</id>
  </entry>
</feed>
