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>
<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>
<p><span class="sc"><abbr title="Too long; don'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>
<contenttype="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>
<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 expe...</p></div></hr></content>
<contenttype="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>
<contenttype="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>
<contenttype="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>
<contenttype="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.
<contenttype="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>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. </p>
<blockquote>
<p>Stop write <code>TODO</code> in your code and make it now!<br />
You&rsquo;ll be surprised by the results.</p>
</blockquote>
<p>In short:</p>
<blockquote>
<p><strong>Just do it!</strong> ou <strong>Juste fait le</strong> comme auraient dit les nuls.</p>
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
<contenttype="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>
<contenttype="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>
<p>The first error is to use the <em>evil</em><code>.*</code>. Because you will match from the first to the last.</p>
<p>and you have to make this behaviour with only one regular expression. The problem is the complementary of regular languages is not regular. Then, for some expression it is absolutely not impossible.</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 <code>bullshit</code>. Here is a nice way to do that:</p>...</content>
<contenttype="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>
<contenttype="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>
<p>Why even if I believe <code>git</code> has many bad point I believe it is the best DCVS around to work with. This is why I first tell why I prefer <a href="http://bazaar-vcs.org">Bazaar</a> over <a href="http://git-scm.org">Git</a>. Secondly I&rsquo;ll talk about the only advantage of git against Bazaar which lead me to prefer it.</p>
<p>Before beginning this article, you should know I come from <em>subversion</em>. I find subversion to be a really good CVS. But I was converted to the decentralized ones.</p>
<p>There is two way of perceive version control system. Either you think in term of branches (see the really good article on </p></content>
<contenttype="html"><p>It is unbelievable you cannot filter your call with an iPhone! The only reason I see for that is a negotiation with phone operator to force users to get phone advertising. It is simple unacceptable.</p>
<p>I&rsquo;m a λ iPhone&rsquo;s user. The only way to filter your call and to manage blacklist is to <em>jailbreak</em> your iPhone. And I don&rsquo;t want to do that. Then, if like me you find it unacceptable, just write a line to Apple: <a href="http://www.apple.com/feedback/iphone.html">http://www.apple.com/feedback/iphone.html</a></p>
<p>Because with <a href="http://git-scm.org" title="Git">Git</a> you can work on many part of some project totally independently. This is the true efficiency of decentralisation.</p>
<p>Each branch use the same directory. Then you can easily change your branch. You can also change branch when some files are modified. You can then dispatch your work on many different branches and merge them on one master branch at will.</p>
<p>Using the <code>git rebase</code> you can decide which modifications should be forget or merged into only one modification.</p>
<p>What does it mean for real usage? You can focus on coding. For example, you can code, a fix for bug b01 and for bug b02 and code a feature f03. Once finished you can creat...</p></content>
<p>Here is one from many way to use <a href="http://git-scm.org" title="Git">Git</a>. This method is sufficient to work on a project. Not there is many other <em>workflows</em>.</p>
<li>Get modification done by others <span class="black"><code>git pull</code></span>,</li>
<li>See details of these modifications <span class="black"><code>git log</code></span>,</li>
<li>Many times:
<ul>
<li><em>Make an atomic modification</em></li>
<li>Verify details of this modification: <span class="black"><code>git status</code></span> and <span class="black"><code>git diff</code></span>,</li>
<p>In the first part, we saw the list of resolved problem by <a href="http://git-scm.org" title="Git">Git</a>. To resume <a href="http://git-scm.org" title="Git">Git</a> should do:</p>
<p>A detailed tutorial of <a href="http://git-scm.org">Git</a> for people knowing very few about versions systems. You&rsquo;ll understand utility of such program and how we use modern version control system. I try to stay as pragmatic as possible.</p>
</div>
</div>
<div class="corps">
<h1 class="first" id="begin-with-conclusion">Begin with conclusion</h1>
<p>Here is the list of sufficient and necessary command to use <a href="http://git-scm.org" title="Git">Git</a>. There is very few. It is normal not to understand immediately but it is to gives you an idea. Even if this article is long, 95% of <a href="http://git-scm.org" title="Git">Git</a> usage is in these 7 commands:</p>
<p>If you just want to use <a href="http://git-scm.org" title="Git">Git</a><strong>immediately</strong>, just read dark part. You read this part later to understand correctly foundations of version systems and not doing strange things.</p>
</div>
<p><a href="http://git-scm.org" title="Git">Git</a> is a <abbr title="Decentralized Concurent Versions System">DCVS</abbr>, which means a Decentralized Concurrent Versions System. Let&rsquo;s analyze each part of this long term:</p>
<contenttype="html"><p>For developer IE is a nightmare. This is why, I use a method to disable my standard CSS and enable a IE only CSS. I use jQuery to accomplish that.</p>
<contenttype="html"><p>I already talked about how <a href="/Scratch/en/blog/10_Synchronize_Custom_WebSite_with_mobileMe">I synchronized my website with mobileme</a>. I ameliorated this script in order to make it incremental.</p>
<p>Here is my new script, it first create a map which associate to each file its hash. After that it compare this file to the remote one. Then for each different file, update the content.</p>
<p>Even with this script I also have some problem. Mostly due to &lsquo;webdav&rsquo; issues. For example, renaming a folder work really badly (on Linux at least). I use webdavfs. For example:</p>
<div><pre class="twilight">
mv folder folder2
</pre></div>
<p>It returns OK and I&rsquo;ve got: </p>
<contenttype="html"><p>I discussed <a href="/Scratch/en/blog/2009-10-Focus-vs-Minimalism">earlier why I prefer to hide my navigation menu</a>. I finally decided to hide it only after a short time. Just the time needed for a user to see it. But how make it disappear only when it is not used for some time?</p>
<p>Here is how to accomplish that easily.</p>
<contenttype="html"><p>Here is a tip, I don&rsquo;t know why, but I almost always forgot how to do that.</p>
<p>When you want to launch a command and this command should not be killed after you close your terminal. Here is how to accomplish that from command line: </p>
<contenttype="html"><p>I believe the goal researched by minimalism is <strong>Focus</strong>. But I don&rsquo;t believe minimalism should be the goal. Focus should be the goal, and I believe minimalism isn&rsquo;t necessary to reach it.</p>
<p>This is why my design is not minimalist, but I decided to remove most of the navigation stuff of all pages of my website. May be I&rsquo;ll prefer to hide the menu only when you are on blog article. For now, I hide the menu everywhere on the website.</p>
<contenttype="html"><p><small><em>I explain why I had so much difficulties to use Git. There is an &ldquo;untaught rule&rdquo; that make hard to work without. Until I read the good document. </em></small></p>
<p><small><em>&ldquo;Cheap branches&rdquo; aren&rsquo;t designed to be totally isolated branches but rather should follow a &ldquo;Master Branch&rdquo;. There is a </em>Standard Workflow<em> to follow. If you don&rsquo;t follow it, you prepare yourself with some hard time with Git.</em></small></p>
</div>
<div class="corps">
<h1 class="first" id="my-way-to-decentralisation">My way to decentralisation</h1>
<h3 id="from-svn-to-bazaar">From SVN to Bazaar</h3>
<p>I was a huge user of <a href="http://subversion.tigris.org">subversion (svn)</a>. Until the day I saw this </p></content>
<p>I made a blog entry about how I tried to integrate <a href="http://disqus.com">Disqus</a>. I had to wait Disqus comment to be displayed before loading correctly my page. This is why I tried to include it in a &ldquo;non-blocking&rdquo; way. Unfortunately, I had <a href="/Scratch/en/blog/11_Load_Disqus_Asynchronously/">difficulties to make it works correctly</a>. </p>
<p>Furthermore, it was not trivial to make comment to be shared between multiple version of the same page (each page has three differents representations, one for each language and one more for the multi-language version).</p>