1109 lines
57 KiB
XML
1109 lines
57 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
|
<id>http://yannesposito.com/</id>
|
|
<title>Yogsototh's last blogs entries</title>
|
|
<updated>2012-01-15T17:14:40Z</updated>
|
|
<link rel="alternate" href="http://yannesposito.com/"/>
|
|
<link rel="self" href="http://feeds.feedburner.com/yannespositocomen"/>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>http://yannesposito.com</uri>
|
|
</author>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2012-01-15:/Scratch/en/blog/Yesod-tutorial-for-newbies/</id>
|
|
<title type="html">Haskell web programming</title>
|
|
<published>2012-01-15T17:14:40Z</published>
|
|
<updated>2012-01-15T17:14:40Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Yesod-tutorial-for-newbies/"/>
|
|
<content type="html"><p><img alt="Neo Flying at warp speed" src="/Scratch/img/blog/Yesod-tutorial-for-newbies/flying_neo.jpg" /></p>
|
|
|
|
|
|
<div class="intro">
|
|
|
|
|
|
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> A simple yesod tutorial.
|
|
Yesod is an Haskell web framework.
|
|
You shouldn&rsquo;t need to know Haskell. </p>
|
|
|
|
<blockquote>
|
|
<center><span class="sc"><b>Table of content</b></span></center>
|
|
|
|
<ul id="markdown-toc">
|
|
<li><a href="#before-the-real-start">Before the real start</a> <ul>
|
|
<li><a href="#install">Install</a></li>
|
|
<li><a href="#initialize">Initialize</a></li>
|
|
<li><a href="#configure-git">Configure git</a></li>
|
|
<li><a href="#some-last-minute-words">Some last minute words</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#echo">Echo</a> <ul>
|
|
</ul></li></ul></blockquote></div></p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2011-10-20:/Scratch/en/blog/SVG-and-m4-fractals/</id>
|
|
<title type="html">Increase the power of deficient languages.</title>
|
|
<published>2011-10-20T09:39:36Z</published>
|
|
<updated>2011-10-20T09:39:36Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/SVG-and-m4-fractals/"/>
|
|
<content type="html"><p><img alt="Yesod logo made in SVG and m4" src="/Scratch/img/blog/SVG-and-m4-fractals/main.png" /></p>
|
|
|
|
|
|
<div class="intro">
|
|
|
|
|
|
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> How to use m4 to increase the power of deficient languages. Two examples: improve <span class="sc">xslt</span> syntax and make fractal with <span class="sc">svg</span>.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p><span class="sc">xml</span> was a very nice idea about structuring data.
|
|
Some people where so enthusiastic about <span class="sc">xml</span> they saw it everywhere.
|
|
The idea was: the future is <span class="sc">xml</span>.
|
|
Then some believed it would be a good idea to invent many <span class="sc">xml</span> compatible format and even programming languages with <span class="sc">xml</span> syntax.</p>
|
|
|
|
</p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2011-10-04:/Scratch/en/blog/Yesod-excellent-ideas/</id>
|
|
<title type="html">Yesod excellent ideas</title>
|
|
<published>2011-10-04T08:18:59Z</published>
|
|
<updated>2011-10-04T08:18:59Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Yesod-excellent-ideas/"/>
|
|
<content type="html"><p><img alt="Title image" src="/Scratch/img/blog/Yesod-excellent-ideas/main.png" /></p>
|
|
|
|
|
|
<div class="intro">
|
|
|
|
|
|
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span></p>
|
|
|
|
<p><a href="http://www.yesodweb.com">Yesod</a> is a web framework which recently reached the maturity for which you should consider to use it.
|
|
Before telling you why you should learn Haskell and use yesod, I will talk about ideas yesod introduced and I didn&rsquo;t saw in other frameworks before.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<h2 id="type-safety">Type safety</h2>
|
|
|
|
<p>Let&rsquo;s start by an obligatory link from <a href="http://xkcd.com">xkcd</a>:</p>
|
|
|
|
<p><img src="http://imgs.xkcd.com/comics/exploits_of_a_mom.png" alt="SQL injection by a mom" /></p>
|
|
|
|
<p>When you create a web application, a lot of time is spent...</p></p></p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2011-09-28:/Scratch/en/blog/Higher-order-function-in-zsh/</id>
|
|
<title type="html">Higher order function in zsh</title>
|
|
<published>2011-09-28T13:15:23Z</published>
|
|
<updated>2011-09-28T13:15:23Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Higher-order-function-in-zsh/"/>
|
|
<content type="html"><p><img alt="Title image" src="/Scratch/img/blog/Higher-order-function-in-zsh/main.jpg" /></p>
|
|
|
|
|
|
<div class="intro">
|
|
|
|
|
|
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> some simple implementation of higher order function for zsh.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>Why is it important to have these functions?
|
|
Simply because, the more I programmed with zsh the more I tended to work using functional programming style.</p>
|
|
|
|
<p>The minimal to have better code are the functions <code>map</code>, <code>filter</code> and <code>fold</code>.</p>
|
|
|
|
<p>Let&rsquo;s compare.
|
|
First a program which convert all gif to png in many different directories of different projects.</p>
|
|
|
|
<p>Before ⇒</p>
|
|
|
|
<pre class="twilight">
|
|
<span class="Comment"><span class="Comment">#</span> for each directory in...</span></pre></p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2011-09-28:/Scratch/en/blog/programming-language-experience/</id>
|
|
<title type="html">Programming Language Experience</title>
|
|
<published>2011-09-28T10:21:41Z</published>
|
|
<updated>2011-09-28T10:21:41Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/programming-language-experience/"/>
|
|
<content type="html"><p><img alt="Title image" src="/Scratch/img/blog/programming-language-experience/dragon.jpg" /></p>
|
|
|
|
|
|
<div class="intro">
|
|
|
|
<span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> My short and higly subjective feelings about programming languages I used.
|
|
|
|
</div>
|
|
|
|
|
|
<h3 id="basic"><code>BASIC</code></h3>
|
|
|
|
<p><img alt="Title image" src="/Scratch/img/blog/programming-language-experience/basic.gif" class="left" />
|
|
The language of my firsts programs!
|
|
I was about 10, with an <code>MO5</code> and <code>Amstrad CPC 6128</code> and even with my <code>Atari STe</code>.
|
|
This is the language of <code>GOTO</code>s.
|
|
Ô nostalgia.
|
|
Unfortunately this might be the only interesting part of this language.</p>
|
|
|
|
<p>Today this language is obsolescent.
|
|
It is not even good to learn programming...</p></p></p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2011-08-25:/Scratch/en/blog/Learn-Vim-Progressively/</id>
|
|
<title type="html">Learn Vim Progressively</title>
|
|
<published>2011-08-25T17:28:20Z</published>
|
|
<updated>2011-08-25T17:28:20Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/"/>
|
|
<content type="html"><p><img alt="Über leet use vim!" src="/Scratch/img/blog/Learn-Vim-Progressively/uber_leet_use_vim.jpg" /></p>
|
|
|
|
|
|
<div class="intro">
|
|
|
|
|
|
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> Want to learn vim (the best text editor known to human kind) the fastest way possible. I suggest you a way. Start by learning the minimal to survive, then integrate slowly all tricks.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p><a href="http://www.vim.org">Vim</a> the Six Billion Dollar editor</p>
|
|
|
|
<blockquote>
|
|
<p>Better, Stronger, Faster.</p>
|
|
</blockquote>
|
|
|
|
<p>Learn <a href="http://www.vim.org">vim</a> and it will be your last text editor.
|
|
There isn&rsquo;t any better text editor I know.
|
|
Hard to learn, but incredible to use.</p>
|
|
|
|
<p>I suggest you to learn it in 4 steps:</p>
|
|
|
|
<ol>
|
|
<li>Survive</li>
|
|
...</ol></p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2011-08-17:/Scratch/en/blog/A-more-convenient-diff/</id>
|
|
<title type="html">A more convenient diff</title>
|
|
<published>2011-08-17T09:33:30Z</published>
|
|
<updated>2011-08-17T09:33:30Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/A-more-convenient-diff/"/>
|
|
<content type="html"><p>Diff is a very useful tool. But it is not so easy to read for us, simple mortal.</p>
|
|
|
|
<p>This is why, when you use <code>git</code> it will use a better formatting and colorize it.</p>
|
|
|
|
<p>Here is the script I use when I want to use human readable <code>diff</code> à la git. </p>
|
|
|
|
<div class="code"><div class="file"><a href="/Scratch/en/blog/A-more-convenient-diff/code/ydiff"> &#x27A5; ydiff </a></div><div class="withfile">
|
|
<pre class="twilight">
|
|
<span class="Comment"><span class="Comment">#</span>!/usr/bin/env zsh</span>
|
|
|
|
<span class="Comment"><span class="Comment">#</span> Load colors helpers</span>
|
|
autoload -U colors <span class="Keyword">&amp;&amp;</span> colors
|
|
|
|
function colorize_diff {
|
|
<span class="Keyword">while</span> read line<span class="Keyword">;</span> </pre></div></div></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2011-07-10:/Scratch/en/blog/Haskell-Mandelbrot/</id>
|
|
<title type="html">ASCII Haskell Mandelbrot</title>
|
|
<published>2011-07-10T10:41:26Z</published>
|
|
<updated>2011-07-10T10:41:26Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Haskell-Mandelbrot/"/>
|
|
<content type="html"><p>Here is the obfuscated code:</p>
|
|
|
|
<div class="code"><div class="file"><a href="/Scratch/en/blog/Haskell-Mandelbrot/code/animandel.hs"> &#x27A5; animandel.hs </a></div><div class="withfile">
|
|
<pre class="twilight">
|
|
a=27;b=79;c=<span class="Constant">C</span>(-2.0,-1.0);d=<span class="Constant">C</span>(1.0,1.0);e=<span class="Constant">C</span>(-2.501,-1.003)
|
|
<span class="Keyword">newtype</span> <span class="Constant">C</span> = <span class="Constant">C</span> (<span class="Constant">Double</span>,<span class="Constant">Double</span>) <span class="Keyword">deriving</span> (<span class="Constant">Show</span>,<span class="Constant">Eq</span>)
|
|
<span class="Keyword">instance</span> <span class="Constant">Num</span> <span class="Constant">C</span> <span class="Keyword">where</span> </pre></div></div></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2011-05-18:/Scratch/en/blog/Password-Management/</id>
|
|
<title type="html">40 character's passwords</title>
|
|
<published>2011-05-18T11:14:28Z</published>
|
|
<updated>2011-05-18T11:14:28Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/Password-Management/"/>
|
|
<content type="html"><p><img alt="Title image" src="/Scratch/img/blog/Password-Management/main.png" /></p>
|
|
|
|
|
|
<div class="intro">
|
|
|
|
|
|
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> How I manage safely my password with success for some years now.<br />
|
|
<strong><code>sha1( password + domain_name )</code></strong><br />
|
|
I memorize only one password.
|
|
I use a different password on all website.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>Disclamer, this is an unashamed attempt to make you download my iPhone app&nbsp;;-).
|
|
You&rsquo;re always here?
|
|
Even if you won&rsquo;t download my app, you should read more.
|
|
My method doesn&rsquo;t necessitate my app.
|
|
It is both safe and easy to use everyday.</p>
|
|
|
|
<p>If you just want to <em>use</em> the tools without searching to understand why it is safe, just jump at the </p></p></div></p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2011-04-20:/Scratch/en/blog/2011-04-20-Now-hosted-on-github/</id>
|
|
<title type="html">Now hosted on github</title>
|
|
<published>2011-04-20T15:22:15Z</published>
|
|
<updated>2011-04-20T15:22:15Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2011-04-20-Now-hosted-on-github/"/>
|
|
<content type="html"><p><img alt="Title image" src="/Scratch/img/blog/2011-04-20-Now-hosted-on-github/main.png" /></p>
|
|
|
|
<p>I am now hosted on github.</p>
|
|
</p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2011-01-03:/Scratch/en/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/</id>
|
|
<title type="html">Why I won't use CoffeeScript (sadly)</title>
|
|
<published>2011-01-03T08:37:26Z</published>
|
|
<updated>2011-01-03T08:37:26Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/"/>
|
|
<content type="html"><p><img alt="Title image" src="/Scratch/img/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/main.png" /></p>
|
|
|
|
|
|
<div class="encadre">
|
|
|
|
|
|
<p><em>Update</em>: I might change my mind now. Why?
|
|
I just discovered a <a href="https://github.com/rstacruz/js2coffee">js2coffee converter</a>. Furthermore Denis Knauf told me about a <code>CoffeeScript.eval</code> function.
|
|
And as Denis said: &ldquo;it is time to use Coffeescript as a javascript with Ruby-like syntax not a Ruby-like programming language&rdquo;.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="intro">
|
|
|
|
|
|
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> I would have loved to program client side using a Ruby-like syntax. But in the end, CoffeScript raised more disavantages than advantages.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>Recently I read </p></p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2011-01-01:/Scratch/en/blog/2011-01-03-Happy-New-Year/</id>
|
|
<title type="html">Happy New Year</title>
|
|
<published>2011-01-01T06:55:54Z</published>
|
|
<updated>2011-01-01T06:55:54Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2011-01-03-Happy-New-Year/"/>
|
|
<content type="html"><p>Happy New Year!</p>
|
|
|
|
<p>I was busy during the last months.
|
|
But I will revive a bit this blog.</p>
|
|
|
|
<p>I made a project to write book in markdown syntax and generating HTML and high quality PDF. I am not finished with this.</p>
|
|
|
|
<p>I had written an efficient <em class="pala">&amp;</em> simplistic MVC javascript framework.</p>
|
|
|
|
<p>Best wishes for <em>2011</em>!</p>
|
|
</content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-10-26:/Scratch/en/blog/2010-10-26-LaTeX-like-macro-and-markdown/</id>
|
|
<title type="html">LaTeX like macro for markdown</title>
|
|
<published>2010-10-26T12:30:58Z</published>
|
|
<updated>2010-10-26T12:30:58Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-10-26-LaTeX-like-macro-and-markdown/"/>
|
|
<content type="html">
|
|
<div class="intro">
|
|
|
|
|
|
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> I made a simple macro system for my blog. Now I juste have to write %<span></span>latex and it show as <span style="text-transform: uppercase">L<sup style="vertical-align: 0.15em; margin-left: -0.36em; margin-right: -0.15em; font-size: .85em">a</sup>T<sub style="vertical-align: -0.5ex; margin-left: -0.1667em; margin-right: -0.125em; font-size: 1em">e</sub>X</span>.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>I added a macro system for my blog system.
|
|
When we are used to <span style="text-transform: uppercase">L<sup style="vertical-align: 0.15em; margin-left: -0.36em; margin-right: -0.15em; font-size: .85em">a</sup>T</span></p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-10-14:/Scratch/en/blog/2010-10-14-Fun-with-wav/</id>
|
|
<title type="html">Fun with wav</title>
|
|
<published>2010-10-14T09:04:58Z</published>
|
|
<updated>2010-10-14T09:04:58Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-10-14-Fun-with-wav/"/>
|
|
<content type="html">
|
|
<div class="intro">
|
|
|
|
|
|
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> Played to process a <code>wav</code> file. <code>C</code> was easier and cleaner than Ruby.</p>
|
|
|
|
<p>edit: I wanted this program to work only on one specific machine (a x86 on a 32 bit Ubuntu). Therefore I didn&rsquo;t had any portability consideration. This is only a <em>hack</em>.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>I had to compute the sum of the absolute values of data of a <code>.wav</code> file.
|
|
For efficiency (and fun) reasons, I had chosen <code>C</code> language.</p>
|
|
|
|
<p>I didn&rsquo;t programmed in <code>C</code> for a long time.
|
|
From my memory it was a pain to read and write to files.
|
|
But in the end I was really impressed by the code I get.
|
|
It was really clean.
|
|
This is even more impressive know...</p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-10-10:/Scratch/en/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/</id>
|
|
<title type="html">Secure eMail on Mac in few steps</title>
|
|
<published>2010-10-10T16:39:00Z</published>
|
|
<updated>2010-10-10T16:39:00Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/"/>
|
|
<content type="html"><p><img alt="Title image" src="/Scratch/img/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/main.png" class="clean" /></p>
|
|
|
|
|
|
<div class="intro">
|
|
|
|
|
|
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> <em>on Mac</em></p>
|
|
|
|
<ul>
|
|
<li>Get a certificate signed by a CA: <a href="http://www.instantssl.com/ssl-certificate-products/free-email-certificate.html">click here for a free one</a>,</li>
|
|
<li>open the file,</li>
|
|
<li>delete securely the file,</li>
|
|
<li>use Mail instead of online gmail.</li>
|
|
<li>???</li>
|
|
<li>Profit</li>
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>I&rsquo;ve (re)discovered how to become S/MIME compliant.
|
|
I am now suprised how easy it was.
|
|
Some years ago it was far more difficult.
|
|
Now I&rsquo;m able to sign and encrypt my emails.</p>
|
|
|
|
</p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-10-06:/Scratch/en/blog/2010-10-06-New-Blog-Design-Constraints/</id>
|
|
<title type="html">New Blog Design Constraints</title>
|
|
<published>2010-10-06T09:33:03Z</published>
|
|
<updated>2010-10-06T09:33:03Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-10-06-New-Blog-Design-Constraints/"/>
|
|
<content type="html"><p>I changed the design of my blog.
|
|
Now it should be far cleaner.
|
|
I believe I use no CSS3 feature and far less javascript.
|
|
Of course before my website was perfectly browsable without javascript.
|
|
Unfortunately some CSS3 feature are not mature enough on some browser.
|
|
For more details you can read my older <a href="/Scratch/en/blog/2010-07-07-CSS-rendering-problems-by-navigator">blog entry</a>.
|
|
But the major problem came from, <code>font-shadow</code> and gradients.
|
|
Then my new design obey to the following rules:</p>
|
|
|
|
<ul>
|
|
<li>no CSS element begining by &lsquo;-moz&rsquo; or &lsquo;-webkit&rsquo;, etc&hellip;,</li>
|
|
<li>no text shadow,</li>
|
|
<li>clean (I mean delete) most javascript.</li>
|
|
</ul>
|
|
|
|
<p>I hope the new design please you.</p>
|
|
</content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-09-02:/Scratch/en/blog/2010-09-02-Use-git-to-calculate-trusted-mtimes/</id>
|
|
<title type="html">Use git to calculate trusted mtimes</title>
|
|
<published>2010-09-02T13:54:10Z</published>
|
|
<updated>2010-09-02T13:54:10Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-09-02-Use-git-to-calculate-trusted-mtimes/"/>
|
|
<content type="html"><p>You can remark at the bottom of each page I provide a last modification date.
|
|
This label was first calculated using the <code>mtime</code> of the file on the file system.
|
|
But many times I modify this date just to force some recompilation.
|
|
Therefore the date wasn&rsquo;t a date of <em>real</em> modification.</p>
|
|
|
|
<p>I use <a href="http://git-scm.org">git</a> to version my website.
|
|
And fortunately I can know the last date of <em>real</em> change of a file.
|
|
This is how I do this with <a href="http://nanoc.stoneship.org">nanoc</a>:</p>
|
|
|
|
<div class="code"><div class="file"><a href="/Scratch/en/blog/2010-09-02-Use-git-to-calculate-trusted-mtimes/code/gitmtime.rb"> &#x27A5; gitmtime.rb </a></div><div class="withfile">
|
|
<pre class="twilight">
|
|
<span class="Keyword">def</span> </pre></div></div></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-09-02:/Scratch/en/blog/2010-09-02-base64-and-sha1-on-iPhone/</id>
|
|
<title type="html">base64 and sha1 on iPhone</title>
|
|
<published>2010-09-01T22:02:17Z</published>
|
|
<updated>2010-09-01T22:02:17Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-09-02-base64-and-sha1-on-iPhone/"/>
|
|
<content type="html"><p>Lets be straight:
|
|
here are two functions to add to your code to have <code>base64</code> and <code>hexadecimal</code> version of the <code>sha1</code> hash of an NSString.</p>
|
|
|
|
<p>To use it, simply copy the code in your class and use as this:</p>
|
|
|
|
<pre class="twilight">
|
|
<span class="CCCPreprocessorLine">#<span class="CCCPreprocessorDirective">import</span> <span class="String"><span class="String">&lt;</span>CommonCrypto/CommonDigest.h<span class="String">&gt;</span></span></span>
|
|
...
|
|
<span class="Support">NSString</span> *b64_hash = [<span class="Variable">self</span> <span class="SupportFunction">b64_sha1<span class="SupportFunction">:</span></span><span class="String"><span class="String">@&quot;</span>some NSString to be sha1'ed<span class="String">&quot;</span></span>];
|
|
...
|
|
</pre></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-08-31:/Scratch/en/blog/2010-08-31-send-mail-from-command-line-with-attached-file/</id>
|
|
<title type="html">send mail from command line with attached file</title>
|
|
<published>2010-08-31T08:16:04Z</published>
|
|
<updated>2010-08-31T08:16:04Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-08-31-send-mail-from-command-line-with-attached-file/"/>
|
|
<content type="html"><p>I had to send a mail using only command line.
|
|
I was surprised it isn&rsquo;t straightforward at all.
|
|
I didn&rsquo;t had <code>pine</code> nor <code>mutt</code> or anything like that.
|
|
Just <code>mail</code> and <code>mailx</code>.</p>
|
|
|
|
<p>What Internet say (via google) is</p>
|
|
|
|
<pre class="twilight">
|
|
uuencode fic.jpg fic.jpg <span class="Keyword">|</span> mail -s <span class="String"><span class="String">'</span>Subject<span class="String">'</span></span>
|
|
</pre>
|
|
|
|
<p>I tried it.
|
|
And it works almost each times.
|
|
But for my file, it didn&rsquo;t worked.
|
|
I compressed it to <code>.gz</code>, <code>.bz2</code> and <code>.zip</code>.
|
|
Using <code>.bz2</code> format it worked nicely, but not with other formats.
|
|
Instead of having an attached file I saw this in my email.</p>
|
|
|
|
<pre>
|
|
begin 664 fic....</pre></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-08-23:/Scratch/en/blog/2010-08-23-Now-heberged-on-heroku/</id>
|
|
<title type="html">Now hosted by heroku</title>
|
|
<published>2010-08-23T13:05:13Z</published>
|
|
<updated>2010-08-23T13:05:13Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-08-23-Now-heberged-on-heroku/"/>
|
|
<content type="html"><h1 class="first" id="now-on-herokuhttpherokucom">Now on <a href="http://heroku.com">Heroku</a></h1>
|
|
|
|
<p>I now changed my hosting to <a href="http://heroku.com">Heroku</a>.
|
|
I believe it will be far more reliable.</p>
|
|
|
|
<p>But as you should know my website is completely static.
|
|
I use <a href="http://nanoc.stoneship.org/">nanoc</a> to generate it.
|
|
But here is the conf to make it work on heroku.</p>
|
|
|
|
<p>The root of my files is <code>/output</code>. You only need to create a <code>config.ru</code><sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> file:</p>
|
|
|
|
<div class="code"><div class="file"><a href="/Scratch/en/blog/2010-08-23-Now-heberged-on-heroku/code/config.ru"> &#x27A5; config.ru </a></div><div class="withfile">
|
|
<pre class="twilight">
|
|
<span class="Keyword">require</span> </pre></div></div></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-08-11:/Scratch/en/blog/2010-07-09-Indecidabilities/</id>
|
|
<title type="html">Undecidabilities (part 1)</title>
|
|
<published>2010-08-11T08:04:31Z</published>
|
|
<updated>2010-08-11T08:04:31Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-07-09-Indecidabilities/"/>
|
|
<content type="html">
|
|
<div class="intro">
|
|
|
|
|
|
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> I pretend to create a world to give examples of different meanings behind the word <em>undecidability</em>:</p>
|
|
|
|
<ul>
|
|
<li>Undecidability due to measure errors, </li>
|
|
<li>Big errors resulting from small initial measure error,</li>
|
|
<li>Fractal undecidability&nbsp;;</li>
|
|
<li>Logic Undecidability.</li>
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="corps">
|
|
|
|
|
|
<h1 class="first" id="the-undecidabilities">The Undecidabilities</h1>
|
|
|
|
|
|
<div class="intro">
|
|
|
|
|
|
<p>If a demiurge made our world, he certainly had a great sense of humor.
|
|
After this read, you should be convinced.
|
|
I&rsquo;ll pretend to be him.
|
|
I&rsquo;ll create a simplified world.
|
|
A world that obey to simple mathematical rules.
|
|
And I&rsquo;ll...</p></div></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-07-31:/Scratch/en/blog/2010-07-31-New-style-after-holidays/</id>
|
|
<title type="html">New style after holidays</title>
|
|
<published>2010-07-31T21:59:10Z</published>
|
|
<updated>2010-07-31T21:59:10Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-07-31-New-style-after-holidays/"/>
|
|
<content type="html"><p>Before my holidays many visitors tell me my website was too long to scroll.
|
|
This is why I completely changed my website design.
|
|
Now all should scroll smoothly on all platforms.
|
|
I was inspired by Readability and iBooks<small>&copy;</small> (the iPhone<small>&copy;</small> application).</p>
|
|
|
|
<p>Tell me what you think of this new design.</p>
|
|
</content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-07-07:/Scratch/en/blog/2010-07-07-CSS-rendering-problems-by-navigator/</id>
|
|
<title type="html">Do not use CSS gradient with Chrome</title>
|
|
<published>2010-07-07T13:43:43Z</published>
|
|
<updated>2010-07-07T13:43:43Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-07-07-CSS-rendering-problems-by-navigator/"/>
|
|
<content type="html"><p>Some <a href="http://reddit.com">Reddit</a> users reported my website was really long to load and to scroll.
|
|
They thinks it was because of the &lsquo;1px shadow&rsquo; I apply on all the text.
|
|
I was a bit surprised, because I make some test into a really <em>slow</em> virtual machine. And all have always worked fine. In fact, what slow down so much are by order of importance:</p>
|
|
|
|
<ol>
|
|
<li>Radial gradient on Chrome (not in Safari on Mac)</li>
|
|
<li>Box shadows on Firefox and Chrome</li>
|
|
</ol>
|
|
|
|
<h2 id="gradient">Gradient</h2>
|
|
|
|
<p>On Safari on Mac there is absolutely no rendering time problem. But when I use Chrome under Linux it is almost unusable.</p>
|
|
|
|
<p>Safari and Chrome use webkit, when you access my website with javascript enabled, an additionnal browser specific CSS is loaded....</p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-07-05:/Scratch/en/blog/2010-07-05-Cappuccino-and-Web-applications/</id>
|
|
<title type="html">Cappuccino vs jQuery</title>
|
|
<published>2010-07-05T11:49:04Z</published>
|
|
<updated>2010-07-05T11:49:04Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-07-05-Cappuccino-and-Web-applications/"/>
|
|
<content type="html">
|
|
<div class="intro">
|
|
|
|
|
|
<p><abbr class="sc" title="Too long; didn't read">tl;dr</abbr>:</p>
|
|
|
|
<ul>
|
|
<li>Tried to make <a href="http://yannesposito.com/Softwares/YPassword.html">YPassword</a> in jQuery and with Cappuccino.</li>
|
|
<li>Cappuccino nice in desktop browser but 1.4MB, not compatible with iPhone.</li>
|
|
<li>jQuery not as nice as the Cappuccino version but 106KB. iPhone compatible.</li>
|
|
<li>I&rsquo;ll give a try to Dashcode 3.</li>
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<hr />
|
|
|
|
<div class="intro">
|
|
|
|
|
|
<p>Before start, I must say I know Cappuccino and jQuery are no more comparable than Cocoa and the C++ standard library. One is oriented for user interface while the other is and helper for low level programming.
|
|
Nonetheless I used these two to make the same web application. This is why I compare the exp...</p></div></hr></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-06-19:/Scratch/en/blog/2010-06-19-jQuery-popup-the-easy-way/</id>
|
|
<title type="html">jQuery popup the easy way</title>
|
|
<published>2010-06-18T22:44:50Z</published>
|
|
<updated>2010-06-18T22:44:50Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-06-19-jQuery-popup-the-easy-way/"/>
|
|
<content type="html"><p>Here is a fast and easy way to create jQuery popup.</p>
|
|
|
|
<div class="code"><div class="file"><a href="/Scratch/en/blog/2010-06-19-jQuery-popup-the-easy-way/code/essai.js"> &#x27A5; essai.js </a></div><div class="withfile">
|
|
<pre class="twilight">
|
|
<span class="Comment"><span class="Comment">//</span> --- code popup ---</span>
|
|
<span class="Storage">function</span> <span class="Entity">openPopup</span>() {
|
|
<span class="Keyword">$</span>(<span class="Variable">this</span>).clone(<span class="Constant">false</span>).appendTo(<span class="Keyword">$</span>(<span class="String"><span class="String">&quot;</span>#_code<span class="String">&quot;</span></span>));
|
|
<span class="Keyword">$</span>(<span class="String"><span class="String">&quot;</span>#_code<span class="String">&quot;</span></span></pre></div></div></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-06-17:/Scratch/en/blog/2010-06-17-hide-yourself-to-analytics/</id>
|
|
<title type="html">Hide Yourself to your Analytics</title>
|
|
<published>2010-06-17T14:37:22Z</published>
|
|
<updated>2010-06-17T14:37:22Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-06-17-hide-yourself-to-analytics/"/>
|
|
<content type="html"><p>This is a way not to count your own visits to your blog.
|
|
First you should look on how <a href="/Scratch/en/blog/2010-06-17-track-events-with-google-analytics">I handle analytics</a>. All analytics are handled in one javascript file, this make things really convenient.</p>
|
|
|
|
<p>Then you need to know my method use the <code>jquery-cookie</code>.</p>
|
|
|
|
<p>I check if the key <code>admin</code> is not set in the cookie before adding the visit.</p>
|
|
|
|
<pre class="twilight">
|
|
<span class="Storage">var</span> admin <span class="Keyword">=</span> <span class="Keyword">$</span>.<span class="SupportConstant">cookie</span>(<span class="String"><span class="String">'</span>admin<span class="String">'</span></span>);
|
|
<span class="Keyword">if</span> (<span class="Keyword">!</span> admin) {
|
|
...</pre></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-06-17:/Scratch/en/blog/2010-06-17-track-events-with-google-analytics/</id>
|
|
<title type="html">Track Events with Google Analytics</title>
|
|
<published>2010-06-17T12:41:36Z</published>
|
|
<updated>2010-06-17T12:41:36Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-06-17-track-events-with-google-analytics/"/>
|
|
<content type="html"><p>Here is how to track all clicks on your website using google analytics asynchronously.</p>
|
|
|
|
<p>First in your <span class="sc">html</span> you need to use <a href="http://jquery.com">jQuery</a> and a javscript file I named <code>yga.js</code>:</p>
|
|
|
|
<pre class="twilight">
|
|
<span class="EmbeddedSource"> <span class="EmbeddedSource">&lt;</span><span class="MetaTagInline">script</span> <span class="MetaTagInline">type</span>=<span class="String"><span class="String">&quot;</span>text/javascript<span class="String">&quot;</span></span> <span class="MetaTagInline">src</span>=<span class="String"><span class="String">&quot;</span>jquery.js<span class="String">&quot;</span></span><span class="EmbeddedSource">&gt;</span><span class="EmbeddedSource">&lt;/</span><span class="MetaTagInline">scr...</span></span></pre></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-06-15:/Scratch/en/blog/2010-06-15-Get-my-blog-engine/</id>
|
|
<title type="html">Get my blog engine</title>
|
|
<published>2010-06-15T08:56:32Z</published>
|
|
<updated>2010-06-15T08:56:32Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-06-15-Get-my-blog-engine/"/>
|
|
<content type="html"><p>I published a <em>light</em> version of my blog engine based on <a href="http://nanoc.stoneship.org">nanoc</a> yesterday night. By <em>light</em>, I mean a lighter, more portable CSS (without round border).
|
|
You can get it on <a href="http://github.com/yogsototh/nanoc3_blog">github.com</a>.</p>
|
|
|
|
<p>What this system provide?</p>
|
|
|
|
<ul>
|
|
<li>All <a href="http://nanoc.stoneship.org">nanoc</a> advantages,</li>
|
|
<li>Easy multi-language handling,</li>
|
|
<li>Syntax Coloration for most languages,</li>
|
|
<li><a href="http://intensedebate.org">intenseDebate</a> comments integration (asynchronous)&nbsp;;</li>
|
|
<li>Portable with and without javascript, XHTML Strict 1.0 / CSS3,</li>
|
|
<li>Write in markdown format (no HTML editing needed),</li>
|
|
<li>Typographic ameliorations (no &lsquo;:&rsquo; ...</li></ul></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-06-14:/Scratch/en/blog/2010-06-14-multi-language-choices/</id>
|
|
<title type="html">multi language choices</title>
|
|
<published>2010-06-14T14:14:57Z</published>
|
|
<updated>2010-06-14T14:14:57Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-06-14-multi-language-choices/"/>
|
|
<content type="html"><p>I translate most of my blog entries in French and English.
|
|
Most people advice me to have one file per language. Generally it ends with:</p>
|
|
|
|
<pre class="twilight">
|
|
Bonjour,
|
|
|
|
voici un exemple de texte en français.
|
|
[image](url)
|
|
</pre>
|
|
|
|
<pre class="twilight">
|
|
Hello,
|
|
|
|
here is an example of english text.
|
|
[image](url)
|
|
</pre>
|
|
|
|
<p>This way of handling translations force you to write completely an article in one language, copy it, and translate it.</p>
|
|
|
|
<p>However, most of time, there are common parts like images, source code, etc&hellip;
|
|
When I want to correct some mistake on these parts, I have to make twice the work. With sometimes adding another mistake in only one language.</p>
|
|
|
|
<p>This is why I preferred to handle it differently.
|
|
I use <em>tags</em> on a single file.
|
|
Finally my files...</p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-05-24:/Scratch/en/blog/2010-05-24-Trees--Pragmatism-and-Formalism/</id>
|
|
<title type="html">Trees; Pragmatism and Formalism</title>
|
|
<published>2010-05-24T18:05:14Z</published>
|
|
<updated>2010-05-24T18:05:14Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-05-24-Trees--Pragmatism-and-Formalism/"/>
|
|
<content type="html">
|
|
<div class="intro">
|
|
|
|
|
|
<p><abbr title="Too Long; Don't Read"><span class="sc">tl;dr</span></abbr>: </p>
|
|
|
|
<ul>
|
|
<li>I tried to program a simple filter</li>
|
|
<li>Was blocked 2 days</li>
|
|
<li>Then stopped working like an engineer monkey</li>
|
|
<li>Used a pen and a sheet of paper</li>
|
|
<li>Made some math.</li>
|
|
<li>Crushed the problem in 10 minutes</li>
|
|
<li>Conclusion: The pragmatism shouldn&rsquo;t mean &ldquo;never use theory&rdquo;.</li>
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<h2 id="abstract-longer-than-abbr-titletoo-long-dont-readsctldrscabbr">Abstract (longer than <abbr title="Too Long; Don't Read"><span class="sc">tl;dr</span></abbr>)</h2>
|
|
|
|
<p>For my job, I needed to resolve a problem. It first seems not too hard.
|
|
Then I started working directly on my program.
|
|
I entered in the <em>infernal</em>: ...</p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-05-19:/Scratch/en/blog/2010-05-19-How-to-cut-HTML-and-repair-it/</id>
|
|
<title type="html">How to repair a cutted XML?</title>
|
|
<published>2010-05-19T20:20:34Z</published>
|
|
<updated>2010-05-19T20:20:34Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-05-19-How-to-cut-HTML-and-repair-it/"/>
|
|
<content type="html"><p>For my main page, you can see, a list of my latest blog entry. And you have the first part of each article. To accomplish that, I needed to include the begining of the entry and to cut it somewhere. But now, I had to repair this cutted HTML.</p>
|
|
|
|
<p>Here is an example:</p>
|
|
|
|
<pre class="twilight">
|
|
<span class="MetaTagAll"><span class="MetaTagAll">&lt;</span><span class="MetaTagAll">div</span> <span class="MetaTagAll">class</span>=<span class="String"><span class="String">&quot;</span>corps<span class="String">&quot;</span></span><span class="MetaTagAll">&gt;</span></span>
|
|
<span class="MetaTagAll"><span class="MetaTagAll">&lt;</span><span class="MetaTagAll">div</span> <span class="MetaTagAll">class</span>=<span class="String"><span class="String">&quot;</span>intro</span></span></pre></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-05-17:/Scratch/en/blog/2010-05-17-at-least-this-blog-revive/</id>
|
|
<title type="html">I live again!</title>
|
|
<published>2010-05-17T11:25:51Z</published>
|
|
<updated>2010-05-17T11:25:51Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-05-17-at-least-this-blog-revive/"/>
|
|
<content type="html"><p>Hi all!</p>
|
|
|
|
<blockquote cite="http://www.madore.org/~david/weblog/2010-05.html#d.2010-05-12.1752">
|
|
<p>The more you wait to do something, the more difficult it is to start doing it.</p>
|
|
</blockquote>
|
|
|
|
<p>I had to write another post for this blog. I had added many article idea in my todolist. But, I made many other things, and I&rsquo;ve always said (until now), I&rsquo;ll do this later. What changed my mind is the haunt of this simple remark about how to be productive in programming.
|
|
&gt; Stop write <code>TODO</code> in your code and make it now!<br />
|
|
&gt; You&rsquo;ll be surprised by the results.</p>
|
|
|
|
<p>In short:
|
|
&gt; <strong>Just do it!</strong> ou <strong>Juste fait le</strong> comme auraient dit les nuls.</p>
|
|
|
|
<p>Finally I&rsquo;ll certainly write blog post more often for a ...</p></p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-03-23:/Scratch/en/blog/2010-03-23-Encapsulate-git/</id>
|
|
<title type="html">Encapsulate git</title>
|
|
<published>2010-03-23T20:37:36Z</published>
|
|
<updated>2010-03-23T20:37:36Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-03-23-Encapsulate-git/"/>
|
|
<content type="html"><div class="intro">
|
|
Here is a solution to maintain divergent branches in git. Because it is easy to merge by mistake. I give a script that encapsulate git in order to forbid some merge and warn you some merge should be dangerous.
|
|
</div>
|
|
|
|
<h2 id="how-to-protect-against-your-own-dumb">how to protect against your own dumb</h2>
|
|
|
|
<p>I work on a project in which some of my git branches should remain divergent. And divergences should grow.</p>
|
|
|
|
<p>I also use some branch to contain what is common between projects.</p>
|
|
|
|
<p>Say I have some branches:</p>
|
|
|
|
<p>master: common to all branches
|
|
dev: branch devoted to unstable development
|
|
client: branch with features for all client but not general enough for master
|
|
clientA: project adapted for client A
|
|
clientB: project adapted for client B</p>
|
|
|
|
<p>Her...</p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-03-22:/Scratch/en/blog/2010-03-22-Git-Tips/</id>
|
|
<title type="html">Git Tips</title>
|
|
<published>2010-03-22T08:42:27Z</published>
|
|
<updated>2010-03-22T08:42:27Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-03-22-Git-Tips/"/>
|
|
<content type="html"><h2 class="first" id="clone-from-github-behind-an-evil-firewall">clone from github behind an evil firewall</h2>
|
|
|
|
<p>Standard:</p>
|
|
|
|
<div><pre class="twilight">
|
|
git clone git@github.com:yogsototh/project.git
|
|
</pre></div>
|
|
|
|
<p>Using HTTPS port:</p>
|
|
|
|
<div><pre class="twilight">
|
|
git clone git+ssh://git@github.com:443/yogsototh/project.git
|
|
</pre></div>
|
|
|
|
<h2 id="clone-all-branches">clone all branches</h2>
|
|
|
|
<p><code>git clone</code> can only fetch the master branch.</p>
|
|
|
|
<p>If you don&rsquo;t have much branches, you can simply use clone your project and then use the following command:</p>
|
|
|
|
<div><pre class="twilight">
|
|
git branch --track local_branch remote_branch
|
|
</pre></div>
|
|
|
|
<p>for example:</p>
|
|
<div><pre class="twilight">
|
|
$ git clone git@github:yogsototh/example.git
|
|
$ git branch
|
|
master *
|
|
$ git ...</pre></div></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-02-23:/Scratch/en/blog/2010-02-23-When-regexp-is-not-the-best-solution/</id>
|
|
<title type="html">When regexp is not the best solution</title>
|
|
<published>2010-02-23T08:09:52Z</published>
|
|
<updated>2010-02-23T08:09:52Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-02-23-When-regexp-is-not-the-best-solution/"/>
|
|
<content type="html"><p>Regular expression are really useful. Unfortunately, they are not always the best way of doing things.
|
|
Particularly when transformations you want to make are easy.</p>
|
|
|
|
<p>I wanted to know how to get file extension from filename the fastest way possible. There is 3 natural way of doing this:</p>
|
|
|
|
<div><pre class="twilight">
|
|
<span class="Comment"><span class="Comment">#</span> regexp</span>
|
|
str.<span class="Entity">match</span>(<span class="StringRegexp"><span class="StringRegexp">/</span></span><span class="StringRegexp"><span class="StringRegexp"><span class="StringRegexp">[</span>^.<span class="StringRegexp">]</span></span>*$</span><span class="StringRegexp"><span class="StringRegexp">/</span></span>);
|
|
ext<span class="Keyword">=</span><span class="Variable"><span class="Variable">...</span></span></pre></div></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-02-18:/Scratch/en/blog/2010-02-18-split-a-file-by-keyword/</id>
|
|
<title type="html">split a file by keyword</title>
|
|
<published>2010-02-18T13:29:14Z</published>
|
|
<updated>2010-02-18T13:29:14Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-02-18-split-a-file-by-keyword/"/>
|
|
<content type="html"><p>Strangely enough, I didn&rsquo;t find any built-in tool to split a file by keyword. I made one myself in <code>awk</code>. I put it here mostly for myself. But it could also helps someone else.
|
|
The following code split a file for each line containing the word <code>UTC</code>.</p>
|
|
|
|
<div><pre class="twilight">
|
|
<span class="Comment"><span class="Comment">#</span>!/usr/bin/env awk</span>
|
|
<span class="Entity">BEGIN</span>{i=0;}
|
|
<span class="StringRegexp"><span class="StringRegexp">/</span>UTC<span class="StringRegexp">/</span></span> {
|
|
i+=1;
|
|
FIC=<span class="SupportFunction">sprintf</span>(<span class="String"><span class="String">&quot;</span>fic.%03d<span class="String">&quot;</span></span>,i);
|
|
}
|
|
{<span class="SupportFunction">print</span> <span class="Variable"></span></pre></div></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-02-16:/Scratch/en/blog/2010-02-16-All-but-something-regexp--2-/</id>
|
|
<title type="html">Pragmatic Regular Expression Exclude (2)</title>
|
|
<published>2010-02-16T08:33:21Z</published>
|
|
<updated>2010-02-16T08:33:21Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-02-16-All-but-something-regexp--2-/"/>
|
|
<content type="html"><p>In my <a href="previouspost">previous post</a> I had given some trick to match all except something. On the same idea, the trick to match the smallest possible string. Say you want to match the string between &lsquo;a&rsquo; and &lsquo;b&rsquo;, for example, you want to match:</p>
|
|
|
|
<pre class="twilight">
|
|
a.....<span class="Constant"><strong>a......b</strong></span>..b..a....<span class="Constant"><strong>a....b</strong></span>...
|
|
</pre>
|
|
|
|
<p>Here are two common errors and a solution:</p>
|
|
|
|
<pre class="twilight">
|
|
/a.*b/
|
|
<span class="Constant"><strong>a.....a......b..b..a....a....b</strong></span>...
|
|
</pre>
|
|
|
|
<p>The first error is to use the <em>evil</em> <code>.*</code>. Because you will match from the first to the last.</p>
|
|
|
|
<pre class="twilight">
|
|
/a.*?b/
|
|
<span class="Constant"><strong>...</strong></span></pre></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-02-15:/Scratch/en/blog/2010-02-15-All-but-something-regexp/</id>
|
|
<title type="html">Pragmatic Regular Expression Exclude</title>
|
|
<published>2010-02-15T09:16:12Z</published>
|
|
<updated>2010-02-15T09:16:12Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-02-15-All-but-something-regexp/"/>
|
|
<content type="html"><p>Sometimes you cannot simply write:</p>
|
|
|
|
<div><pre class="twilight">
|
|
<span class="Keyword">if</span> str.<span class="Entity">match</span>(regexp) <span class="Keyword">and</span>
|
|
<span class="Keyword">not</span> str.<span class="Entity">match</span>(other_regexp)
|
|
do_something
|
|
</pre></div>
|
|
|
|
<p>and you have to make this behaviour with only one regular expression.
|
|
But, there exists a major problem: the complementary of a regular language might not be regular.
|
|
Then, for some expression it is absolutely impossible to negate a regular expression.</p>
|
|
|
|
<p>But sometimes with some simple regular expression it should be possible<sup><a href="#note1">&dagger;</a></sup>. Say you want to match everything containing the some word say <code>bull</code> but don&rsquo;t want to match </p></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-01-12:/Scratch/en/blog/2010-01-12-antialias-font-in-Firefox-under-Ubuntu/</id>
|
|
<title type="html">antialias font in Firefox under Ubuntu</title>
|
|
<published>2010-01-12T14:36:40Z</published>
|
|
<updated>2010-01-12T14:36:40Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-01-12-antialias-font-in-Firefox-under-Ubuntu/"/>
|
|
<content type="html"><p>How to stop using bad Microsoft© font under Ubuntu Linux in order to user nice anti aliased font under Firefox.</p>
|
|
|
|
<p>Just modify the <code>/etc/fonts/local.conf</code> with the following code: </p>
|
|
|
|
<div>
|
|
<div class="code"><div class="file"><a href="/Scratch/en/blog/2010-01-12-antialias-font-in-Firefox-under-Ubuntu/code/local.conf"> &#x27A5; local.conf </a></div><div class="withfile">
|
|
<pre class="twilight">
|
|
|
|
<span class="DoctypeXmlProcessing"><span class="DoctypeXmlProcessing">&lt;?</span><span class="DoctypeXmlProcessing">xml</span><span class="DoctypeXmlProcessing"> version</span>=<span class="DoctypeXmlProcessing"><span class="DoctypeXmlProcessing">&quot;</span>1.0<span class="DoctypeXmlProcessing">&quot;</span></span><span class="DoctypeXmlProcessing">?&gt;</span></span>
|
|
</pre></div></div></div></content>
|
|
</entry>
|
|
<entry>
|
|
<id>tag:yannesposito.com,2010-01-04:/Scratch/en/blog/2010-01-04-Change-default-shell-on-Mac-OS-X/</id>
|
|
<title type="html">Change default shell on Mac OS X</title>
|
|
<published>2010-01-04T10:31:47Z</published>
|
|
<updated>2010-01-04T10:31:47Z</updated>
|
|
<author>
|
|
<name>Yann Esposito</name>
|
|
<uri>yannesposito.com</uri>
|
|
</author>
|
|
<link rel="alternate" href="http://yannesposito.com/Scratch/en/blog/2010-01-04-Change-default-shell-on-Mac-OS-X/"/>
|
|
<content type="html"><p>I just found a way to change the default shell on Mac OS X. This note is mostly for me, but somebody else should find it useful. Just launch the following command: </p>
|
|
|
|
<div><pre class="twilight">
|
|
<span class="Keyword">&gt;</span> chsh
|
|
</pre></div>
|
|
</content>
|
|
</entry>
|
|
</feed>
|