publishing

This commit is contained in:
yogsototh 2013-03-16 09:31:39 +01:00
parent 83dda36094
commit 2229b217a2
157 changed files with 5006 additions and 5409 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -60,7 +60,7 @@
</blockquote>
<ul>
<li><a href="http://ypassword.espozito.com">Official YPassword website</a></li>
<li><a href="http://yann.esposito.free.fr/recherche.php?css=blue&amp;amp;lang=en">My research activities.</a></li>
<li><a href="http://yann.esposito.free.fr/recherche.php?css=blue&amp;lang=en">My research activities.</a></li>
<li><a href="http://yann.esposito.free.fr/">My student website. ✞ 2007</a></li>
</ul>
</div>

View file

@ -32,7 +32,34 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
</div>
<div id="titre">
<h1>Nanoc</h1>
</div>
<div class="flush"></div>
<div id="afterheader" class="article">
<div class="corps">
<h1 id="what-is-nanoc">What is nanoc?</h1>
<p>It is not exactly a <abbr title="Content Management System">CMS</abbr>. But a Framework to generate static web pages.</p>
<p>You have to program yourself webpages, the code to generate the menu…</p>
<p>I added feature to make my website multilingual for example</p>
<p>Youll can find many informations on the <a href="http://nanoc.stoneship.org">official nanoc website</a>.</p>
</div>
<div id="social">
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/01_nanoc/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/01_nanoc" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/01_nanoc" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
@ -43,41 +70,7 @@
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
<div id="titre">
<h1>Nanoc</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<h1 id="what-is-nanoc">What is nanoc?</h1>
<p>It is not exactly a <abbr title="Content Management System">CMS</abbr>. But a Framework to generate static web pages.</p>
<p>You have to program yourself webpages, the code to generate the menu…</p>
<p>I added feature to make my website multilingual for example</p>
<p>Youll can find many informations on the <a href="http://nanoc.stoneship.org">official nanoc website</a>.</p>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -95,6 +88,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2008-10-10

View file

@ -32,16 +32,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -49,7 +41,7 @@
<h1>Better than Grep</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="update">update</h1>
<p>As <a href="http://www.theworkinggeek.com">Andy Lester</a> told me <a href="http://betterthangrep.com"><code>ack</code></a> is a simple file you only have to copy in your <code>~/bin</code> folder. Now Ive got <code>ack</code> on my professional server.</p>
@ -74,25 +66,26 @@ listeFic=( <em><em>/</em>(.) ) autoload zargs zargs $listeFic grep $1 |
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/02_ackgrep/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/02_ackgrep" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/02_ackgrep" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -110,6 +103,7 @@ listeFic=( <em><em>/</em>(.) ) autoload zargs zargs $listeFic grep $1 |
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-07-22

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>A try to demystify 'Lost Highway'</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/03_losthighway/intro.jpg" alt="Lost Highway" /></p>
<div class="small">
@ -131,25 +123,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/03_losthighway/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/03_losthighway" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/03_losthighway" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -167,6 +160,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-08-04

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>DRM are EVIL</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="drm-are-evil-1">DRM are EVIL (+1)</h1>
<p>My wife bought about 500€ (at least) of TV Shows on iTunes. She bought the first season of Battlestar Gallactica in english (she notified the language after the dowload). DRM make it impossible to play it with french sub-titles.</p>
@ -70,25 +62,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/04_drm/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/04_drm" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/04_drm" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -106,6 +99,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-08-15

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Git remote branch creation</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h2 id="easiest-remote-git-branch-creation">easiest remote Git branch creation</h2>
<p>I use git simply to synchronize stuff for personnal projects. Therefore, when I create a local branch I want most of time this branch to be created remotely.</p>
@ -66,25 +58,26 @@ branch=<span class="math">1<em>g</em><em>i</em><em>t</em><em>b</em><em>r</em></s
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/05_git_create_remote_branch/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/05_git_create_remote_branch" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/05_git_create_remote_branch" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -102,6 +95,7 @@ branch=<span class="math">1<em>g</em><em>i</em><em>t</em><em>b</em><em>r</em></s
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-08-17

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Git for self</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/06_How_I_use_git/central_architecture.png" alt="central architecture" /></p>
<p>I use <a href="http://www.git-scm.org/">Git</a> to manage my personnal projects. I have a centralized repository which all my computer should synchronize with. Unfortunately I didnt find clearly what I needed on the official Git documentation.</p>
@ -175,25 +167,26 @@ done</code></pre>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/06_How_I_use_git/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/06_How_I_use_git" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/06_How_I_use_git" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -211,6 +204,7 @@ done</code></pre>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-08-18

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Screensaver compilation option for Snow Leopard<sub>©</sub></h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="how-to-recompile-your-screensaver-to-be-snow-leopardc-compatible">How to recompile your screensaver to be Snow Leopard(c) compatible</h1>
<p>I upgraded to Mac OS X 10.6 Snow Leopard(c), and my <a href="../../../../YBlog/YClock.html">YClock</a> screensaver didnt work on it. After searching on google, the problem seems to be just a recompilation away. Unfortunately, even recompiling it in 64 bit it didnt work either. After a bit more research (thanks to <a href="http://community.electricsheep.org/node/236">ElectricSheep</a> ).</p>
@ -61,25 +53,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/07_Screensaver_compilation_option_for_Snow_Leopard/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/07_Screensaver_compilation_option_for_Snow_Leopard" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/07_Screensaver_compilation_option_for_Snow_Leopard" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -97,6 +90,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-06

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>ssh to Listen 443 on Snow Leopard</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="surf-everywhere-as-if-you-were-at-home">Surf everywhere as if you were at home</h1>
<p>In order to bypass <em>evil</em> company firewall and to surf safely on unsafe <sc>wifi</sc>. I keep an ssh server listening on the port 443.</p>
@ -112,25 +104,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/08_Configure_ssh_to_listen_the_port_443_on_Snow_Leopard/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/08_Configure_ssh_to_listen_the_port_443_on_Snow_Leopard" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/08_Configure_ssh_to_listen_the_port_443_on_Snow_Leopard" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -148,6 +141,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-07

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Why I didn't keep whos.amung.us</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>I changed from <a href="http://whos.amung.us">whos.amung.us</a> to <a href="http://www.google.com/analytics">Google Analytics</a>.</p>
<p>Most of time I prefer not to use the same product as everybody and try some new. But this time I believe whosamung.us had too much ads on the page. I had to put their image on my website and they only give then number of user currently on the website, not the number of visits.</p>
@ -66,25 +58,26 @@ Google Analytics <big><strong>&gt;</strong></big> Whos Amung Us
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/09_Why_I_didn-t_keep_whosamung-us/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/09_Why_I_didn-t_keep_whosamung-us" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/09_Why_I_didn-t_keep_whosamung-us" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -102,6 +95,7 @@ Google Analytics <big><strong>&gt;</strong></big> Whos Amung Us
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-11

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Synchronize Custom WebSite with mobileMe</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="update-20120111">Update <small>(2012/01/11)</small></h1>
<p>iDisk should soon disapear. This entry is mainly obsolescent now.</p>
@ -284,25 +276,26 @@ print -P -- &quot; Publish terminated&quot;</code></pre>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/10_Synchronize_Custom_WebSite_with_mobileMe/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/10_Synchronize_Custom_WebSite_with_mobileMe" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/10_Synchronize_Custom_WebSite_with_mobileMe" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -320,6 +313,7 @@ print -P -- &quot; Publish terminated&quot;</code></pre>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-11

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Load Disqus Asynchronously</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="update">Update</h1>
<p>In fact this method works for old threads. But it fails to create new post threads. This is why I tried and be conquered by <a href="http://intensedebate.com">intensedebate</a>, as you can see in the bottom of this page.</p>
@ -73,14 +65,14 @@
<h3 id="javascript">Javascript</h3>
<p>replace:</p>
<div>
<pre class="sourceCode javascript"><code class="sourceCode javascript">&lt;script type=<span class="st">&quot;text/javascript&quot;</span> src=<span class="st">&quot;http://disqus.com/forums/YOUR_DISQUS_ID/embed.js&quot;</span>&gt;&lt;/script&gt;</code></pre>
<pre class="sourceCode javascript"><code class="sourceCode javascript">&lt;script type=<span class="st">&quot;text/javascript&quot;</span> src=<span class="st">&quot;http://disqus.com/forums/YOUR_DISQUS_ID/embed.js&quot;</span>&gt;&lt;<span class="ot">/script&gt;</span></code></pre>
</div>
<p>by</p>
<div>
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="kw">window</span>.<span class="fu">disqus</span>_<span class="fu">no</span>_<span class="fu">style</span>=<span class="kw">true</span>;
$(<span class="kw">document</span>).<span class="fu">ready</span>(<span class="kw">function</span>(){
$.<span class="fu">getScript</span>(<span class="st">&quot;http://disqus.com/forums/YOUR_DISQUS_ID/embed.js&quot;</span>);
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="ot">window</span>.<span class="fu">disqus_no_style</span>=<span class="kw">true</span>;
<span class="fu">$</span>(document).<span class="fu">ready</span>(<span class="kw">function</span>(){
<span class="ot">$</span>.<span class="fu">getScript</span>(<span class="st">&quot;http://disqus.com/forums/YOUR_DISQUS_ID/embed.js&quot;</span>);
});</code></pre>
</div>
@ -92,25 +84,26 @@ $(<span class="kw">document</span>).<span class="fu">ready</span>(<span class="k
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/11_Load_Disqus_Asynchronously/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/11_Load_Disqus_Asynchronously" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/11_Load_Disqus_Asynchronously" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -128,6 +121,7 @@ $(<span class="kw">document</span>).<span class="fu">ready</span>(<span class="k
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-17

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Disqus versus Intense Debate (Why I switched)</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="disqus-vs.-intense-debate"><a href="http://disqus.com/">Disqus</a> <em>vs.</em> <a href="http://intensedebate.com/">Intense Debate</a></h1>
<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 “non-blocking” way. Unfortunately, I had <a href="../../../../Scratch/en/blog/11_Load_Disqus_Asynchronously/">difficulties to make it works correctly</a>.</p>
@ -59,13 +51,13 @@
<p>During the time I tried to integrate <a href="http://disqus.com/">Disqus</a> I never tried <a href="http://intensedebate.com">Intense Debate</a>. Now that I have tried, i must confess it does exactly what I needed.</p>
<p>In order to make it fully asynchronous, youve just to download their common js and replace the following line:</p>
<div>
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="kw">document</span>.<span class="fu">getElementsByTagName</span>(<span class="st">&quot;head&quot;</span>)[<span class="dv">0</span>].<span class="fu">appendChild</span>(commentScript);</code></pre>
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="ot">document</span>.<span class="fu">getElementsByTagName</span>(<span class="st">&quot;head&quot;</span>)[<span class="dv">0</span>].<span class="fu">appendChild</span>(commentScript);</code></pre>
</div>
<p>by:</p>
<div>
<pre class="sourceCode javascript"><code class="sourceCode javascript">$(<span class="kw">document</span>).<span class="fu">ready</span>( <span class="kw">function</span>() {
<span class="kw">document</span>.<span class="fu">getElementsByTagName</span>(<span class="st">&quot;head&quot;</span>)[<span class="dv">0</span>].<span class="fu">appendChild</span>(commentScript);
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="fu">$</span>(document).<span class="fu">ready</span>( <span class="kw">function</span>() {
<span class="ot">document</span>.<span class="fu">getElementsByTagName</span>(<span class="st">&quot;head&quot;</span>)[<span class="dv">0</span>].<span class="fu">appendChild</span>(commentScript);
});</code></pre>
</div>
@ -79,25 +71,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2009-09-Disqus-versus-Intense-Debate--Why-I-switched-/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2009-09-Disqus-versus-Intense-Debate--Why-I-switched-" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2009-09-Disqus-versus-Intense-Debate--Why-I-switched-" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -115,6 +108,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-28

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>jQuery Tag Cloud</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>Here is how I done the tag cloud of my blog. It is done mostly in jQuery. All my site is static and pages are generated with <a href="nanoc.stoneship.org">nanoc</a>. It is (in my humble opinion) the modern geek way to make a website. The tagcloud should work for machine with and without javascript.</p>
<p>This is why Ill give only a Ruby Generator, not a full javascript generator. But you can easily translate from Ruby to Javascript.</p>
@ -64,12 +56,12 @@
<h1 id="jquery">jQuery</h1>
<p>Here is the simple jQuery code:</p>
<div>
<pre class="sourceCode javascript"><code class="sourceCode javascript"> $(<span class="kw">document</span>).<span class="fu">ready</span>( <span class="kw">function</span>(){$(<span class="ch">'.list'</span>).<span class="fu">hide</span>();} );
<span class="kw">function</span> tagSelected(id) {
$(<span class="ch">'.list'</span>).<span class="fu">hide</span>();
$(<span class="ch">'#'</span>+id).<span class="fu">fadeIn</span>();
$(<span class="ch">'.tag.selected'</span>).<span class="fu">removeClass</span>(<span class="ch">'selected'</span>);
$(<span class="ch">'#tag_'</span>+id).<span class="fu">addClass</span>(<span class="ch">'selected'</span>);
<pre class="sourceCode javascript"><code class="sourceCode javascript"> <span class="fu">$</span>(document).<span class="fu">ready</span>( <span class="kw">function</span>(){<span class="fu">$</span>(<span class="st">'.list'</span>).<span class="fu">hide</span>();} );
<span class="kw">function</span> <span class="fu">tagSelected</span>(id) {
<span class="fu">$</span>(<span class="st">'.list'</span>).<span class="fu">hide</span>();
<span class="fu">$</span>(<span class="st">'#'</span>+id).<span class="fu">fadeIn</span>();
<span class="fu">$</span>(<span class="st">'.tag.selected'</span>).<span class="fu">removeClass</span>(<span class="st">'selected'</span>);
<span class="fu">$</span>(<span class="st">'#tag_'</span>+id).<span class="fu">addClass</span>(<span class="st">'selected'</span>);
}</code></pre>
</div>
@ -248,25 +240,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2009-09-jQuery-Tag-Cloud/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2009-09-jQuery-Tag-Cloud" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2009-09-jQuery-Tag-Cloud" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -284,6 +277,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-23

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>replace all except some part</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>My problem is simple:</p>
<p>I want to filter a text except some part of it. I can match easily the part I dont want to be filtered. For example</p>
@ -123,25 +115,26 @@ allExceptCode(<span class="st">:filter</span>, content)
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2009-09-replace-all-except-some-part/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2009-09-replace-all-except-some-part" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2009-09-replace-all-except-some-part" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -159,6 +152,7 @@ allExceptCode(<span class="st">:filter</span>, content)
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-22

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>custom website synchronisation with mobileme (2)</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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>
@ -128,25 +120,26 @@ if [[ “$1” = “-s” ]]; then swap else if [[ “$1” = “-d” ]]; then
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2009-10-28-custom-website-synchronisation-with-mobileme--2-/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2009-10-28-custom-website-synchronisation-with-mobileme--2-" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2009-10-28-custom-website-synchronisation-with-mobileme--2-" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -164,6 +157,7 @@ if [[ “$1” = “-s” ]]; then swap else if [[ “$1” = “-d” ]]; then
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-10-28

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>How to handle evil IE</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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>
<div>
@ -76,25 +68,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2009-10-30-How-to-handle-evil-IE/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2009-10-30-How-to-handle-evil-IE" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2009-10-30-How-to-handle-evil-IE" class="social">g</a>
<br></br>
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -112,6 +105,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-10-30

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Focus &gt; Minimalism</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>I believe the goal researched by minimalism is <strong>Focus</strong>. But I dont believe minimalism should be the goal. Focus should be the goal, and I believe minimalism isnt 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 Ill prefer to hide the menu only when you are on blog article. For now, I hide the menu everywhere on the website.</p>
@ -74,19 +66,19 @@ top: 5em; left: 0; position: fixed; width: 10em; z-index: 9000; } ~~~~~~
<p>The javascript code (using jQuery)</p>
<div>
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="kw">function</span> hideMenu() {
$(<span class="ch">'#entete'</span>).<span class="fu">animate</span>({<span class="dt">left</span>:<span class="st">&quot;-10em&quot;</span>}, <span class="dv">500</span> );
$(<span class="ch">'#menuButton'</span>).<span class="fu">html</span>(<span class="ch">'&amp;rarr;'</span>);
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="kw">function</span> <span class="fu">hideMenu</span>() {
<span class="fu">$</span>(<span class="st">'#entete'</span>).<span class="fu">animate</span>({<span class="dt">left</span>:<span class="st">&quot;-10em&quot;</span>}, <span class="dv">500</span> );
<span class="fu">$</span>(<span class="st">'#menuButton'</span>).<span class="fu">html</span>(<span class="st">'&amp;rarr;'</span>);
}
<span class="kw">function</span> showMenu() {
$(<span class="ch">'#entete'</span>).<span class="fu">animate</span>({<span class="dt">left</span>:<span class="st">&quot;0em&quot;</span>}, <span class="dv">500</span> );
$(<span class="ch">'#menuButton'</span>).<span class="fu">html</span>(<span class="ch">'&amp;larr;'</span>);
<span class="kw">function</span> <span class="fu">showMenu</span>() {
<span class="fu">$</span>(<span class="st">'#entete'</span>).<span class="fu">animate</span>({<span class="dt">left</span>:<span class="st">&quot;0em&quot;</span>}, <span class="dv">500</span> );
<span class="fu">$</span>(<span class="st">'#menuButton'</span>).<span class="fu">html</span>(<span class="st">'&amp;larr;'</span>);
}
<span class="kw">function</span> toggleMenu() {
<span class="kw">if</span> ( $(<span class="ch">'#entete'</span>).<span class="fu">css</span>(<span class="ch">'left'</span>)==<span class="ch">'-10em'</span> ) {
showMenu();
<span class="kw">function</span> <span class="fu">toggleMenu</span>() {
<span class="kw">if</span> ( <span class="fu">$</span>(<span class="st">'#entete'</span>).<span class="fu">css</span>(<span class="st">'left'</span>)==<span class="st">'-10em'</span> ) {
<span class="fu">showMenu</span>();
} <span class="kw">else</span> {
hideMenu();
<span class="fu">hideMenu</span>();
}
}</code></pre>
</div>
@ -95,25 +87,26 @@ top: 5em; left: 0; position: fixed; width: 10em; z-index: 9000; } ~~~~~~
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2009-10-Focus-vs-Minimalism/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2009-10-Focus-vs-Minimalism" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2009-10-Focus-vs-Minimalism" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -131,6 +124,7 @@ top: 5em; left: 0; position: fixed; width: 10em; z-index: 9000; } ~~~~~~
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-10-22

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>How to preload your site with style</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h2 id="example">Example</h2>
<p>Here is a live example of what appear while loading my pages.</p>
@ -114,8 +106,8 @@ Loading… <img style="border: none; background-color: none; background: none" s
<p>and the associated jQuery code:</p>
<div>
<pre class="sourceCode javascript"><code class="sourceCode javascript">$(<span class="kw">document</span>).<span class="fu">ready</span>(<span class="kw">function</span>(){
$(<span class="ch">'#blackpage'</span>).<span class="fu">fadeOut</span>();
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="fu">$</span>(document).<span class="fu">ready</span>(<span class="kw">function</span>(){
<span class="fu">$</span>(<span class="st">'#blackpage'</span>).<span class="fu">fadeOut</span>();
});</code></pre>
</div>
@ -124,25 +116,26 @@ Loading… <img style="border: none; background-color: none; background: none" s
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2009-10-How-to-preload-your-site-with-style/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2009-10-How-to-preload-your-site-with-style" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2009-10-How-to-preload-your-site-with-style" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -160,6 +153,7 @@ Loading… <img style="border: none; background-color: none; background: none" s
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-10-03

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Menu waiting to hide himself</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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>
@ -102,25 +94,26 @@ autoHideMenu(0);</code></pre>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2009-10-Wait-to-hide-a-menu-in-jQuery/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2009-10-Wait-to-hide-a-menu-in-jQuery" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2009-10-Wait-to-hide-a-menu-in-jQuery" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -138,6 +131,7 @@ autoHideMenu(0);</code></pre>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-10-26

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>launch daemon from command line</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>Here is a tip, I dont 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>
@ -62,25 +54,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2009-10-launch-daemon-from-command-line/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2009-10-launch-daemon-from-command-line" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2009-10-launch-daemon-from-command-line" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -98,6 +91,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-10-23

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Untaught Git usage</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><small> <em>I explain why I had so much difficulties to use Git. There is an “untaught rule” that make hard to work without. Until I read the good document. </em></small></p>
<p><small> <em> “Cheap branches” arent designed to be totally isolated branches but rather should follow a “Master Branch”. There is a </em>Standard Workflow<em> to follow. If you dont follow it, you prepare yourself with some hard time with Git.</em> </small></p>
@ -190,25 +182,26 @@ OK
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2009-10-untaught-git-usage/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2009-10-untaught-git-usage" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2009-10-untaught-git-usage" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -226,6 +219,7 @@ OK
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-10-13

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Git for n00b</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<div class="intro">
@ -437,25 +429,26 @@ $ git logfull</code></pre>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2009-11-12-Git-for-n00b/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2009-11-12-Git-for-n00b" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2009-11-12-Git-for-n00b" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -473,6 +466,7 @@ $ git logfull</code></pre>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-11-12

View file

@ -33,7 +33,31 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
</div>
<div id="titre">
<h1>iphone call filter</h1>
</div>
<div class="flush"></div>
<div id="afterheader" class="article">
<div class="corps">
<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>Im a λ iPhones user. The only way to filter your call and to manage blacklist is to <em>jailbreak</em> your iPhone. And I dont 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>
</div>
<div id="social">
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2009-12-06-iphone-call-filter/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2009-12-06-iphone-call-filter" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2009-12-06-iphone-call-filter" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
@ -44,38 +68,7 @@
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
<div id="titre">
<h1>iphone call filter</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<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>Im a λ iPhones user. The only way to filter your call and to manage blacklist is to <em>jailbreak</em> your iPhone. And I dont 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>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -93,6 +86,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-12-06

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Git vs. Bzr</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<div class="intro">
@ -140,25 +132,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2009-12-14-Git-vs--Bzr/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2009-12-14-Git-vs--Bzr" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2009-12-14-Git-vs--Bzr" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -176,6 +169,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-12-14

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Change default shell on Mac OS X</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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>
@ -61,25 +53,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-01-04-Change-default-shell-on-Mac-OS-X/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-01-04-Change-default-shell-on-Mac-OS-X" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-01-04-Change-default-shell-on-Mac-OS-X" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -97,6 +90,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-01-04

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>antialias font in Firefox under Ubuntu</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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>
@ -115,25 +107,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-01-12-antialias-font-in-Firefox-under-Ubuntu/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-01-12-antialias-font-in-Firefox-under-Ubuntu" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-01-12-antialias-font-in-Firefox-under-Ubuntu" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -151,6 +144,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-01-12

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Pragmatic Regular Expression Exclude</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>Sometimes you cannot simply write:</p>
<div>
@ -88,25 +80,26 @@ Notice this method is not always the best. For example try to write a regular ex
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-02-15-All-but-something-regexp/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-02-15-All-but-something-regexp" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-02-15-All-but-something-regexp" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -124,6 +117,7 @@ Notice this method is not always the best. For example try to write a regular ex
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-02-15

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Pragmatic Regular Expression Exclude (2)</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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 a and b, for example, you want to match:</p>
<pre class="twilight">
@ -119,7 +111,7 @@ That string should not match. This is why if we really want to match it correctl
<p>Yes a bit complicated. But what if the string I wanted to match was even longer?</p>
<p>Here is the algorithm way to handle this easily. You reduce the problem to the first one letter matching:</p>
<div>
<p><code class="perl"> # transform a simple randomly choosen character # to an unique ID # (you should verify the identifier is REALLY unique) # beware the unique ID must not contain the # choosen character s/X/<em>was_x</em>/g s/Y/<em>was_y</em>/g</p>
<p><code class="perl"> # transform a simple randomly choosen character # to an unique ID # (you should verify the identifier is REALLY unique) # beware the unique ID must not contain the # choosen character s/X/<em>was</em>x_/g s/Y/<em>was</em>y_/g</p>
<h1 id="transform-the-long-string-in-this-simple-character">transform the long string in this simple character</h1>
s/
<li>
@ -131,7 +123,7 @@ s/X/
<li>
<p>/g s/Y/&lt;/li&gt;/g</p>
<h1 id="retransform-the-choosen-character-back">retransform the choosen character back</h1>
s/<em>was_x</em>/X/g s/<em>was_y</em>/Y/g </code>
s/<em>was</em>x_/X/g s/<em>was</em>y_/Y/g </code>
</div>
<p>And it works in only 9 lines for any beginning and ending string. This solution should look less <em>I AM THE GREAT REGEXP M45T3R, URAN00B</em>, but is more convenient in my humble opinion. Further more, using this last solution prove you master regexp, because you know it is difficult to manage such problems with only a regexp.</p>
@ -140,25 +132,26 @@ s/<em>was_x</em>/X/g s/<em>was_y</em>/Y/g </code>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-02-16-All-but-something-regexp--2-/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-02-16-All-but-something-regexp--2-" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-02-16-All-but-something-regexp--2-" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -176,6 +169,7 @@ s/<em>was_x</em>/X/g s/<em>was_y</em>/Y/g </code>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-02-16

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>split a file by keyword</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>Strangely enough, I didnt 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>
@ -71,25 +63,26 @@ Mon Dec 7 10:32:30 UTC 2009
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-02-18-split-a-file-by-keyword/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-02-18-split-a-file-by-keyword" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-02-18-split-a-file-by-keyword" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -107,6 +100,7 @@ Mon Dec 7 10:32:30 UTC 2009
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-02-18

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>When regexp is not the best solution</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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>
@ -97,25 +89,26 @@ chomp: 0.820000 0.040000 0.860000 ( 0.947432)
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-02-23-When-regexp-is-not-the-best-solution/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-02-23-When-regexp-is-not-the-best-solution" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-02-23-When-regexp-is-not-the-best-solution" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -133,6 +126,7 @@ chomp: 0.820000 0.040000 0.860000 ( 0.947432)
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-02-23

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Git Tips</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h2 id="clone-from-github-behind-an-evil-firewall">clone from github behind an evil firewall</h2>
<p>Standard:</p>
@ -86,25 +78,26 @@ $ zsh $ cd project $ for br in <span class="math">(<em>g</em><em>i</em><em>t</em
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-03-22-Git-Tips/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-03-22-Git-Tips" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-03-22-Git-Tips" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -122,6 +115,7 @@ $ zsh $ cd project $ for br in <span class="math">(<em>g</em><em>i</em><em>t</em
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-03-22

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Encapsulate git</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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.
@ -108,25 +100,26 @@ case ARGV[0] when allmerges then do_all_merges when merge then do_me
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-03-23-Encapsulate-git/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-03-23-Encapsulate-git" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-03-23-Encapsulate-git" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -144,6 +137,7 @@ case ARGV[0] when allmerges then do_all_merges when merge then do_me
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-03-23

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>I live again!</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>Hi all!</p>
<blockquote>
@ -76,25 +68,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-05-17-at-least-this-blog-revive/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-05-17-at-least-this-blog-revive" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-05-17-at-least-this-blog-revive" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -112,6 +105,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-05-17

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>How to repair a cutted XML?</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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>
@ -121,25 +113,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-05-19-How-to-cut-HTML-and-repair-it/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-05-19-How-to-cut-HTML-and-repair-it" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-05-19-How-to-cut-HTML-and-repair-it" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -157,6 +150,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-05-19

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Trees; Pragmatism and Formalism</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<div class="intro">
@ -243,25 +235,26 @@ M - V - M - V - tag2 tag1
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-05-24-Trees--Pragmatism-and-Formalism/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-05-24-Trees--Pragmatism-and-Formalism" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-05-24-Trees--Pragmatism-and-Formalism" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -279,6 +272,7 @@ M - V - M - V - tag2 tag1
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-05-24

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>multi language choices</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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">
@ -84,25 +76,26 @@ here is an example of english text.
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-06-14-multi-language-choices/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-06-14-multi-language-choices" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-06-14-multi-language-choices" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -120,6 +113,7 @@ here is an example of english text.
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-06-14

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Get my blog engine</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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>
@ -117,25 +109,26 @@ multi/blog/2010-06-01-the-title/third_part.md
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-06-15-Get-my-blog-engine/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-06-15-Get-my-blog-engine" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-06-15-Get-my-blog-engine" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -153,6 +146,7 @@ multi/blog/2010-06-01-the-title/third_part.md
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-06-15

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,16 +42,16 @@
<h1>Hide Yourself to your Analytics</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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="sourceCode javascript"><code class="sourceCode javascript"> <span class="kw">var</span> admin = $.<span class="fu">cookie</span>(<span class="ch">'admin'</span>);
<pre class="sourceCode javascript"><code class="sourceCode javascript"> <span class="kw">var</span> admin = <span class="ot">$</span>.<span class="fu">cookie</span>(<span class="st">'admin'</span>);
<span class="kw">if</span> (! admin) {
<span class="co">// put your analytics code here</span>
} <span class="kw">else</span> {
<span class="kw">console</span>.<span class="fu">log</span>(<span class="st">&quot;[WARNING] you're HIDDEN to analytics&quot;</span>);
<span class="ot">console</span>.<span class="fu">log</span>(<span class="st">&quot;[WARNING] you're HIDDEN to analytics&quot;</span>);
}</code></pre>
<p>then create two <sc>html</sc> files. One to hide:</p>
<pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;?xml</span> version=&quot;1.0&quot; encoding=&quot;utf-8&quot;<span class="kw">?&gt;</span>
@ -72,8 +64,8 @@
<span class="kw">&lt;script</span><span class="ot"> type=</span><span class="st">&quot;text/javascript&quot;</span><span class="ot"> src=</span><span class="st">&quot;jquery.cookie.js&quot;</span><span class="kw">&gt;&lt;/script&gt;</span>
<span class="kw">&lt;script&gt;</span>
<span class="er"> $(document).ready(function(){</span>
$.<span class="fu">cookie</span>(<span class="ch">'admin'</span>,<span class="dv">1</span>);
$(<span class="ch">'#info'</span>).<span class="fu">html</span>(<span class="ch">'Analytics can no more see you.'</span>)
<span class="er"> $.cookie('admin',1);</span>
<span class="er"> $('#info').html('Analytics can no more see you.')</span>
});
<span class="kw">&lt;/script&gt;</span>
<span class="kw">&lt;title&gt;</span>Hide to analytics<span class="kw">&lt;/title&gt;</span>
@ -93,8 +85,8 @@
<span class="kw">&lt;script</span><span class="ot"> type=</span><span class="st">&quot;text/javascript&quot;</span><span class="ot"> src=</span><span class="st">&quot;jquery.cookie.js&quot;</span><span class="kw">&gt;&lt;/script&gt;</span>
<span class="kw">&lt;script&gt;</span>
<span class="er"> $(document).ready(function(){</span>
$.<span class="fu">cookie</span>(<span class="ch">'admin'</span>,null);
$(<span class="ch">'#info'</span>).<span class="fu">html</span>(<span class="ch">'Analytics can see you.'</span>)
<span class="er"> $.cookie('admin',null);</span>
<span class="er"> $('#info').html('Analytics can see you.')</span>
});
<span class="kw">&lt;/script&gt;</span>
<span class="kw">&lt;title&gt;</span>Hide to analytics<span class="kw">&lt;/title&gt;</span>
@ -107,25 +99,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-06-17-hide-yourself-to-analytics/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-06-17-hide-yourself-to-analytics" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-06-17-hide-yourself-to-analytics" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -143,6 +136,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-06-17

View file

@ -33,7 +33,83 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
</div>
<div id="titre">
<h1>Track Events with Google Analytics</h1>
</div>
<div class="flush"></div>
<div id="afterheader" class="article">
<div class="corps">
<p>Here is how to track all clicks on your website using google analytics asynchronously.</p>
<p>First in your <sc>html</sc> you need to use <a href="http://jquery.com">jQuery</a> and a javscript file I named <code>yga.js</code>:</p>
<pre class="sourceCode html"><code class="sourceCode html"> <span class="kw">&lt;script</span><span class="ot"> type=</span><span class="st">&quot;text/javascript&quot;</span><span class="ot"> src=</span><span class="st">&quot;jquery.js&quot;</span><span class="kw">&gt;&lt;/script&gt;</span>
<span class="kw">&lt;script</span><span class="ot"> type=</span><span class="st">&quot;text/javascript&quot;</span><span class="ot"> src=</span><span class="st">&quot;yga.js&quot;</span><span class="kw">&gt;&lt;/script&gt;</span></code></pre>
<p>And here is the <code>yga.js</code> file:</p>
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="fu">$</span>(document).<span class="fu">ready</span>( <span class="kw">function</span>() {
<span class="co">// add an event to all link for google analytics</span>
<span class="fu">$</span>(<span class="st">'a'</span>).<span class="fu">click</span>(<span class="kw">function</span> () {
<span class="co">// tell analytics to save event</span>
<span class="kw">try</span> {
<span class="kw">var</span> identifier=<span class="fu">$</span>(<span class="kw">this</span>).<span class="fu">attr</span>(<span class="st">'id'</span>) ;
<span class="kw">var</span> href=<span class="fu">$</span>(<span class="kw">this</span>).<span class="fu">attr</span>(<span class="st">'href'</span>)
<span class="kw">var</span> label=<span class="st">&quot;&quot;</span>;
<span class="kw">if</span> ( <span class="kw">typeof</span>( identifier ) != <span class="st">'undefined'</span> ) {
label=label+<span class="st">'[id]:'</span>+identifier
category=<span class="st">'JSLink'</span>
}
<span class="kw">if</span> ( <span class="kw">typeof</span>( href ) != <span class="st">'undefined'</span> ) {
label=label+<span class="st">' [href]:'</span>+href
<span class="kw">if</span> ( href[<span class="dv">0</span>] == <span class="st">'#'</span> ) {
category=<span class="st">'Anchor'</span>;
} <span class="kw">else</span> {
category=<span class="st">'Link'</span>;
}
}
<span class="ot">_gaq</span>.<span class="fu">push</span>([<span class="st">'_trackEvent'</span>, category, <span class="st">'clicked'</span>, label]);
<span class="co">// console.log('[tracked]: ' + category + ' ; clicked ; ' + label );</span>
}
<span class="kw">catch</span> (err) {
<span class="ot">console</span>.<span class="fu">log</span>(err);
}
<span class="co">// pause to allow google script to run</span>
<span class="kw">var</span> date = <span class="kw">new</span> <span class="fu">Date</span>();
<span class="kw">var</span> curDate = <span class="kw">null</span>;
<span class="kw">do</span> {
curDate = <span class="kw">new</span> <span class="fu">Date</span>();
} <span class="kw">while</span>(curDate-date &lt; <span class="dv">300</span>);
});
});
<span class="kw">var</span> _gaq = _gaq || [];
<span class="ot">_gaq</span>.<span class="fu">push</span>([<span class="st">'_setAccount'</span>, <span class="st">'UA-XXXXXXXX-1'</span>]);
<span class="ot">_gaq</span>.<span class="fu">push</span>([<span class="st">'_trackPageview'</span>]);
(<span class="kw">function</span>() {
<span class="kw">var</span> ga = <span class="ot">document</span>.<span class="fu">createElement</span>(<span class="st">'script'</span>); <span class="ot">ga</span>.<span class="fu">type</span> = <span class="st">'text/javascript'</span>; <span class="ot">ga</span>.<span class="fu">async</span> = <span class="kw">true</span>;
<span class="ot">ga</span>.<span class="fu">src</span> = (<span class="st">'https:'</span> == <span class="ot">document</span>.<span class="ot">location</span>.<span class="fu">protocol</span> ? <span class="st">'https://ssl'</span> : <span class="st">'http://www'</span>) + <span class="st">'.google-analytics.com/ga.js'</span>;
<span class="kw">var</span> s = <span class="ot">document</span>.<span class="fu">getElementsByTagName</span>(<span class="st">'script'</span>)[<span class="dv">0</span>]; <span class="ot">s</span>.<span class="ot">parentNode</span>.<span class="fu">insertBefore</span>(ga, s);
})();</code></pre>
<p>Replace the: <code>UA-XXXXXXXX-1</code> by your google analytics code and youre done.</p>
<p>To see what occurs, simply go in <code>Content</code> and <code>Event Tracking</code> as shown in the following screenshot:</p>
<p><img src="../../../../Scratch/img/blog/2010-06-17-track-events-with-google-analytics/GA_events.png" alt /></p>
<p>Happy tracking!</p>
</div>
<div id="social">
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-06-17-track-events-with-google-analytics/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-06-17-track-events-with-google-analytics" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-06-17-track-events-with-google-analytics" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
@ -44,90 +120,7 @@
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
<div id="titre">
<h1>Track Events with Google Analytics</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<p>Here is how to track all clicks on your website using google analytics asynchronously.</p>
<p>First in your <sc>html</sc> you need to use <a href="http://jquery.com">jQuery</a> and a javscript file I named <code>yga.js</code>:</p>
<pre class="sourceCode html"><code class="sourceCode html"> <span class="kw">&lt;script</span><span class="ot"> type=</span><span class="st">&quot;text/javascript&quot;</span><span class="ot"> src=</span><span class="st">&quot;jquery.js&quot;</span><span class="kw">&gt;&lt;/script&gt;</span>
<span class="kw">&lt;script</span><span class="ot"> type=</span><span class="st">&quot;text/javascript&quot;</span><span class="ot"> src=</span><span class="st">&quot;yga.js&quot;</span><span class="kw">&gt;&lt;/script&gt;</span></code></pre>
<p>And here is the <code>yga.js</code> file:</p>
<pre class="sourceCode javascript"><code class="sourceCode javascript">$(<span class="kw">document</span>).<span class="fu">ready</span>( <span class="kw">function</span>() {
<span class="co">// add an event to all link for google analytics</span>
$(<span class="ch">'a'</span>).<span class="fu">click</span>(<span class="kw">function</span> () {
<span class="co">// tell analytics to save event</span>
<span class="kw">try</span> {
<span class="kw">var</span> identifier=$(<span class="kw">this</span>).<span class="fu">attr</span>(<span class="ch">'id'</span>) ;
<span class="kw">var</span> href=$(<span class="kw">this</span>).<span class="fu">attr</span>(<span class="ch">'href'</span>)
<span class="kw">var</span> label=<span class="st">&quot;&quot;</span>;
<span class="kw">if</span> ( <span class="kw">typeof</span>( identifier ) != <span class="ch">'undefined'</span> ) {
label=label+<span class="ch">'[id]:'</span>+identifier
category=<span class="ch">'JSLink'</span>
}
<span class="kw">if</span> ( <span class="kw">typeof</span>( href ) != <span class="ch">'undefined'</span> ) {
label=label+<span class="ch">' [href]:'</span>+href
<span class="kw">if</span> ( href[<span class="dv">0</span>] == <span class="ch">'#'</span> ) {
category=<span class="ch">'Anchor'</span>;
} <span class="kw">else</span> {
category=<span class="ch">'Link'</span>;
}
}
<span class="kw">_gaq</span>.<span class="fu">push</span>([<span class="ch">'_trackEvent'</span>, category, <span class="ch">'clicked'</span>, label]);
<span class="co">// console.log('[tracked]: ' + category + ' ; clicked ; ' + label );</span>
}
<span class="kw">catch</span> (err) {
<span class="kw">console</span>.<span class="fu">log</span>(err);
}
<span class="co">// pause to allow google script to run</span>
<span class="kw">var</span> date = <span class="kw">new</span> <span class="kw">Date</span>();
<span class="kw">var</span> curDate = null;
<span class="kw">do</span> {
curDate = <span class="kw">new</span> <span class="kw">Date</span>();
} <span class="kw">while</span>(curDate-date &lt; <span class="dv">300</span>);
});
});
<span class="kw">var</span> _gaq = _gaq || [];
<span class="kw">_gaq</span>.<span class="fu">push</span>([<span class="ch">'_setAccount'</span>, <span class="ch">'UA-XXXXXXXX-1'</span>]);
<span class="kw">_gaq</span>.<span class="fu">push</span>([<span class="ch">'_trackPageview'</span>]);
(<span class="kw">function</span>() {
<span class="kw">var</span> ga = <span class="kw">document</span>.<span class="fu">createElement</span>(<span class="ch">'script'</span>); <span class="kw">ga</span>.<span class="fu">type</span> = <span class="ch">'text/javascript'</span>; <span class="kw">ga</span>.<span class="fu">async</span> = <span class="kw">true</span>;
<span class="kw">ga</span>.<span class="fu">src</span> = (<span class="ch">'https:'</span> == <span class="kw">document</span>.<span class="fu">location</span>.<span class="fu">protocol</span> ? <span class="ch">'https://ssl'</span> : <span class="ch">'http://www'</span>) + <span class="ch">'.google-analytics.com/ga.js'</span>;
<span class="kw">var</span> s = <span class="kw">document</span>.<span class="fu">getElementsByTagName</span>(<span class="ch">'script'</span>)[<span class="dv">0</span>]; <span class="kw">s.parentNode</span>.<span class="fu">insertBefore</span>(ga, s);
})();</code></pre>
<p>Replace the: <code>UA-XXXXXXXX-1</code> by your google analytics code and youre done.</p>
<p>To see what occurs, simply go in <code>Content</code> and <code>Event Tracking</code> as shown in the following screenshot:</p>
<p><img src="../../../../Scratch/img/blog/2010-06-17-track-events-with-google-analytics/GA_events.png" alt /></p>
<p>Happy tracking!</p>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -145,6 +138,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-06-17

View file

@ -33,7 +33,55 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
</div>
<div id="titre">
<h1>jQuery popup the easy way</h1>
</div>
<div class="flush"></div>
<div id="afterheader" class="article">
<div class="corps">
<p>Here is a fast and easy way to create jQuery popup.</p>
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="co">// --- code popup ---</span>
<span class="kw">function</span> <span class="fu">openPopup</span>() {
<span class="fu">$</span>(<span class="kw">this</span>).<span class="fu">clone</span>(<span class="kw">false</span>).<span class="fu">appendTo</span>(<span class="fu">$</span>(<span class="st">&quot;#_code&quot;</span>));
<span class="fu">$</span>(<span class="st">&quot;#_code&quot;</span>).<span class="fu">show</span>();
}
<span class="kw">function</span> <span class="fu">closePopup</span>() {
<span class="fu">$</span>(<span class="st">&quot;#_code&quot;</span>).<span class="fu">html</span>(<span class="st">&quot;&quot;</span>);
<span class="fu">$</span>(<span class="st">&quot;#_code&quot;</span>).<span class="fu">hide</span>();
}
<span class="kw">function</span> <span class="fu">initCode</span>() {
<span class="fu">$</span>(<span class="st">&quot;.code&quot;</span>).<span class="fu">click</span>(openPopup);
<span class="fu">$</span>(<span class="st">&quot;.code&quot;</span>).<span class="fu">css</span>({<span class="dt">cursor</span>: <span class="st">&quot;pointer&quot;</span>});
<span class="fu">$</span>(<span class="st">'body'</span>).<span class="fu">append</span>(<span class="st">'&lt;div id=&quot;_code&quot;&gt;&lt;/div&gt;'</span>);
<span class="fu">$</span>(<span class="st">'#_code'</span>).<span class="fu">css</span>( { <span class="st">'text-align'</span>: <span class="st">&quot;justify&quot;</span>, <span class="dt">position</span>: <span class="st">&quot;fixed&quot;</span>,
<span class="dt">left</span>:<span class="dv">0</span>, <span class="dt">top</span>:<span class="dv">0</span>, <span class="dt">width</span>: <span class="st">&quot;100%&quot;</span>, <span class="dt">height</span>: <span class="st">&quot;100%&quot;</span>,
<span class="st">&quot;background-color&quot;</span>: <span class="st">&quot;rgba(0, 0, 0, 0.8)&quot;</span>, <span class="st">'z-index'</span>:<span class="dv">2000</span>, <span class="st">'padding'</span>:<span class="st">'3px'</span>} );
<span class="fu">$</span>(<span class="st">'#_code'</span>).<span class="fu">hide</span>();
<span class="fu">$</span>(<span class="st">'#_code'</span>).<span class="fu">click</span>(closePopup);
}
<span class="co">// --- end of code popup section ---</span></code></pre>
<p>What does this code do?</p>
<p>At the loading of the page, I create a <code>div</code> as wide as the window. This <code>div</code> is a bit transparent. Then I hide it. I also take care to its <code>z-index</code> value to be sure it is behind all elements.</p>
<p>Then when we click on a <code>div</code> of class <code>code</code>, I copy the content into this new wide <code>div</code>, and I show it. Really simple but really efficient. No need to use a <code>jQuery</code> plugin.</p>
</div>
<div id="social">
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-06-19-jQuery-popup-the-easy-way/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-06-19-jQuery-popup-the-easy-way" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-06-19-jQuery-popup-the-easy-way" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
@ -44,62 +92,7 @@
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
<div id="titre">
<h1>jQuery popup the easy way</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<p>Here is a fast and easy way to create jQuery popup.</p>
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="co">// --- code popup ---</span>
<span class="kw">function</span> openPopup() {
$(<span class="kw">this</span>).<span class="fu">clone</span>(<span class="kw">false</span>).<span class="fu">appendTo</span>($(<span class="st">&quot;#_code&quot;</span>));
$(<span class="st">&quot;#_code&quot;</span>).<span class="fu">show</span>();
}
<span class="kw">function</span> closePopup() {
$(<span class="st">&quot;#_code&quot;</span>).<span class="fu">html</span>(<span class="st">&quot;&quot;</span>);
$(<span class="st">&quot;#_code&quot;</span>).<span class="fu">hide</span>();
}
<span class="kw">function</span> initCode() {
$(<span class="st">&quot;.code&quot;</span>).<span class="fu">click</span>(openPopup);
$(<span class="st">&quot;.code&quot;</span>).<span class="fu">css</span>({<span class="dt">cursor</span>: <span class="st">&quot;pointer&quot;</span>});
$(<span class="ch">'body'</span>).<span class="fu">append</span>(<span class="ch">'&lt;div id=&quot;_code&quot;&gt;&lt;/div&gt;'</span>);
$(<span class="ch">'#_code'</span>).<span class="fu">css</span>( { <span class="ch">'text-align'</span>: <span class="st">&quot;justify&quot;</span>, <span class="dt">position</span>: <span class="st">&quot;fixed&quot;</span>,
<span class="dt">left</span>:<span class="dv">0</span>, <span class="dt">top</span>:<span class="dv">0</span>, <span class="dt">width</span>: <span class="st">&quot;100%&quot;</span>, <span class="dt">height</span>: <span class="st">&quot;100%&quot;</span>,
<span class="st">&quot;background-color&quot;</span>: <span class="st">&quot;rgba(0, 0, 0, 0.8)&quot;</span>, <span class="ch">'z-index'</span>:<span class="dv">2000</span>, <span class="ch">'padding'</span>:<span class="ch">'3px'</span>} );
$(<span class="ch">'#_code'</span>).<span class="fu">hide</span>();
$(<span class="ch">'#_code'</span>).<span class="fu">click</span>(closePopup);
}
<span class="co">// --- end of code popup section ---</span></code></pre>
<p>What does this code do?</p>
<p>At the loading of the page, I create a <code>div</code> as wide as the window. This <code>div</code> is a bit transparent. Then I hide it. I also take care to its <code>z-index</code> value to be sure it is behind all elements.</p>
<p>Then when we click on a <code>div</code> of class <code>code</code>, I copy the content into this new wide <code>div</code>, and I show it. Really simple but really efficient. No need to use a <code>jQuery</code> plugin.</p>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -117,6 +110,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-06-19

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Cappuccino vs jQuery</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<div class="intro">
@ -146,25 +138,26 @@ hash=sha1( masterPassword + leakedTimes + domainName )
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-07-05-Cappuccino-and-Web-applications/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-07-05-Cappuccino-and-Web-applications" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-07-05-Cappuccino-and-Web-applications" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -182,6 +175,7 @@ hash=sha1( masterPassword + leakedTimes + domainName )
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-07-05

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Do not use CSS gradient with Chrome</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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 1px shadow 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 style="list-style-type: decimal">
@ -70,25 +62,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-07-07-CSS-rendering-problems-by-navigator/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-07-07-CSS-rendering-problems-by-navigator" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-07-07-CSS-rendering-problems-by-navigator" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -106,6 +99,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-07-07

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Undecidabilities (part 1)</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>&lt;% # toremove_ %&gt;</p>
<div class="intro">
@ -145,25 +137,26 @@ Q(x) :
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-07-09-Indecidabilities/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-07-09-Indecidabilities" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-07-09-Indecidabilities" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -181,6 +174,7 @@ Q(x) :
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-08-11

View file

@ -33,7 +33,31 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
</div>
<div id="titre">
<h1>New style after holidays</h1>
</div>
<div class="flush"></div>
<div id="afterheader" class="article">
<div class="corps">
<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(c) (the iPhone(c) application).</p>
<p>Tell me what you think of this new design.</p>
</div>
<div id="social">
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-07-31-New-style-after-holidays/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-07-31-New-style-after-holidays" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-07-31-New-style-after-holidays" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
@ -44,38 +68,7 @@
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
<div id="titre">
<h1>New style after holidays</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<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(c) (the iPhone(c) application).</p>
<p>Tell me what you think of this new design.</p>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -93,6 +86,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-07-31

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Now hosted by heroku</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="now-on-heroku">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>
@ -117,25 +109,26 @@ git push heroku master</code></pre>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-08-23-Now-heberged-on-heroku/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-08-23-Now-heberged-on-heroku" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-08-23-Now-heberged-on-heroku" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -153,6 +146,7 @@ git push heroku master</code></pre>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-08-23

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>send mail from command line with attached file</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>I had to send a mail using only command line. I was surprised it isnt straightforward at all. I didnt 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>
@ -94,38 +86,36 @@ H4sICB6Ke0wAA2Rjcl93aXRob3V0X2tleXdvcmQuY3N2ANSdW5ubOJPH7/e7
&lt;/div&gt;
&lt;div id=&quot;social&quot;&gt;
&lt;span&gt;
&lt;a class=&quot;rss&quot; href=&quot;http://feeds.feedburner.com/yannespositocomen&quot;&gt;RSS&lt;/a&gt;
&lt;/span&gt;
&lt;span&gt;
&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;yogsototh&quot;&gt;Tweet&lt;/a&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;
&lt;/span&gt;
&lt;span&gt;
&lt;div class=&quot;g-plusone&quot; data-size=&quot;medium&quot; data-annotation=&quot;inline&quot; data-width=&quot;106&quot;&gt;&lt;/div&gt;
&lt;a target=&quot;_blank&quot; href=&quot;http://feeds.feedburner.com/yannespositocomen&quot; class=&quot;social&quot;&gt;r&lt;/a&gt;
·
&lt;a target=&quot;_blank&quot; href=&quot;https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-08-31-send-mail-from-command-line-with-attached-file/index.html%22via%22@yogsototh&quot; class=&quot;social&quot;&gt;t&lt;/a&gt;
·
&lt;a target=&quot;_blank&quot; href=&quot;http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-08-31-send-mail-from-command-line-with-attached-file/index.html&quot; class=&quot;social&quot;&gt;`&lt;/a&gt;
·
&lt;a target=&quot;_blank&quot; href=&quot;https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-08-31-send-mail-from-command-line-with-attached-file/index.html&quot; class=&quot;social&quot;&gt;g&lt;/a&gt;
&lt;br/&gt;
&lt;a class=&quot;message&quot; href=&quot;/Scratch/en/blog/Social-link-the-right-way/&quot;&gt;These social sharing links preserve your privacy&lt;/a&gt;
&lt;/div&gt;
&lt;div id=&quot;navigation&quot;&gt;
&lt;a href=&quot;/&quot;&gt;Home&lt;/a&gt;
&lt;span class=&quot;sep&quot;&gt;¦&lt;/span&gt;
&lt;a href=&quot;/Scratch/en/blog&quot;&gt;Blog&lt;/a&gt;
&lt;span class=&quot;sep&quot;&gt;¦&lt;/span&gt;
&lt;a href=&quot;/Scratch/en/softwares&quot;&gt;Softwares&lt;/a&gt;
&lt;span class=&quot;sep&quot;&gt;¦&lt;/span&gt;
&lt;a href=&quot;/Scratch/en/about&quot;&gt;About&lt;/a&gt;
&lt;/div&gt;
&lt;div id=&quot;totop&quot;&gt;&lt;a href=&quot;#header&quot;&gt;↑ Top ↑&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;corps&quot; id=&quot;comment&quot;&gt;
&lt;h2 class=&quot;first&quot;&gt;Comments&lt;/h2&gt;
&lt;div id=&quot;disqus_thread&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
(function() {
var po = document.createElement(" script'); po.type="text/javascript" ; po.async="true;" po.src="https://apis.google.com/js/plusone.js" ; var s="document.getElementsByTagName('script')[0];" s.parentNode.insertBefore(po, s); })(); < script>
</span>
<div class="flush"></div>
</div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'yannesposito'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
var disqus_shortname = " yannesposito'; required: replace example with your forum shortname * * * DON'T EDIT BELOW THIS LINE * * * (function() { var dsq="document.createElement('script');" dsq.type="text/javascript" ; dsq.async="true;" dsq.src="http://" + disqus_shortname + '.disqus.com embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); < script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-08-31

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Use git to calculate trusted mtimes</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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 wasnt 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>
@ -73,25 +65,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-09-02-Use-git-to-calculate-trusted-mtimes/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-09-02-Use-git-to-calculate-trusted-mtimes" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-09-02-Use-git-to-calculate-trusted-mtimes" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -109,6 +102,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-09-02

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>base64 and sha1 on iPhone</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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>
@ -105,25 +97,26 @@ NSString *hex_hash = [self hex_sha1:@&quot;some NSString to be sha1'ed&quot;];</
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-09-02-base64-and-sha1-on-iPhone/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-09-02-base64-and-sha1-on-iPhone" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-09-02-base64-and-sha1-on-iPhone" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -141,6 +134,7 @@ NSString *hex_hash = [self hex_sha1:@&quot;some NSString to be sha1'ed&quot;];</
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-09-02

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>New Blog Design Constraints</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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>
@ -62,25 +54,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-10-06-New-Blog-Design-Constraints/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-10-06-New-Blog-Design-Constraints" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-10-06-New-Blog-Design-Constraints" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -98,6 +91,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-10-06

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Secure eMail on Mac in few steps</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/main.png" alt="Title image" /></p>
<div class="intro">
@ -81,25 +73,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -117,6 +110,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-10-10

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Fun with wav</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<div class="intro">
@ -305,25 +297,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-10-14-Fun-with-wav/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-10-14-Fun-with-wav" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-10-14-Fun-with-wav" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -341,6 +334,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-10-14

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>LaTeX like macro for markdown</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<div class="intro">
@ -112,25 +104,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2010-10-26-LaTeX-like-macro-and-markdown/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2010-10-26-LaTeX-like-macro-and-markdown" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2010-10-26-LaTeX-like-macro-and-markdown" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -148,6 +141,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2010-10-26

View file

@ -32,7 +32,34 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
</div>
<div id="titre">
<h1>Happy New Year</h1>
</div>
<div class="flush"></div>
<div id="afterheader" class="article">
<div class="corps">
<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>&amp;</em> simplistic MVC javascript framework.</p>
<p>Best wishes for <em>2011</em>!</p>
</div>
<div id="social">
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2011-01-03-Happy-New-Year/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2011-01-03-Happy-New-Year" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2011-01-03-Happy-New-Year" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
@ -43,41 +70,7 @@
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
<div id="titre">
<h1>Happy New Year</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<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>&amp;</em> simplistic MVC javascript framework.</p>
<p>Best wishes for <em>2011</em>!</p>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -95,6 +88,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2011-01-01

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Why I won't use CoffeeScript (sadly)</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/main.png" alt="Title image" /></p>
<div class="encadre">
@ -131,25 +123,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -167,6 +160,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2011-01-03

View file

@ -32,7 +32,31 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
</div>
<div id="titre">
<h1>Now hosted on github</h1>
</div>
<div class="flush"></div>
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/2011-04-20-Now-hosted-on-github/main.png" alt="Title image" /></p>
<p>I am now hosted on github.</p>
</div>
<div id="social">
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/2011-04-20-Now-hosted-on-github/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/2011-04-20-Now-hosted-on-github" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/2011-04-20-Now-hosted-on-github" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
@ -43,38 +67,7 @@
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
<div id="titre">
<h1>Now hosted on github</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/2011-04-20-Now-hosted-on-github/main.png" alt="Title image" /></p>
<p>I am now hosted on github.</p>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -92,6 +85,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2011-04-20

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>A more convenient diff</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<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>
@ -80,25 +72,26 @@ diff -u $* | colorize_diff</code></pre>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/A-more-convenient-diff/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/A-more-convenient-diff" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/A-more-convenient-diff" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -116,6 +109,7 @@ diff -u $* | colorize_diff</code></pre>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2011-08-17

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Category Theory Presentation</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<img src="http://yogsototh.github.com/Category-Theory-Presentation/categories/img/mp/cat-hask-endofunctor.png" alt="Cateogry of Hask's endofunctors" />
@ -1018,25 +1010,26 @@ depth = cata phi where
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/Category-Theory-Presentation/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/Category-Theory-Presentation" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/Category-Theory-Presentation" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -1054,6 +1047,7 @@ depth = cata phi where
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2012-12-12

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,14 +42,14 @@
<h1>ASCII Haskell Mandelbrot</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>Here is the obfuscated code:</p>
<pre class="sourceCode haskell"><code class="sourceCode haskell">a<span class="fu">=</span><span class="dv">27</span>;b<span class="fu">=</span><span class="dv">79</span>;c<span class="fu">=</span><span class="dt">C</span>(<span class="fu">-</span><span class="fl">2.0</span>,<span class="fu">-</span><span class="fl">1.0</span>);d<span class="fu">=</span><span class="dt">C</span>(<span class="fl">1.0</span>,<span class="fl">1.0</span>);e<span class="fu">=</span><span class="dt">C</span>(<span class="fu">-</span><span class="fl">2.501</span>,<span class="fu">-</span><span class="fl">1.003</span>)
<pre class="sourceCode haskell"><code class="sourceCode haskell">a<span class="fu">=</span><span class="dv">27</span>;b<span class="fu">=</span><span class="dv">79</span>;c<span class="fu">=</span><span class="dt">C</span>(<span class="fu">-</span><span class="dv">2</span><span class="fu">.</span><span class="dv">0</span>,<span class="fu">-</span><span class="dv">1</span><span class="fu">.</span><span class="dv">0</span>);d<span class="fu">=</span><span class="dt">C</span>(<span class="dv">1</span><span class="fu">.</span><span class="dv">0</span>,<span class="dv">1</span><span class="fu">.</span><span class="dv">0</span>);e<span class="fu">=</span><span class="dt">C</span>(<span class="fu">-</span><span class="dv">2</span><span class="fu">.</span><span class="dv">501</span>,<span class="fu">-</span><span class="dv">1</span><span class="fu">.</span><span class="dv">003</span>)
<span class="kw">newtype</span> <span class="dt">C</span> <span class="fu">=</span> <span class="dt">C</span> (<span class="dt">Double</span>,<span class="dt">Double</span>) <span class="kw">deriving</span> (<span class="kw">Show</span>,<span class="kw">Eq</span>)
<span class="kw">instance</span> <span class="kw">Num</span> <span class="dt">C</span> <span class="kw">where</span> <span class="dt">C</span>(x,y)<span class="fu">*</span><span class="dt">C</span>(z,t)<span class="fu">=</span><span class="dt">C</span>(z<span class="fu">*</span>x<span class="fu">-</span>y<span class="fu">*</span>t,y<span class="fu">*</span>z<span class="fu">+</span>x<span class="fu">*</span>t);<span class="dt">C</span>(x,y)<span class="fu">+</span><span class="dt">C</span>(z,t)<span class="fu">=</span><span class="dt">C</span>(x<span class="fu">+</span>z,y<span class="fu">+</span>t);<span class="fu">abs</span>(<span class="dt">C</span>(x,y))<span class="fu">=</span><span class="dt">C</span>(<span class="fu">sqrt</span>(x<span class="fu">*</span>x<span class="fu">+</span>y<span class="fu">*</span>y),<span class="fl">0.0</span>)
<span class="kw">instance</span> <span class="kw">Num</span> <span class="dt">C</span> <span class="kw">where</span> <span class="dt">C</span>(x,y)<span class="fu">*</span><span class="dt">C</span>(z,t)<span class="fu">=</span><span class="dt">C</span>(z<span class="fu">*</span>x<span class="fu">-</span>y<span class="fu">*</span>t,y<span class="fu">*</span>z<span class="fu">+</span>x<span class="fu">*</span>t);<span class="dt">C</span>(x,y)<span class="fu">+</span><span class="dt">C</span>(z,t)<span class="fu">=</span><span class="dt">C</span>(x<span class="fu">+</span>z,y<span class="fu">+</span>t);<span class="fu">abs</span>(<span class="dt">C</span>(x,y))<span class="fu">=</span><span class="dt">C</span>(<span class="fu">sqrt</span>(x<span class="fu">*</span>x<span class="fu">+</span>y<span class="fu">*</span>y),<span class="dv">0</span><span class="fu">.</span><span class="dv">0</span>)
r(<span class="dt">C</span>(x,y))<span class="fu">=</span>x;i(<span class="dt">C</span>(x,y))<span class="fu">=</span>y
f c z <span class="dv">0</span><span class="fu">=</span><span class="dv">0</span>;f c z n<span class="fu">=</span><span class="kw">if</span>(r(<span class="fu">abs</span>(z))<span class="fu">&gt;</span><span class="dv">2</span>)<span class="kw">then</span> n <span class="kw">else</span> f c ((z<span class="fu">*</span>z)<span class="fu">+</span>c) (n<span class="dv">-1</span>)
f c z <span class="dv">0</span><span class="fu">=</span><span class="dv">0</span>;f c z n<span class="fu">=</span><span class="kw">if</span>(r(<span class="fu">abs</span>(z))<span class="fu">&gt;</span><span class="dv">2</span>)<span class="kw">then</span> n <span class="kw">else</span> f c ((z<span class="fu">*</span>z)<span class="fu">+</span>c) (n<span class="fu">-</span><span class="dv">1</span>)
h j k <span class="fu">=</span> <span class="fu">map</span> (\z<span class="ot">-&gt;</span>(f (<span class="dt">C</span> z) (<span class="dt">C</span>(<span class="dv">0</span>,<span class="dv">0</span>)) <span class="dv">32</span>,(<span class="fu">fst</span> z<span class="fu">&gt;</span>l <span class="fu">-</span> q<span class="fu">/</span><span class="dv">2</span>))) [(x,y)<span class="fu">|</span>y<span class="ot">&lt;-</span>[p,(p<span class="fu">+</span>((o<span class="fu">-</span>p)<span class="fu">/</span>a))<span class="fu">..</span>o],x<span class="ot">&lt;-</span>[m,(m <span class="fu">+</span> q)<span class="fu">..</span>l]] <span class="kw">where</span> o<span class="fu">=</span>i k;p<span class="fu">=</span>i j;m<span class="fu">=</span>r j;l<span class="fu">=</span>r k;q<span class="fu">=</span>(l<span class="fu">-</span>m)<span class="fu">/</span>b
u j k <span class="fu">=</span> <span class="fu">concat</span> <span class="fu">$</span> <span class="fu">map</span> v <span class="fu">$</span> h j k <span class="kw">where</span> v (i,p)<span class="fu">=</span>(<span class="st">&quot; .,`'°\&quot;</span><span class="fu">:</span>;<span class="fu">-+</span>oO0123456789<span class="fu">=!%*</span>§&amp;<span class="fu">$@#</span><span class="st">&quot;!!i):rst p;rst True=&quot;</span>\n<span class="st">&quot;;rst False=&quot;&quot;</span>
<span class="st">main = putStrLn $ im 0 where cl n (C (x,y))=let cs=(1.1**n-1) in C ((x+cs*(r e))/cs+1,(y+cs*(i e))/cs+1);bl n=cl n c;tr n=cl n d;im n=u (bl n) (tr n)++&quot;</span>\x1b[<span class="dt">H</span>\x1b[25<span class="dt">A</span><span class="st">&quot;++im (n+1)</span></code></pre>
@ -96,18 +88,18 @@ $$$$$$$$$$$$$$$$$$$$$$$$$$&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;WWWW
<p>Here is the more readable version. I believe with this far more readable version, no more explanation is needed.</p>
<pre class="sourceCode haskell"><code class="sourceCode haskell">nbvert <span class="fu">=</span> <span class="dv">30</span>
nbhor <span class="fu">=</span> <span class="dv">79</span>
zoomfactor <span class="fu">=</span> <span class="fl">1.01</span>
init_bottom_left <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">-</span><span class="fl">2.0</span>,<span class="fu">-</span><span class="fl">2.0</span>)
init_top_right <span class="fu">=</span> <span class="dt">C</span> (<span class="fl">3.0</span>,<span class="fl">2.0</span>)
interrest <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">-</span><span class="fl">1.713</span>,<span class="fu">-</span><span class="fl">0.000</span>)
zoomfactor <span class="fu">=</span> <span class="dv">1</span><span class="fu">.</span><span class="dv">01</span>
init_bottom_left <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">-</span><span class="dv">2</span><span class="fu">.</span><span class="dv">0</span>,<span class="fu">-</span><span class="dv">2</span><span class="fu">.</span><span class="dv">0</span>)
init_top_right <span class="fu">=</span> <span class="dt">C</span> (<span class="dv">3</span><span class="fu">.</span><span class="dv">0</span>,<span class="dv">2</span><span class="fu">.</span><span class="dv">0</span>)
interrest <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">-</span><span class="dv">1</span><span class="fu">.</span><span class="dv">713</span>,<span class="fu">-</span><span class="dv">0</span><span class="fu">.</span><span class="dv">000</span>)
<span class="kw">newtype</span> <span class="dt">Complex</span> <span class="fu">=</span> <span class="dt">C</span> (<span class="dt">Float</span>,<span class="dt">Float</span>) <span class="kw">deriving</span> (<span class="kw">Show</span>,<span class="kw">Eq</span>)
<span class="kw">instance</span> <span class="kw">Num</span> <span class="dt">Complex</span> <span class="kw">where</span>
<span class="fu">fromInteger</span> n <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">fromIntegral</span> n,<span class="fl">0.0</span>)
<span class="fu">fromInteger</span> n <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">fromIntegral</span> n,<span class="dv">0</span><span class="fu">.</span><span class="dv">0</span>)
<span class="dt">C</span> (x,y) <span class="fu">*</span> <span class="dt">C</span> (z,t) <span class="fu">=</span> <span class="dt">C</span> (z<span class="fu">*</span>x <span class="fu">-</span> y<span class="fu">*</span>t, y<span class="fu">*</span>z <span class="fu">+</span> x<span class="fu">*</span>t)
<span class="dt">C</span> (x,y) <span class="fu">+</span> <span class="dt">C</span> (z,t) <span class="fu">=</span> <span class="dt">C</span> (x<span class="fu">+</span>z, y<span class="fu">+</span>t)
<span class="fu">abs</span> (<span class="dt">C</span> (x,y)) <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">sqrt</span> (x<span class="fu">*</span>x <span class="fu">+</span> y<span class="fu">*</span>y),<span class="fl">0.0</span>)
<span class="fu">signum</span> (<span class="dt">C</span> (x,y)) <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">signum</span> x , <span class="fl">0.0</span>)
<span class="fu">abs</span> (<span class="dt">C</span> (x,y)) <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">sqrt</span> (x<span class="fu">*</span>x <span class="fu">+</span> y<span class="fu">*</span>y),<span class="dv">0</span><span class="fu">.</span><span class="dv">0</span>)
<span class="fu">signum</span> (<span class="dt">C</span> (x,y)) <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">signum</span> x , <span class="dv">0</span><span class="fu">.</span><span class="dv">0</span>)
<span class="ot">real ::</span> <span class="dt">Complex</span> <span class="ot">-&gt;</span> <span class="dt">Float</span>
real (<span class="dt">C</span> (x,y)) <span class="fu">=</span> x
@ -119,7 +111,7 @@ cabs <span class="fu">=</span> real<span class="fu">.abs</span>
<span class="ot">f ::</span> <span class="dt">Complex</span> <span class="ot">-&gt;</span> <span class="dt">Complex</span> <span class="ot">-&gt;</span> <span class="dt">Int</span> <span class="ot">-&gt;</span> <span class="dt">Int</span>
f c z <span class="dv">0</span> <span class="fu">=</span> <span class="dv">0</span>
f c z n <span class="fu">=</span> <span class="kw">if</span> (cabs z <span class="fu">&gt;</span> <span class="dv">2</span>) <span class="kw">then</span> n <span class="kw">else</span> f c ((z<span class="fu">*</span>z)<span class="fu">+</span>c) (n<span class="dv">-1</span>)
f c z n <span class="fu">=</span> <span class="kw">if</span> (cabs z <span class="fu">&gt;</span> <span class="dv">2</span>) <span class="kw">then</span> n <span class="kw">else</span> f c ((z<span class="fu">*</span>z)<span class="fu">+</span>c) (n<span class="fu">-</span><span class="dv">1</span>)
bmandel bottomleft topright <span class="fu">=</span> <span class="fu">map</span> (\z <span class="ot">-&gt;</span> (f (<span class="dt">C</span> z) (<span class="dt">C</span>(<span class="dv">0</span>,<span class="dv">0</span>)) <span class="dv">32</span>, (<span class="fu">fst</span> z <span class="fu">&gt;</span> right <span class="fu">-</span> hstep<span class="fu">/</span><span class="dv">2</span> ))) [(x,y) <span class="fu">|</span> y <span class="ot">&lt;-</span> [bottom,(bottom <span class="fu">+</span> vstep)<span class="fu">..</span>top], x<span class="ot">&lt;-</span>[left,(left <span class="fu">+</span> hstep)<span class="fu">..</span>right]]
<span class="kw">where</span>
@ -152,29 +144,30 @@ main <span class="fu">=</span> <span class="kw">do</span>
<span class="fu">putStrLn</span> <span class="fu">$</span> infinitemandel <span class="dv">0</span>
<span class="kw">where</span>
window n <span class="fu">=</span> zoom init_bottom_left init_top_right interrest (zoomfactor<span class="fu">**</span>n)
infinitemandel n <span class="fu">=</span> mandel (window n) <span class="fu">++</span> <span class="st">&quot;\x1b[H\x1b[25A&quot;</span> <span class="fu">++</span> infinitemandel (n<span class="dv">+1</span>)</code></pre>
infinitemandel n <span class="fu">=</span> mandel (window n) <span class="fu">++</span> <span class="st">&quot;\x1b[H\x1b[25A&quot;</span> <span class="fu">++</span> infinitemandel (n<span class="fu">+</span><span class="dv">1</span>)</code></pre>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/Haskell-Mandelbrot/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/Haskell-Mandelbrot" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/Haskell-Mandelbrot" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -192,6 +185,7 @@ main <span class="fu">=</span> <span class="kw">do</span>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2011-07-10

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Haskell Progressive Example</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/Haskell-OpenGL-Mandelbrot/BenoitBMandelbrot.jpg" alt="The B in Benoît B. Mandelbrot stand for Benoît B. Mandelbrot" /></p>
<div class="intro">
@ -98,9 +90,9 @@ Another detail of the Mandelbulb
<p>We can consider two parts. The first being mostly some boilerplate<sup><a href="#fn2" class="footnoteRef" id="fnref2">2</a></sup>. And the second part more focused on OpenGL and content.</p>
<h3 id="lets-play-the-song-of-our-people">Lets play the song of our people</h3>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">Graphics.Rendering.OpenGL</span>
<span class="kw">import</span> <span class="dt">Graphics.UI.GLUT</span>
<span class="kw">import</span> <span class="dt">Data.IORef</span></code></pre>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> Graphics.Rendering.OpenGL
<span class="kw">import</span> Graphics.UI.GLUT
<span class="kw">import</span> Data.IORef</code></pre>
</div>
<p>For efficiency reason<sup><a href="#fn3" class="footnoteRef" id="fnref3">3</a></sup>, I will not use the default Haskell <code>Complex</code> data type.</p>
@ -110,11 +102,11 @@ Another detail of the Mandelbulb
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">instance</span> <span class="kw">Num</span> <span class="dt">Complex</span> <span class="kw">where</span>
<span class="fu">fromInteger</span> n <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">fromIntegral</span> n,<span class="fl">0.0</span>)
<span class="fu">fromInteger</span> n <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">fromIntegral</span> n,<span class="dv">0</span><span class="fu">.</span><span class="dv">0</span>)
<span class="dt">C</span> (x,y) <span class="fu">*</span> <span class="dt">C</span> (z,t) <span class="fu">=</span> <span class="dt">C</span> (z<span class="fu">*</span>x <span class="fu">-</span> y<span class="fu">*</span>t, y<span class="fu">*</span>z <span class="fu">+</span> x<span class="fu">*</span>t)
<span class="dt">C</span> (x,y) <span class="fu">+</span> <span class="dt">C</span> (z,t) <span class="fu">=</span> <span class="dt">C</span> (x<span class="fu">+</span>z, y<span class="fu">+</span>t)
<span class="fu">abs</span> (<span class="dt">C</span> (x,y)) <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">sqrt</span> (x<span class="fu">*</span>x <span class="fu">+</span> y<span class="fu">*</span>y),<span class="fl">0.0</span>)
<span class="fu">signum</span> (<span class="dt">C</span> (x,y)) <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">signum</span> x , <span class="fl">0.0</span>)</code></pre>
<span class="fu">abs</span> (<span class="dt">C</span> (x,y)) <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">sqrt</span> (x<span class="fu">*</span>x <span class="fu">+</span> y<span class="fu">*</span>y),<span class="dv">0</span><span class="fu">.</span><span class="dv">0</span>)
<span class="fu">signum</span> (<span class="dt">C</span> (x,y)) <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">signum</span> x , <span class="dv">0</span><span class="fu">.</span><span class="dv">0</span>)</code></pre>
</div>
<p>We declare some useful functions for manipulating complex numbers:</p>
@ -201,16 +193,16 @@ allPoints <span class="fu">=</span> [ (x<span class="fu">/</span>width,y<span cl
<pre class="sourceCode haskell"><code class="sourceCode haskell">colorFromValue n <span class="fu">=</span>
<span class="kw">let</span>
<span class="ot"> t ::</span> <span class="dt">Int</span> <span class="ot">-&gt;</span> <span class="dt">GLfloat</span>
t i <span class="fu">=</span> <span class="fl">0.5</span> <span class="fu">+</span> <span class="fl">0.5</span><span class="fu">*cos</span>( <span class="fu">fromIntegral</span> i <span class="fu">/</span> <span class="dv">10</span> )
t i <span class="fu">=</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">5</span> <span class="fu">+</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">5</span><span class="fu">*cos</span>( <span class="fu">fromIntegral</span> i <span class="fu">/</span> <span class="dv">10</span> )
<span class="kw">in</span>
<span class="dt">Color3</span> (t n) (t (n<span class="dv">+5</span>)) (t (n<span class="dv">+10</span>))</code></pre>
<span class="dt">Color3</span> (t n) (t (n<span class="fu">+</span><span class="dv">5</span>)) (t (n<span class="fu">+</span><span class="dv">10</span>))</code></pre>
</div>
<p>And now the <code>mandel</code> function. Given two coordinates in pixels, it returns some integer value:</p>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell">mandel x y <span class="fu">=</span>
<span class="kw">let</span> r <span class="fu">=</span> <span class="fl">2.0</span> <span class="fu">*</span> x <span class="fu">/</span> width
i <span class="fu">=</span> <span class="fl">2.0</span> <span class="fu">*</span> y <span class="fu">/</span> height
<span class="kw">let</span> r <span class="fu">=</span> <span class="dv">2</span><span class="fu">.</span><span class="dv">0</span> <span class="fu">*</span> x <span class="fu">/</span> width
i <span class="fu">=</span> <span class="dv">2</span><span class="fu">.</span><span class="dv">0</span> <span class="fu">*</span> y <span class="fu">/</span> height
<span class="kw">in</span>
f (complex r i) <span class="dv">0</span> <span class="dv">64</span></code></pre>
</div>
@ -226,7 +218,7 @@ allPoints <span class="fu">=</span> [ (x<span class="fu">/</span>width,y<span cl
f c z <span class="dv">0</span> <span class="fu">=</span> <span class="dv">0</span>
f c z n <span class="fu">=</span> <span class="kw">if</span> (magnitude z <span class="fu">&gt;</span> <span class="dv">2</span> )
<span class="kw">then</span> n
<span class="kw">else</span> f c ((z<span class="fu">*</span>z)<span class="fu">+</span>c) (n<span class="dv">-1</span>)</code></pre>
<span class="kw">else</span> f c ((z<span class="fu">*</span>z)<span class="fu">+</span>c) (n<span class="fu">-</span><span class="dv">1</span>)</code></pre>
</div>
<p>Well, if you download this file (look at the bottom of this section), compile it and run it this is the result:</p>
@ -242,20 +234,20 @@ f c z n <span class="fu">=</span> <span class="kw">if</span> (magnitude z <span
<div style="display:none">
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">Graphics.Rendering.OpenGL</span>
<span class="kw">import</span> <span class="dt">Graphics.UI.GLUT</span>
<span class="kw">import</span> <span class="dt">Data.IORef</span>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> Graphics.Rendering.OpenGL
<span class="kw">import</span> Graphics.UI.GLUT
<span class="kw">import</span> Data.IORef
<span class="co">-- Use UNPACK data because it is faster</span>
<span class="co">-- The ! is for strict instead of lazy</span>
<span class="kw">data</span> <span class="dt">Complex</span> <span class="fu">=</span> <span class="dt">C</span> <span class="ot">{-# UNPACK #-}</span> <span class="fu">!</span><span class="dt">Float</span>
<span class="ot">{-# UNPACK #-}</span> <span class="fu">!</span><span class="dt">Float</span>
<span class="kw">deriving</span> (<span class="kw">Show</span>,<span class="kw">Eq</span>)
<span class="kw">instance</span> <span class="kw">Num</span> <span class="dt">Complex</span> <span class="kw">where</span>
<span class="fu">fromInteger</span> n <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">fromIntegral</span> n) <span class="fl">0.0</span>
<span class="fu">fromInteger</span> n <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">fromIntegral</span> n) <span class="dv">0</span><span class="fu">.</span><span class="dv">0</span>
(<span class="dt">C</span> x y) <span class="fu">*</span> (<span class="dt">C</span> z t) <span class="fu">=</span> <span class="dt">C</span> (z<span class="fu">*</span>x <span class="fu">-</span> y<span class="fu">*</span>t) (y<span class="fu">*</span>z <span class="fu">+</span> x<span class="fu">*</span>t)
(<span class="dt">C</span> x y) <span class="fu">+</span> (<span class="dt">C</span> z t) <span class="fu">=</span> <span class="dt">C</span> (x<span class="fu">+</span>z) (y<span class="fu">+</span>t)
<span class="fu">abs</span> (<span class="dt">C</span> x y) <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">sqrt</span> (x<span class="fu">*</span>x <span class="fu">+</span> y<span class="fu">*</span>y)) <span class="fl">0.0</span>
<span class="fu">signum</span> (<span class="dt">C</span> x y) <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">signum</span> x) <span class="fl">0.0</span>
<span class="fu">abs</span> (<span class="dt">C</span> x y) <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">sqrt</span> (x<span class="fu">*</span>x <span class="fu">+</span> y<span class="fu">*</span>y)) <span class="dv">0</span><span class="fu">.</span><span class="dv">0</span>
<span class="fu">signum</span> (<span class="dt">C</span> x y) <span class="fu">=</span> <span class="dt">C</span> (<span class="fu">signum</span> x) <span class="dv">0</span><span class="fu">.</span><span class="dv">0</span>
<span class="ot">complex ::</span> <span class="dt">Float</span> <span class="ot">-&gt;</span> <span class="dt">Float</span> <span class="ot">-&gt;</span> <span class="dt">Complex</span>
complex x y <span class="fu">=</span> <span class="dt">C</span> x y
@ -282,7 +274,7 @@ main <span class="fu">=</span> <span class="kw">do</span>
mainLoop
display <span class="fu">=</span> <span class="kw">do</span>
<span class="co">-- set the background color (dark solarized theme)</span>
clearColor <span class="fu">$=</span> <span class="dt">Color4</span> <span class="dv">0</span> <span class="fl">0.1686</span> <span class="fl">0.2117</span> <span class="dv">1</span>
clearColor <span class="fu">$=</span> <span class="dt">Color4</span> <span class="dv">0</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">1686</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">2117</span> <span class="dv">1</span>
clear [<span class="dt">ColorBuffer</span>] <span class="co">-- make the window black</span>
loadIdentity <span class="co">-- reset any transformation</span>
preservingMatrix drawMandelbrot
@ -347,8 +339,8 @@ positivePoints <span class="fu">=</span> <span class="kw">do</span>
maxZeroIndex func minval maxval <span class="dv">0</span> <span class="fu">=</span> (minval<span class="fu">+</span>maxval)<span class="fu">/</span><span class="dv">2</span>
maxZeroIndex func minval maxval n <span class="fu">=</span>
<span class="kw">if</span> (func medpoint) <span class="fu">/=</span> <span class="dv">0</span>
<span class="kw">then</span> maxZeroIndex func minval medpoint (n<span class="dv">-1</span>)
<span class="kw">else</span> maxZeroIndex func medpoint maxval (n<span class="dv">-1</span>)
<span class="kw">then</span> maxZeroIndex func minval medpoint (n<span class="fu">-</span><span class="dv">1</span>)
<span class="kw">else</span> maxZeroIndex func medpoint maxval (n<span class="fu">-</span><span class="dv">1</span>)
<span class="kw">where</span> medpoint <span class="fu">=</span> (minval<span class="fu">+</span>maxval)<span class="fu">/</span><span class="dv">2</span></code></pre>
</div>
@ -360,15 +352,15 @@ maxZeroIndex func minval maxval n <span class="fu">=</span>
<pre class="sourceCode haskell"><code class="sourceCode haskell">colorFromValue n <span class="fu">=</span>
<span class="kw">let</span>
<span class="ot"> t ::</span> <span class="dt">Int</span> <span class="ot">-&gt;</span> <span class="dt">GLfloat</span>
t i <span class="fu">=</span> <span class="fl">0.5</span> <span class="fu">+</span> <span class="fl">0.5</span><span class="fu">*cos</span>( <span class="fu">fromIntegral</span> i <span class="fu">/</span> <span class="dv">10</span> )
t i <span class="fu">=</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">5</span> <span class="fu">+</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">5</span><span class="fu">*cos</span>( <span class="fu">fromIntegral</span> i <span class="fu">/</span> <span class="dv">10</span> )
<span class="kw">in</span>
<span class="dt">Color3</span> (t n) (t (n<span class="dv">+5</span>)) (t (n<span class="dv">+10</span>))</code></pre>
<span class="dt">Color3</span> (t n) (t (n<span class="fu">+</span><span class="dv">5</span>)) (t (n<span class="fu">+</span><span class="dv">10</span>))</code></pre>
</div>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell">mandel x y <span class="fu">=</span>
<span class="kw">let</span> r <span class="fu">=</span> <span class="fl">2.0</span> <span class="fu">*</span> x <span class="fu">/</span> width
i <span class="fu">=</span> <span class="fl">2.0</span> <span class="fu">*</span> y <span class="fu">/</span> height
<span class="kw">let</span> r <span class="fu">=</span> <span class="dv">2</span><span class="fu">.</span><span class="dv">0</span> <span class="fu">*</span> x <span class="fu">/</span> width
i <span class="fu">=</span> <span class="dv">2</span><span class="fu">.</span><span class="dv">0</span> <span class="fu">*</span> y <span class="fu">/</span> height
<span class="kw">in</span>
f (complex r i) <span class="dv">0</span> <span class="dv">64</span></code></pre>
</div>
@ -378,7 +370,7 @@ maxZeroIndex func minval maxval n <span class="fu">=</span>
f c z <span class="dv">0</span> <span class="fu">=</span> <span class="dv">0</span>
f c z n <span class="fu">=</span> <span class="kw">if</span> (magnitude z <span class="fu">&gt;</span> <span class="dv">2</span> )
<span class="kw">then</span> n
<span class="kw">else</span> f c ((z<span class="fu">*</span>z)<span class="fu">+</span>c) (n<span class="dv">-1</span>)</code></pre>
<span class="kw">else</span> f c ((z<span class="fu">*</span>z)<span class="fu">+</span>c) (n<span class="fu">-</span><span class="dv">1</span>)</code></pre>
</div>
</div>
@ -406,9 +398,9 @@ f c z n <span class="fu">=</span> <span class="kw">if</span> (magnitude z <span
<div style="display:none">
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">Graphics.Rendering.OpenGL</span>
<span class="kw">import</span> <span class="dt">Graphics.UI.GLUT</span>
<span class="kw">import</span> <span class="dt">Data.IORef</span>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> Graphics.Rendering.OpenGL
<span class="kw">import</span> Graphics.UI.GLUT
<span class="kw">import</span> Data.IORef
<span class="kw">type</span> <span class="dt">ColoredPoint</span> <span class="fu">=</span> (<span class="dt">GLfloat</span>,<span class="dt">GLfloat</span>,<span class="dt">GLfloat</span>,<span class="dt">Color3</span> <span class="dt">GLfloat</span>)</code></pre>
</div>
@ -476,7 +468,7 @@ main <span class="fu">=</span> <span class="kw">do</span>
<span class="co">-- Some state variables (I know it feels BAD)</span>
angle <span class="ot">&lt;-</span> newIORef ((<span class="dv">35</span>,<span class="dv">0</span>)<span class="ot">::</span>(<span class="dt">GLfloat</span>,<span class="dt">GLfloat</span>))
zoom <span class="ot">&lt;-</span> newIORef (<span class="dv">2</span><span class="ot">::</span><span class="dt">GLfloat</span>)
campos <span class="ot">&lt;-</span> newIORef ((<span class="fl">0.7</span>,<span class="dv">0</span>)<span class="ot">::</span>(<span class="dt">GLfloat</span>,<span class="dt">GLfloat</span>))
campos <span class="ot">&lt;-</span> newIORef ((<span class="dv">0</span><span class="fu">.</span><span class="dv">7</span>,<span class="dv">0</span>)<span class="ot">::</span>(<span class="dt">GLfloat</span>,<span class="dt">GLfloat</span>))
<span class="co">-- Function to call each frame</span>
idleCallback <span class="fu">$=</span> <span class="kw">Just</span> idle
<span class="co">-- Function to call when keyboard or mouse is used</span>
@ -516,18 +508,18 @@ mapSnd f (x,y) <span class="fu">=</span> ( x,f y)</code></pre>
z <span class="fu">$=</span> <span class="dv">1</span> <span class="co">-- zoom</span>
p <span class="fu">$=</span> (<span class="dv">0</span>,<span class="dv">0</span>) <span class="co">-- camera position</span>
<span class="co">-- use of hjkl to rotate</span>
kact a _ _ (<span class="dt">Char</span> <span class="ch">'h'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar a (mapFst (<span class="fu">+</span><span class="fl">0.5</span>))
kact a _ _ (<span class="dt">Char</span> <span class="ch">'l'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar a (mapFst (<span class="fu">+</span>(<span class="fu">-</span><span class="fl">0.5</span>)))
kact a _ _ (<span class="dt">Char</span> <span class="ch">'j'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar a (mapSnd (<span class="fu">+</span><span class="fl">0.5</span>))
kact a _ _ (<span class="dt">Char</span> <span class="ch">'k'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar a (mapSnd (<span class="fu">+</span>(<span class="fu">-</span><span class="fl">0.5</span>)))
kact a _ _ (<span class="dt">Char</span> <span class="ch">'h'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar a (mapFst (<span class="fu">+</span><span class="dv">0</span><span class="fu">.</span><span class="dv">5</span>))
kact a _ _ (<span class="dt">Char</span> <span class="ch">'l'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar a (mapFst (<span class="fu">+</span>(<span class="fu">-</span><span class="dv">0</span><span class="fu">.</span><span class="dv">5</span>)))
kact a _ _ (<span class="dt">Char</span> <span class="ch">'j'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar a (mapSnd (<span class="fu">+</span><span class="dv">0</span><span class="fu">.</span><span class="dv">5</span>))
kact a _ _ (<span class="dt">Char</span> <span class="ch">'k'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar a (mapSnd (<span class="fu">+</span>(<span class="fu">-</span><span class="dv">0</span><span class="fu">.</span><span class="dv">5</span>)))
<span class="co">-- use o and i to zoom</span>
kact _ z _ (<span class="dt">Char</span> <span class="ch">'o'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar z (<span class="fu">*</span><span class="fl">1.1</span>)
kact _ z _ (<span class="dt">Char</span> <span class="ch">'i'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar z (<span class="fu">*</span><span class="fl">0.9</span>)
kact _ z _ (<span class="dt">Char</span> <span class="ch">'o'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar z (<span class="fu">*</span><span class="dv">1</span><span class="fu">.</span><span class="dv">1</span>)
kact _ z _ (<span class="dt">Char</span> <span class="ch">'i'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar z (<span class="fu">*</span><span class="dv">0</span><span class="fu">.</span><span class="dv">9</span>)
<span class="co">-- use sdfe to move the camera</span>
kact _ _ p (<span class="dt">Char</span> <span class="ch">'s'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar p (mapFst (<span class="fu">+</span><span class="fl">0.1</span>))
kact _ _ p (<span class="dt">Char</span> <span class="ch">'f'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar p (mapFst (<span class="fu">+</span>(<span class="fu">-</span><span class="fl">0.1</span>)))
kact _ _ p (<span class="dt">Char</span> <span class="ch">'d'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar p (mapSnd (<span class="fu">+</span><span class="fl">0.1</span>))
kact _ _ p (<span class="dt">Char</span> <span class="ch">'e'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar p (mapSnd (<span class="fu">+</span>(<span class="fu">-</span><span class="fl">0.1</span>)))
kact _ _ p (<span class="dt">Char</span> <span class="ch">'s'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar p (mapFst (<span class="fu">+</span><span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>))
kact _ _ p (<span class="dt">Char</span> <span class="ch">'f'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar p (mapFst (<span class="fu">+</span>(<span class="fu">-</span><span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>)))
kact _ _ p (<span class="dt">Char</span> <span class="ch">'d'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar p (mapSnd (<span class="fu">+</span><span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>))
kact _ _ p (<span class="dt">Char</span> <span class="ch">'e'</span>) <span class="dt">Down</span> <span class="fu">=</span> modVar p (mapSnd (<span class="fu">+</span>(<span class="fu">-</span><span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>)))
<span class="co">-- any other keys does nothing</span>
kact _ _ _ _ _ <span class="fu">=</span> <span class="fu">return</span> ()</code></pre>
</div>
@ -536,7 +528,7 @@ mapSnd f (x,y) <span class="fu">=</span> ( x,f y)</code></pre>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell">display angle zoom position <span class="fu">=</span> <span class="kw">do</span>
<span class="co">-- set the background color (dark solarized theme)</span>
clearColor <span class="fu">$=</span> <span class="dt">Color4</span> <span class="dv">0</span> <span class="fl">0.1686</span> <span class="fl">0.2117</span> <span class="dv">1</span>
clearColor <span class="fu">$=</span> <span class="dt">Color4</span> <span class="dv">0</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">1686</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">2117</span> <span class="dv">1</span>
clear [<span class="dt">ColorBuffer</span>,<span class="dt">DepthBuffer</span>]
<span class="co">-- Transformation to change the view</span>
loadIdentity <span class="co">-- reset any transformation</span>
@ -548,8 +540,8 @@ mapSnd f (x,y) <span class="fu">=</span> ( x,f y)</code></pre>
scale z z z
<span class="co">-- rotate</span>
(xangle,yangle) <span class="ot">&lt;-</span> get angle
rotate xangle <span class="fu">$</span> <span class="dt">Vector3</span> <span class="fl">1.0</span> <span class="fl">0.0</span> (<span class="fl">0.0</span><span class="ot">::</span><span class="dt">GLfloat</span>)
rotate yangle <span class="fu">$</span> <span class="dt">Vector3</span> <span class="fl">0.0</span> <span class="fl">1.0</span> (<span class="fl">0.0</span><span class="ot">::</span><span class="dt">GLfloat</span>)
rotate xangle <span class="fu">$</span> <span class="dt">Vector3</span> <span class="dv">1</span><span class="fu">.</span><span class="dv">0</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">0</span> (<span class="dv">0</span><span class="fu">.</span><span class="dv">0</span><span class="ot">::</span><span class="dt">GLfloat</span>)
rotate yangle <span class="fu">$</span> <span class="dt">Vector3</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">0</span> <span class="dv">1</span><span class="fu">.</span><span class="dv">0</span> (<span class="dv">0</span><span class="fu">.</span><span class="dv">0</span><span class="ot">::</span><span class="dt">GLfloat</span>)
<span class="co">-- Now that all transformation were made</span>
<span class="co">-- We create the object(s)</span>
@ -598,17 +590,17 @@ depthPoints <span class="fu">=</span> <span class="kw">do</span>
depthOf x' y' <span class="fu">=</span> maxZeroIndex (mandel x' y') <span class="dv">0</span> deep logdeep
logdeep <span class="fu">=</span> <span class="fu">floor</span> ((<span class="fu">log</span> deep) <span class="fu">/</span> <span class="fu">log</span> <span class="dv">2</span>)
z1 <span class="fu">=</span> depthOf x y
z2 <span class="fu">=</span> depthOf (x<span class="dv">+1</span>) y
z3 <span class="fu">=</span> depthOf (x<span class="dv">+1</span>) (y<span class="dv">+1</span>)
z4 <span class="fu">=</span> depthOf x (y<span class="dv">+1</span>)
c1 <span class="fu">=</span> mandel x y (z1<span class="dv">+1</span>)
c2 <span class="fu">=</span> mandel (x<span class="dv">+1</span>) y (z2<span class="dv">+1</span>)
c3 <span class="fu">=</span> mandel (x<span class="dv">+1</span>) (y<span class="dv">+1</span>) (z3<span class="dv">+1</span>)
c4 <span class="fu">=</span> mandel x (y<span class="dv">+1</span>) (z4<span class="dv">+1</span>)
z2 <span class="fu">=</span> depthOf (x<span class="fu">+</span><span class="dv">1</span>) y
z3 <span class="fu">=</span> depthOf (x<span class="fu">+</span><span class="dv">1</span>) (y<span class="fu">+</span><span class="dv">1</span>)
z4 <span class="fu">=</span> depthOf x (y<span class="fu">+</span><span class="dv">1</span>)
c1 <span class="fu">=</span> mandel x y (z1<span class="fu">+</span><span class="dv">1</span>)
c2 <span class="fu">=</span> mandel (x<span class="fu">+</span><span class="dv">1</span>) y (z2<span class="fu">+</span><span class="dv">1</span>)
c3 <span class="fu">=</span> mandel (x<span class="fu">+</span><span class="dv">1</span>) (y<span class="fu">+</span><span class="dv">1</span>) (z3<span class="fu">+</span><span class="dv">1</span>)
c4 <span class="fu">=</span> mandel x (y<span class="fu">+</span><span class="dv">1</span>) (z4<span class="fu">+</span><span class="dv">1</span>)
p1 <span class="fu">=</span> ( x <span class="fu">/</span>width, y <span class="fu">/</span>height, z1<span class="fu">/</span>deep, colorFromValue c1)
p2 <span class="fu">=</span> ((x<span class="dv">+1</span>)<span class="fu">/</span>width, y <span class="fu">/</span>height, z2<span class="fu">/</span>deep, colorFromValue c2)
p3 <span class="fu">=</span> ((x<span class="dv">+1</span>)<span class="fu">/</span>width,(y<span class="dv">+1</span>)<span class="fu">/</span>height, z3<span class="fu">/</span>deep, colorFromValue c3)
p4 <span class="fu">=</span> ( x <span class="fu">/</span>width,(y<span class="dv">+1</span>)<span class="fu">/</span>height, z4<span class="fu">/</span>deep, colorFromValue c4)
p2 <span class="fu">=</span> ((x<span class="fu">+</span><span class="dv">1</span>)<span class="fu">/</span>width, y <span class="fu">/</span>height, z2<span class="fu">/</span>deep, colorFromValue c2)
p3 <span class="fu">=</span> ((x<span class="fu">+</span><span class="dv">1</span>)<span class="fu">/</span>width,(y<span class="fu">+</span><span class="dv">1</span>)<span class="fu">/</span>height, z3<span class="fu">/</span>deep, colorFromValue c3)
p4 <span class="fu">=</span> ( x <span class="fu">/</span>width,(y<span class="fu">+</span><span class="dv">1</span>)<span class="fu">/</span>height, z4<span class="fu">/</span>deep, colorFromValue c4)
<span class="kw">if</span> (<span class="fu">and</span> <span class="fu">$</span> <span class="fu">map</span> (<span class="fu">&gt;=</span><span class="dv">57</span>) [c1,c2,c3,c4])
<span class="kw">then</span> []
<span class="kw">else</span> [p1,p2,p3,p1,p3,p4]</code></pre>
@ -619,13 +611,13 @@ depthPoints <span class="fu">=</span> <span class="kw">do</span>
x <span class="ot">&lt;-</span> [<span class="fu">-</span>width<span class="fu">..</span>width]
y <span class="ot">&lt;-</span> [<span class="fu">-</span>height<span class="fu">..</span>height]
<span class="kw">let</span>
neighbors <span class="fu">=</span> [(x,y),(x<span class="dv">+1</span>,y),(x<span class="dv">+1</span>,y<span class="dv">+1</span>),(x,y<span class="dv">+1</span>)]
neighbors <span class="fu">=</span> [(x,y),(x<span class="fu">+</span><span class="dv">1</span>,y),(x<span class="fu">+</span><span class="dv">1</span>,y<span class="fu">+</span><span class="dv">1</span>),(x,y<span class="fu">+</span><span class="dv">1</span>)]
depthOf (u,v) <span class="fu">=</span> maxZeroIndex (mandel u v) <span class="dv">0</span> deep logdeep
logdeep <span class="fu">=</span> <span class="fu">floor</span> ((<span class="fu">log</span> deep) <span class="fu">/</span> <span class="fu">log</span> <span class="dv">2</span>)
<span class="co">-- zs are 3D points with found depth</span>
zs <span class="fu">=</span> <span class="fu">map</span> (\(u,v) <span class="ot">-&gt;</span> (u,v,depthOf (u,v))) neighbors
<span class="co">-- ts are 3D pixels + mandel value</span>
ts <span class="fu">=</span> <span class="fu">map</span> (\(u,v,w) <span class="ot">-&gt;</span> (u,v,w,mandel u v (w<span class="dv">+1</span>))) zs
ts <span class="fu">=</span> <span class="fu">map</span> (\(u,v,w) <span class="ot">-&gt;</span> (u,v,w,mandel u v (w<span class="fu">+</span><span class="dv">1</span>))) zs
<span class="co">-- ps are 3D opengl points + color value</span>
ps <span class="fu">=</span> <span class="fu">map</span> (\(u,v,w,c') <span class="ot">-&gt;</span>
(u<span class="fu">/</span>width,v<span class="fu">/</span>height,w<span class="fu">/</span>deep,colorFromValue c')) ts
@ -643,7 +635,7 @@ depthPoints <span class="fu">=</span> <span class="kw">do</span>
allPoints <span class="fu">=</span> planPoints <span class="fu">++</span> <span class="fu">map</span> inverseDepth planPoints
<span class="kw">where</span>
planPoints <span class="fu">=</span> depthPoints
inverseDepth (x,y,z,c) <span class="fu">=</span> (x,y,<span class="fu">-</span>z<span class="dv">+1</span><span class="fu">/</span>deep,c)</code></pre>
inverseDepth (x,y,z,c) <span class="fu">=</span> (x,y,<span class="fu">-</span>z<span class="fu">+</span><span class="dv">1</span><span class="fu">/</span>deep,c)</code></pre>
</div>
<p>The rest of the program is very close to the preceding one.</p>
@ -663,8 +655,8 @@ allPoints <span class="fu">=</span> planPoints <span class="fu">++</span> <span
maxZeroIndex func minval maxval <span class="dv">0</span> <span class="fu">=</span> (minval<span class="fu">+</span>maxval)<span class="fu">/</span><span class="dv">2</span>
maxZeroIndex func minval maxval n <span class="fu">=</span>
<span class="kw">if</span> (func medpoint) <span class="fu">/=</span> <span class="dv">0</span>
<span class="kw">then</span> maxZeroIndex func minval medpoint (n<span class="dv">-1</span>)
<span class="kw">else</span> maxZeroIndex func medpoint maxval (n<span class="dv">-1</span>)
<span class="kw">then</span> maxZeroIndex func minval medpoint (n<span class="fu">-</span><span class="dv">1</span>)
<span class="kw">else</span> maxZeroIndex func medpoint maxval (n<span class="fu">-</span><span class="dv">1</span>)
<span class="kw">where</span> medpoint <span class="fu">=</span> (minval<span class="fu">+</span>maxval)<span class="fu">/</span><span class="dv">2</span></code></pre>
</div>
@ -673,9 +665,9 @@ maxZeroIndex func minval maxval n <span class="fu">=</span>
<pre class="sourceCode haskell"><code class="sourceCode haskell">colorFromValue n <span class="fu">=</span>
<span class="kw">let</span>
<span class="ot"> t ::</span> <span class="dt">Int</span> <span class="ot">-&gt;</span> <span class="dt">GLfloat</span>
t i <span class="fu">=</span> <span class="fl">0.7</span> <span class="fu">+</span> <span class="fl">0.3</span><span class="fu">*cos</span>( <span class="fu">fromIntegral</span> i <span class="fu">/</span> <span class="dv">10</span> )
t i <span class="fu">=</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">7</span> <span class="fu">+</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">3</span><span class="fu">*cos</span>( <span class="fu">fromIntegral</span> i <span class="fu">/</span> <span class="dv">10</span> )
<span class="kw">in</span>
<span class="dt">Color3</span> (t n) (t (n<span class="dv">+5</span>)) (t (n<span class="dv">+10</span>))</code></pre>
<span class="dt">Color3</span> (t n) (t (n<span class="fu">+</span><span class="dv">5</span>)) (t (n<span class="fu">+</span><span class="dv">10</span>))</code></pre>
</div>
<p>We only changed from <code>Complex</code> to <code>ExtComplex</code> of the main <code>f</code> function.</p>
@ -684,7 +676,7 @@ maxZeroIndex func minval maxval n <span class="fu">=</span>
f c z <span class="dv">0</span> <span class="fu">=</span> <span class="dv">0</span>
f c z n <span class="fu">=</span> <span class="kw">if</span> (magnitude z <span class="fu">&gt;</span> <span class="dv">2</span> )
<span class="kw">then</span> n
<span class="kw">else</span> f c ((z<span class="fu">*</span>z)<span class="fu">+</span>c) (n<span class="dv">-1</span>)</code></pre>
<span class="kw">else</span> f c ((z<span class="fu">*</span>z)<span class="fu">+</span>c) (n<span class="fu">-</span><span class="dv">1</span>)</code></pre>
</div>
</div>
@ -692,9 +684,9 @@ f c z n <span class="fu">=</span> <span class="kw">if</span> (magnitude z <span
<p>We simply add a new dimension to the <code>mandel</code> function and change the type signature of <code>f</code> from <code>Complex</code> to <code>ExtComplex</code>.</p>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell">mandel x y z <span class="fu">=</span>
<span class="kw">let</span> r <span class="fu">=</span> <span class="fl">2.0</span> <span class="fu">*</span> x <span class="fu">/</span> width
i <span class="fu">=</span> <span class="fl">2.0</span> <span class="fu">*</span> y <span class="fu">/</span> height
s <span class="fu">=</span> <span class="fl">2.0</span> <span class="fu">*</span> z <span class="fu">/</span> deep
<span class="kw">let</span> r <span class="fu">=</span> <span class="dv">2</span><span class="fu">.</span><span class="dv">0</span> <span class="fu">*</span> x <span class="fu">/</span> width
i <span class="fu">=</span> <span class="dv">2</span><span class="fu">.</span><span class="dv">0</span> <span class="fu">*</span> y <span class="fu">/</span> height
s <span class="fu">=</span> <span class="dv">2</span><span class="fu">.</span><span class="dv">0</span> <span class="fu">*</span> z <span class="fu">/</span> deep
<span class="kw">in</span>
f (extcomplex r i s) <span class="dv">0</span> <span class="dv">64</span></code></pre>
</div>
@ -712,8 +704,8 @@ f c z n <span class="fu">=</span> <span class="kw">if</span> (magnitude z <span
<li><a href="code/04_Mandelbulb/ExtComplex.hs"><code>ExtComplex</code></a>, the extended complexes</li>
</ul>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">YBoiler</span> <span class="co">-- Most the OpenGL Boilerplate</span>
<span class="kw">import</span> <span class="dt">Mandel</span> <span class="co">-- The 3D Mandelbrot maths</span></code></pre>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> YBoiler -- Most the OpenGL Boilerplate
<span class="kw">import</span> Mandel -- The 3D Mandelbrot maths</code></pre>
</div>
<p>The <code>yMainLoop</code> takes two arguments: the title of the window and a function from time to triangles</p>
@ -737,7 +729,7 @@ allPoints <span class="fu">=</span> planPoints <span class="fu">++</span> <span
<span class="kw">where</span>
planPoints <span class="fu">=</span> depthPoints <span class="fu">++</span> <span class="fu">map</span> inverseHeight depthPoints
inverseHeight (x,y,z,c) <span class="fu">=</span> (x,<span class="fu">-</span>y,z,c)
inverseDepth (x,y,z,c) <span class="fu">=</span> (x,y,<span class="fu">-</span>z<span class="dv">+1</span><span class="fu">/</span>deep,c)</code></pre>
inverseDepth (x,y,z,c) <span class="fu">=</span> (x,y,<span class="fu">-</span>z<span class="fu">+</span><span class="dv">1</span><span class="fu">/</span>deep,c)</code></pre>
</div>
<div class="codehighlight">
@ -746,12 +738,12 @@ depthPoints <span class="fu">=</span> <span class="kw">do</span>
x <span class="ot">&lt;-</span> [<span class="fu">-</span>width<span class="fu">..</span>width]
y <span class="ot">&lt;-</span> [<span class="dv">0</span><span class="fu">..</span>height]
<span class="kw">let</span>
neighbors <span class="fu">=</span> [(x,y),(x<span class="dv">+1</span>,y),(x<span class="dv">+1</span>,y<span class="dv">+1</span>),(x,y<span class="dv">+1</span>)]
neighbors <span class="fu">=</span> [(x,y),(x<span class="fu">+</span><span class="dv">1</span>,y),(x<span class="fu">+</span><span class="dv">1</span>,y<span class="fu">+</span><span class="dv">1</span>),(x,y<span class="fu">+</span><span class="dv">1</span>)]
depthOf (u,v) <span class="fu">=</span> maxZeroIndex (ymandel u v) <span class="dv">0</span> deep <span class="dv">7</span>
<span class="co">-- zs are 3D points with found depth</span>
zs <span class="fu">=</span> <span class="fu">map</span> (\(u,v) <span class="ot">-&gt;</span> (u,v,depthOf (u,v))) neighbors
<span class="co">-- ts are 3D pixels + mandel value</span>
ts <span class="fu">=</span> <span class="fu">map</span> (\(u,v,w) <span class="ot">-&gt;</span> (u,v,w,ymandel u v (w<span class="dv">+1</span>))) zs
ts <span class="fu">=</span> <span class="fu">map</span> (\(u,v,w) <span class="ot">-&gt;</span> (u,v,w,ymandel u v (w<span class="fu">+</span><span class="dv">1</span>))) zs
<span class="co">-- ps are 3D opengl points + color value</span>
ps <span class="fu">=</span> <span class="fu">map</span> (\(u,v,w,c') <span class="ot">-&gt;</span>
(u<span class="fu">/</span>width,v<span class="fu">/</span>height,w<span class="fu">/</span>deep,colorFromValue c')) ts
@ -772,16 +764,16 @@ depthPoints <span class="fu">=</span> <span class="kw">do</span>
maxZeroIndex func minval maxval <span class="dv">0</span> <span class="fu">=</span> (minval<span class="fu">+</span>maxval)<span class="fu">/</span><span class="dv">2</span>
maxZeroIndex func minval maxval n <span class="fu">=</span>
<span class="kw">if</span> (func medpoint) <span class="fu">/=</span> <span class="dv">0</span>
<span class="kw">then</span> maxZeroIndex func minval medpoint (n<span class="dv">-1</span>)
<span class="kw">else</span> maxZeroIndex func medpoint maxval (n<span class="dv">-1</span>)
<span class="kw">then</span> maxZeroIndex func minval medpoint (n<span class="fu">-</span><span class="dv">1</span>)
<span class="kw">else</span> maxZeroIndex func medpoint maxval (n<span class="fu">-</span><span class="dv">1</span>)
<span class="kw">where</span> medpoint <span class="fu">=</span> (minval<span class="fu">+</span>maxval)<span class="fu">/</span><span class="dv">2</span>
colorFromValue n <span class="fu">=</span>
<span class="kw">let</span>
<span class="ot"> t ::</span> <span class="dt">Int</span> <span class="ot">-&gt;</span> <span class="dt">GLfloat</span>
t i <span class="fu">=</span> <span class="fl">0.7</span> <span class="fu">+</span> <span class="fl">0.3</span><span class="fu">*cos</span>( <span class="fu">fromIntegral</span> i <span class="fu">/</span> <span class="dv">10</span> )
t i <span class="fu">=</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">7</span> <span class="fu">+</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">3</span><span class="fu">*cos</span>( <span class="fu">fromIntegral</span> i <span class="fu">/</span> <span class="dv">10</span> )
<span class="kw">in</span>
((t n),(t (n<span class="dv">+5</span>)),(t (n<span class="dv">+10</span>)))
((t n),(t (n<span class="fu">+</span><span class="dv">5</span>)),(t (n<span class="fu">+</span><span class="dv">10</span>)))
ymandel x y z <span class="fu">=</span> mandel (<span class="dv">2</span><span class="fu">*</span>x<span class="fu">/</span>width) (<span class="dv">2</span><span class="fu">*</span>y<span class="fu">/</span>height) (<span class="dv">2</span><span class="fu">*</span>z<span class="fu">/</span>deep) <span class="dv">64</span></code></pre>
</div>
@ -815,8 +807,8 @@ ymandel x y z <span class="fu">=</span> mandel (<span class="dv">2</span><span c
</ul>
<p>Here is a real working code, Ive hidden most display functions. The YGL, is a kind of framework to display 3D functions. But it can easily be extended to many kind of representation.</p>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">YGL</span> <span class="co">-- Most the OpenGL Boilerplate</span>
<span class="kw">import</span> <span class="dt">Mandel</span> <span class="co">-- The 3D Mandelbrot maths</span></code></pre>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> YGL -- Most the OpenGL Boilerplate
<span class="kw">import</span> Mandel -- The 3D Mandelbrot maths</code></pre>
</div>
<p>We first set the mapping between user input and actions. The type of each couple should be of the form <code>(user input, f)</code> where (in a first time) <code>f:World -&gt; World</code>. It means, the user input will transform the world state.</p>
@ -830,16 +822,16 @@ inputActionMap <span class="fu">=</span> inputMapFromList [
,(<span class="dt">Press</span> <span class="ch">'l'</span> , rotate ydir (<span class="fu">-</span><span class="dv">5</span>))
,(<span class="dt">Press</span> <span class="ch">'o'</span> , rotate zdir <span class="dv">5</span>)
,(<span class="dt">Press</span> <span class="ch">'u'</span> , rotate zdir (<span class="fu">-</span><span class="dv">5</span>))
,(<span class="dt">Press</span> <span class="ch">'f'</span> , translate xdir <span class="fl">0.1</span>)
,(<span class="dt">Press</span> <span class="ch">'s'</span> , translate xdir (<span class="fu">-</span><span class="fl">0.1</span>))
,(<span class="dt">Press</span> <span class="ch">'e'</span> , translate ydir <span class="fl">0.1</span>)
,(<span class="dt">Press</span> <span class="ch">'d'</span> , translate ydir (<span class="fu">-</span><span class="fl">0.1</span>))
,(<span class="dt">Press</span> <span class="ch">'z'</span> , translate zdir <span class="fl">0.1</span>)
,(<span class="dt">Press</span> <span class="ch">'r'</span> , translate zdir (<span class="fu">-</span><span class="fl">0.1</span>))
,(<span class="dt">Press</span> <span class="ch">'+'</span> , zoom <span class="fl">1.1</span>)
,(<span class="dt">Press</span> <span class="ch">'-'</span> , zoom (<span class="dv">1</span><span class="fu">/</span><span class="fl">1.1</span>))
,(<span class="dt">Press</span> <span class="ch">'h'</span> , resize <span class="fl">1.2</span>)
,(<span class="dt">Press</span> <span class="ch">'g'</span> , resize (<span class="dv">1</span><span class="fu">/</span><span class="fl">1.2</span>))
,(<span class="dt">Press</span> <span class="ch">'f'</span> , translate xdir <span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>)
,(<span class="dt">Press</span> <span class="ch">'s'</span> , translate xdir (<span class="fu">-</span><span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>))
,(<span class="dt">Press</span> <span class="ch">'e'</span> , translate ydir <span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>)
,(<span class="dt">Press</span> <span class="ch">'d'</span> , translate ydir (<span class="fu">-</span><span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>))
,(<span class="dt">Press</span> <span class="ch">'z'</span> , translate zdir <span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>)
,(<span class="dt">Press</span> <span class="ch">'r'</span> , translate zdir (<span class="fu">-</span><span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>))
,(<span class="dt">Press</span> <span class="ch">'+'</span> , zoom <span class="dv">1</span><span class="fu">.</span><span class="dv">1</span>)
,(<span class="dt">Press</span> <span class="ch">'-'</span> , zoom (<span class="dv">1</span><span class="fu">/</span><span class="dv">1</span><span class="fu">.</span><span class="dv">1</span>))
,(<span class="dt">Press</span> <span class="ch">'h'</span> , resize <span class="dv">1</span><span class="fu">.</span><span class="dv">2</span>)
,(<span class="dt">Press</span> <span class="ch">'g'</span> , resize (<span class="dv">1</span><span class="fu">/</span><span class="dv">1</span><span class="fu">.</span><span class="dv">2</span>))
]</code></pre>
</div>
@ -932,11 +924,11 @@ main <span class="fu">=</span> yMainLoop inputActionMap idleAction initialWorld<
initialWorld <span class="fu">=</span> <span class="dt">World</span> {
angle <span class="fu">=</span> makePoint3D (<span class="fu">-</span><span class="dv">30</span>,<span class="fu">-</span><span class="dv">30</span>,<span class="dv">0</span>)
, position <span class="fu">=</span> makePoint3D (<span class="dv">0</span>,<span class="dv">0</span>,<span class="dv">0</span>)
, scale <span class="fu">=</span> <span class="fl">0.8</span>
, scale <span class="fu">=</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">8</span>
, shape <span class="fu">=</span> shapeFunc
, box <span class="fu">=</span> <span class="dt">Box3D</span> { minPoint <span class="fu">=</span> makePoint3D (<span class="fu">-</span><span class="dv">2</span>,<span class="fu">-</span><span class="dv">2</span>,<span class="fu">-</span><span class="dv">2</span>)
, maxPoint <span class="fu">=</span> makePoint3D (<span class="dv">2</span>,<span class="dv">2</span>,<span class="dv">2</span>)
, resolution <span class="fu">=</span> <span class="fl">0.16</span> }
, resolution <span class="fu">=</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">16</span> }
, told <span class="fu">=</span> <span class="dv">0</span>
}</code></pre>
</div>
@ -949,8 +941,8 @@ idleAction tnew world <span class="fu">=</span> world {
, told <span class="fu">=</span> tnew
}
<span class="kw">where</span>
anglePerSec <span class="fu">=</span> <span class="fl">5.0</span>
delta <span class="fu">=</span> anglePerSec <span class="fu">*</span> elapsed <span class="fu">/</span> <span class="fl">1000.0</span>
anglePerSec <span class="fu">=</span> <span class="dv">5</span><span class="fu">.</span><span class="dv">0</span>
delta <span class="fu">=</span> anglePerSec <span class="fu">*</span> elapsed <span class="fu">/</span> <span class="dv">1000</span><span class="fu">.</span><span class="dv">0</span>
elapsed <span class="fu">=</span> <span class="fu">fromIntegral</span> (tnew <span class="fu">-</span> (told world))</code></pre>
</div>
@ -962,7 +954,7 @@ shapeFunc res x y <span class="fu">=</span>
<span class="kw">let</span>
z <span class="fu">=</span> maxZeroIndex (ymandel x y) <span class="dv">0</span> <span class="dv">1</span> <span class="dv">20</span>
<span class="kw">in</span>
<span class="kw">if</span> <span class="fu">and</span> [ maxZeroIndex (ymandel (x<span class="fu">+</span>xeps) (y<span class="fu">+</span>yeps)) <span class="dv">0</span> <span class="dv">1</span> <span class="dv">20</span> <span class="fu">&lt;</span> <span class="fl">0.000001</span> <span class="fu">|</span>
<span class="kw">if</span> <span class="fu">and</span> [ maxZeroIndex (ymandel (x<span class="fu">+</span>xeps) (y<span class="fu">+</span>yeps)) <span class="dv">0</span> <span class="dv">1</span> <span class="dv">20</span> <span class="fu">&lt;</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">000001</span> <span class="fu">|</span>
val <span class="ot">&lt;-</span> [res], xeps <span class="ot">&lt;-</span> [<span class="fu">-</span>val,val], yeps<span class="ot">&lt;-</span>[<span class="fu">-</span>val,val]]
<span class="kw">then</span> <span class="kw">Nothing</span>
<span class="kw">else</span> <span class="kw">Just</span> (z,colorFromValue ((ymandel x y z) <span class="fu">*</span> <span class="dv">64</span>))</code></pre>
@ -974,9 +966,9 @@ shapeFunc res x y <span class="fu">=</span>
colorFromValue n <span class="fu">=</span>
<span class="kw">let</span>
<span class="ot"> t ::</span> <span class="dt">Point</span> <span class="ot">-&gt;</span> <span class="dt">Scalar</span>
t i <span class="fu">=</span> <span class="fl">0.7</span> <span class="fu">+</span> <span class="fl">0.3</span><span class="fu">*cos</span>( i <span class="fu">/</span> <span class="dv">10</span> )
t i <span class="fu">=</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">7</span> <span class="fu">+</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">3</span><span class="fu">*cos</span>( i <span class="fu">/</span> <span class="dv">10</span> )
<span class="kw">in</span>
makeColor (t n) (t (n<span class="dv">+5</span>)) (t (n<span class="dv">+10</span>))</code></pre>
makeColor (t n) (t (n<span class="fu">+</span><span class="dv">5</span>)) (t (n<span class="fu">+</span><span class="dv">10</span>))</code></pre>
</div>
<p>The rest is similar to the preceding sections.</p>
@ -994,8 +986,8 @@ colorFromValue n <span class="fu">=</span>
maxZeroIndex _ minval maxval <span class="dv">0</span> <span class="fu">=</span> (minval<span class="fu">+</span>maxval)<span class="fu">/</span><span class="dv">2</span>
maxZeroIndex func minval maxval n <span class="fu">=</span>
<span class="kw">if</span> (func medpoint) <span class="fu">/=</span> <span class="dv">0</span>
<span class="kw">then</span> maxZeroIndex func minval medpoint (n<span class="dv">-1</span>)
<span class="kw">else</span> maxZeroIndex func medpoint maxval (n<span class="dv">-1</span>)
<span class="kw">then</span> maxZeroIndex func minval medpoint (n<span class="fu">-</span><span class="dv">1</span>)
<span class="kw">else</span> maxZeroIndex func medpoint maxval (n<span class="fu">-</span><span class="dv">1</span>)
<span class="kw">where</span> medpoint <span class="fu">=</span> (minval<span class="fu">+</span>maxval)<span class="fu">/</span><span class="dv">2</span>
<span class="ot">ymandel ::</span> <span class="dt">Point</span> <span class="ot">-&gt;</span> <span class="dt">Point</span> <span class="ot">-&gt;</span> <span class="dt">Point</span> <span class="ot">-&gt;</span> <span class="dt">Point</span>
@ -1022,8 +1014,8 @@ ymandel x y z <span class="fu">=</span> <span class="fu">fromIntegral</span> (ma
<div style="display:none">
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">YGL</span> <span class="co">-- Most the OpenGL Boilerplate</span>
<span class="kw">import</span> <span class="dt">Mandel</span> <span class="co">-- The 3D Mandelbrot maths</span>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> YGL -- Most the OpenGL Boilerplate
<span class="kw">import</span> Mandel -- The 3D Mandelbrot maths
<span class="co">-- Centralize all user input interaction</span>
<span class="ot">inputActionMap ::</span> <span class="dt">InputMap</span> <span class="dt">World</span>
@ -1035,16 +1027,16 @@ inputActionMap <span class="fu">=</span> inputMapFromList [
,(<span class="dt">Press</span> <span class="ch">'l'</span> , rotate ydir (<span class="fu">-</span><span class="dv">5</span>))
,(<span class="dt">Press</span> <span class="ch">'o'</span> , rotate zdir <span class="dv">5</span>)
,(<span class="dt">Press</span> <span class="ch">'u'</span> , rotate zdir (<span class="fu">-</span><span class="dv">5</span>))
,(<span class="dt">Press</span> <span class="ch">'f'</span> , translate xdir <span class="fl">0.1</span>)
,(<span class="dt">Press</span> <span class="ch">'s'</span> , translate xdir (<span class="fu">-</span><span class="fl">0.1</span>))
,(<span class="dt">Press</span> <span class="ch">'e'</span> , translate ydir <span class="fl">0.1</span>)
,(<span class="dt">Press</span> <span class="ch">'d'</span> , translate ydir (<span class="fu">-</span><span class="fl">0.1</span>))
,(<span class="dt">Press</span> <span class="ch">'z'</span> , translate zdir <span class="fl">0.1</span>)
,(<span class="dt">Press</span> <span class="ch">'r'</span> , translate zdir (<span class="fu">-</span><span class="fl">0.1</span>))
,(<span class="dt">Press</span> <span class="ch">'+'</span> , zoom <span class="fl">1.1</span>)
,(<span class="dt">Press</span> <span class="ch">'-'</span> , zoom (<span class="dv">1</span><span class="fu">/</span><span class="fl">1.1</span>))
,(<span class="dt">Press</span> <span class="ch">'h'</span> , resize <span class="fl">2.0</span>)
,(<span class="dt">Press</span> <span class="ch">'g'</span> , resize (<span class="dv">1</span><span class="fu">/</span><span class="fl">2.0</span>))
,(<span class="dt">Press</span> <span class="ch">'f'</span> , translate xdir <span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>)
,(<span class="dt">Press</span> <span class="ch">'s'</span> , translate xdir (<span class="fu">-</span><span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>))
,(<span class="dt">Press</span> <span class="ch">'e'</span> , translate ydir <span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>)
,(<span class="dt">Press</span> <span class="ch">'d'</span> , translate ydir (<span class="fu">-</span><span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>))
,(<span class="dt">Press</span> <span class="ch">'z'</span> , translate zdir <span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>)
,(<span class="dt">Press</span> <span class="ch">'r'</span> , translate zdir (<span class="fu">-</span><span class="dv">0</span><span class="fu">.</span><span class="dv">1</span>))
,(<span class="dt">Press</span> <span class="ch">'+'</span> , zoom <span class="dv">1</span><span class="fu">.</span><span class="dv">1</span>)
,(<span class="dt">Press</span> <span class="ch">'-'</span> , zoom (<span class="dv">1</span><span class="fu">/</span><span class="dv">1</span><span class="fu">.</span><span class="dv">1</span>))
,(<span class="dt">Press</span> <span class="ch">'h'</span> , resize <span class="dv">2</span><span class="fu">.</span><span class="dv">0</span>)
,(<span class="dt">Press</span> <span class="ch">'g'</span> , resize (<span class="dv">1</span><span class="fu">/</span><span class="dv">2</span><span class="fu">.</span><span class="dv">0</span>))
]</code></pre>
</div>
@ -1092,7 +1084,7 @@ rotate dir angleValue world <span class="fu">=</span>
<span class="ot">switchRotation ::</span> <span class="dt">World</span> <span class="ot">-&gt;</span> <span class="dt">World</span>
switchRotation world <span class="fu">=</span>
world {
anglePerSec <span class="fu">=</span> <span class="kw">if</span> anglePerSec world <span class="fu">&gt;</span> <span class="dv">0</span> <span class="kw">then</span> <span class="dv">0</span> <span class="kw">else</span> <span class="fl">5.0</span> }
anglePerSec <span class="fu">=</span> <span class="kw">if</span> anglePerSec world <span class="fu">&gt;</span> <span class="dv">0</span> <span class="kw">then</span> <span class="dv">0</span> <span class="kw">else</span> <span class="dv">5</span><span class="fu">.</span><span class="dv">0</span> }
<span class="ot">translate ::</span> <span class="dt">Point3D</span> <span class="ot">-&gt;</span> <span class="dt">Scalar</span> <span class="ot">-&gt;</span> <span class="dt">World</span> <span class="ot">-&gt;</span> <span class="dt">World</span>
translate dir len world <span class="fu">=</span>
@ -1119,12 +1111,12 @@ main <span class="fu">=</span> yMainLoop inputActionMap idleAction initialWorld<
<span class="ot">initialWorld ::</span> <span class="dt">World</span>
initialWorld <span class="fu">=</span> <span class="dt">World</span> {
angle <span class="fu">=</span> makePoint3D (<span class="dv">30</span>,<span class="dv">30</span>,<span class="dv">0</span>)
, anglePerSec <span class="fu">=</span> <span class="fl">5.0</span>
, anglePerSec <span class="fu">=</span> <span class="dv">5</span><span class="fu">.</span><span class="dv">0</span>
, position <span class="fu">=</span> makePoint3D (<span class="dv">0</span>,<span class="dv">0</span>,<span class="dv">0</span>)
, scale <span class="fu">=</span> <span class="fl">1.0</span>
, scale <span class="fu">=</span> <span class="dv">1</span><span class="fu">.</span><span class="dv">0</span>
, box <span class="fu">=</span> <span class="dt">Box3D</span> { minPoint <span class="fu">=</span> makePoint3D (<span class="dv">0</span><span class="fu">-</span>eps, <span class="dv">0</span><span class="fu">-</span>eps, <span class="dv">0</span><span class="fu">-</span>eps)
, maxPoint <span class="fu">=</span> makePoint3D (<span class="dv">0</span><span class="fu">+</span>eps, <span class="dv">0</span><span class="fu">+</span>eps, <span class="dv">0</span><span class="fu">+</span>eps)
, resolution <span class="fu">=</span> <span class="fl">0.02</span> }
, resolution <span class="fu">=</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">02</span> }
, told <span class="fu">=</span> <span class="dv">0</span>
<span class="co">-- We declare cache directly this time</span>
, cache <span class="fu">=</span> objectFunctionFromWorld initialWorld
@ -1168,7 +1160,7 @@ idleAction tnew world <span class="fu">=</span>
, told <span class="fu">=</span> tnew
}
<span class="kw">where</span>
delta <span class="fu">=</span> anglePerSec world <span class="fu">*</span> elapsed <span class="fu">/</span> <span class="fl">1000.0</span>
delta <span class="fu">=</span> anglePerSec world <span class="fu">*</span> elapsed <span class="fu">/</span> <span class="dv">1000</span><span class="fu">.</span><span class="dv">0</span>
elapsed <span class="fu">=</span> <span class="fu">fromIntegral</span> (tnew <span class="fu">-</span> (told world))
<span class="ot">shapeFunc ::</span> <span class="dt">Scalar</span> <span class="ot">-&gt;</span> <span class="dt">Function3D</span>
@ -1176,7 +1168,7 @@ shapeFunc res x y <span class="fu">=</span>
<span class="kw">let</span>
z <span class="fu">=</span> maxZeroIndex (ymandel x y) <span class="dv">0</span> <span class="dv">1</span> <span class="dv">20</span>
<span class="kw">in</span>
<span class="kw">if</span> <span class="fu">and</span> [ maxZeroIndex (ymandel (x<span class="fu">+</span>xeps) (y<span class="fu">+</span>yeps)) <span class="dv">0</span> <span class="dv">1</span> <span class="dv">20</span> <span class="fu">&lt;</span> <span class="fl">0.000001</span> <span class="fu">|</span>
<span class="kw">if</span> <span class="fu">and</span> [ maxZeroIndex (ymandel (x<span class="fu">+</span>xeps) (y<span class="fu">+</span>yeps)) <span class="dv">0</span> <span class="dv">1</span> <span class="dv">20</span> <span class="fu">&lt;</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">000001</span> <span class="fu">|</span>
val <span class="ot">&lt;-</span> [res], xeps <span class="ot">&lt;-</span> [<span class="fu">-</span>val,val], yeps<span class="ot">&lt;-</span>[<span class="fu">-</span>val,val]]
<span class="kw">then</span> <span class="kw">Nothing</span>
<span class="kw">else</span> <span class="kw">Just</span> (z,colorFromValue <span class="dv">0</span>)
@ -1185,9 +1177,9 @@ shapeFunc res x y <span class="fu">=</span>
colorFromValue n <span class="fu">=</span>
<span class="kw">let</span>
<span class="ot"> t ::</span> <span class="dt">Point</span> <span class="ot">-&gt;</span> <span class="dt">Scalar</span>
t i <span class="fu">=</span> <span class="fl">0.0</span> <span class="fu">+</span> <span class="fl">0.5</span><span class="fu">*cos</span>( i <span class="fu">/</span><span class="dv">10</span> )
t i <span class="fu">=</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">0</span> <span class="fu">+</span> <span class="dv">0</span><span class="fu">.</span><span class="dv">5</span><span class="fu">*cos</span>( i <span class="fu">/</span><span class="dv">10</span> )
<span class="kw">in</span>
makeColor (t n) (t (n<span class="dv">+5</span>)) (t (n<span class="dv">+10</span>))
makeColor (t n) (t (n<span class="fu">+</span><span class="dv">5</span>)) (t (n<span class="fu">+</span><span class="dv">10</span>))
<span class="co">-- given f min max nbtest,</span>
<span class="co">-- considering </span>
@ -1202,8 +1194,8 @@ colorFromValue n <span class="fu">=</span>
maxZeroIndex _ minval maxval <span class="dv">0</span> <span class="fu">=</span> (minval<span class="fu">+</span>maxval)<span class="fu">/</span><span class="dv">2</span>
maxZeroIndex func minval maxval n <span class="fu">=</span>
<span class="kw">if</span> func medpoint <span class="fu">/=</span> <span class="dv">0</span>
<span class="kw">then</span> maxZeroIndex func minval medpoint (n<span class="dv">-1</span>)
<span class="kw">else</span> maxZeroIndex func medpoint maxval (n<span class="dv">-1</span>)
<span class="kw">then</span> maxZeroIndex func minval medpoint (n<span class="fu">-</span><span class="dv">1</span>)
<span class="kw">else</span> maxZeroIndex func medpoint maxval (n<span class="fu">-</span><span class="dv">1</span>)
<span class="kw">where</span> medpoint <span class="fu">=</span> (minval<span class="fu">+</span>maxval)<span class="fu">/</span><span class="dv">2</span>
<span class="ot">ymandel ::</span> <span class="dt">Point</span> <span class="ot">-&gt;</span> <span class="dt">Point</span> <span class="ot">-&gt;</span> <span class="dt">Point</span> <span class="ot">-&gt;</span> <span class="dt">Point</span>
@ -1237,25 +1229,26 @@ ymandel x y z <span class="fu">=</span> <span class="fu">fromIntegral</span> (ma
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/Haskell-OpenGL-Mandelbrot/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/Haskell-OpenGL-Mandelbrot" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/Haskell-OpenGL-Mandelbrot" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -1273,6 +1266,7 @@ ymandel x y z <span class="fu">=</span> <span class="fu">fromIntegral</span> (ma
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2012-06-15

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Learn Haskell Fast and Hard</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/Haskell-the-Hard-Way/magritte_pleasure_principle.jpg" alt="Magritte pleasure principle" /></p>
<div class="intro">
@ -258,7 +250,7 @@ Function declaration
<span class="kw">return</span> x*x + y*y;
}</code></pre>
<p>In Javascript:</p>
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="kw">function</span> f(x,y) {
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="kw">function</span> <span class="fu">f</span>(x,y) {
<span class="kw">return</span> x*x + y*y;
}</code></pre>
<p>in Python:</p>
@ -298,7 +290,7 @@ main <span class="fu">=</span> <span class="fu">print</span> (f <span class="dv"
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="ot">f ::</span> <span class="dt">Int</span> <span class="ot">-&gt;</span> <span class="dt">Int</span> <span class="ot">-&gt;</span> <span class="dt">Int</span>
f x y <span class="fu">=</span> x<span class="fu">*</span>x <span class="fu">+</span> y<span class="fu">*</span>y
main <span class="fu">=</span> <span class="fu">print</span> (f <span class="fl">2.3</span> <span class="fl">4.2</span>)</code></pre>
main <span class="fu">=</span> <span class="fu">print</span> (f <span class="dv">2</span><span class="fu">.</span><span class="dv">3</span> <span class="dv">4</span><span class="fu">.</span><span class="dv">2</span>)</code></pre>
</div>
<p>You get this error:</p>
<pre><code>21_very_basic.lhs:6:23:
@ -316,7 +308,7 @@ main <span class="fu">=</span> <span class="fu">print</span> (f <span class="fl"
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell">f x y <span class="fu">=</span> x<span class="fu">*</span>x <span class="fu">+</span> y<span class="fu">*</span>y
main <span class="fu">=</span> <span class="fu">print</span> (f <span class="fl">2.3</span> <span class="fl">4.2</span>)</code></pre>
main <span class="fu">=</span> <span class="fu">print</span> (f <span class="dv">2</span><span class="fu">.</span><span class="dv">3</span> <span class="dv">4</span><span class="fu">.</span><span class="dv">2</span>)</code></pre>
</div>
<p>It works! Great, we dont have to declare a new function for every single type. For example, in <code>C</code>, youll have to declare a function for <code>int</code>, for <code>float</code>, for <code>long</code>, for <code>double</code>, etc…</p>
<p>But, what type should we declare? To discover the type Haskell has found for us, just launch ghci:</p>
@ -363,7 +355,7 @@ g y ⇔ 3*3 + y*y</code></pre>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="ot">f ::</span> <span class="kw">Num</span> a <span class="ot">=&gt;</span> a <span class="ot">-&gt;</span> a <span class="ot">-&gt;</span> a
f x y <span class="fu">=</span> x<span class="fu">*</span>x <span class="fu">+</span> y<span class="fu">*</span>y
main <span class="fu">=</span> <span class="fu">print</span> (f <span class="dv">3</span> <span class="fl">2.4</span>)</code></pre>
main <span class="fu">=</span> <span class="fu">print</span> (f <span class="dv">3</span> <span class="dv">2</span><span class="fu">.</span><span class="dv">4</span>)</code></pre>
</div>
<p>It works, because, <code>3</code> is a valid representation both for Fractional numbers like Float and for Integer. As <code>2.4</code> is a Fractional number, <code>3</code> is then interpreted as being also a Fractional number.</p>
<p><a href="code/01_basic/10_Introduction/23_very_basic.lhs" class="cut">01_basic/10_Introduction/<strong>23_very_basic.lhs</strong> </a></p>
@ -377,7 +369,7 @@ f x y <span class="fu">=</span> x<span class="fu">*</span>x <span class="fu">+</
<span class="ot">x ::</span> <span class="dt">Int</span>
x <span class="fu">=</span> <span class="dv">3</span>
<span class="ot">y ::</span> <span class="dt">Float</span>
y <span class="fu">=</span> <span class="fl">2.4</span>
y <span class="fu">=</span> <span class="dv">2</span><span class="fu">.</span><span class="dv">4</span>
main <span class="fu">=</span> <span class="fu">print</span> (f x y) <span class="co">-- won't work because type x ≠ type y</span></code></pre>
</div>
<p>The compiler complains. The two parameters must have the same type.</p>
@ -566,9 +558,9 @@ Functional style
<p>example: <code>[1,2,3,4,5] ⇒ 2 + 4 ⇒ 6</code></p>
</blockquote>
<p>To show differences between the functional and imperative approach, Ill start by providing an imperative solution (in Javascript):</p>
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="kw">function</span> evenSum(list) {
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="kw">function</span> <span class="fu">evenSum</span>(list) {
<span class="kw">var</span> result = <span class="dv">0</span>;
<span class="kw">for</span> (<span class="kw">var</span> i=<span class="dv">0</span>; i&lt; <span class="kw">list</span>.<span class="fu">length</span> ; i++) {
<span class="kw">for</span> (<span class="kw">var</span> i=<span class="dv">0</span>; i&lt; <span class="ot">list</span>.<span class="fu">length</span> ; i++) {
<span class="kw">if</span> (list[i] % <span class="dv">2</span> ==<span class="dv">0</span>) {
result += list[i];
}
@ -809,7 +801,7 @@ myfunc list = foldl <span class="yellow">bar</span> <span class="blue">initialVa
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="co">-- Version 6</span>
<span class="co">-- foldl' isn't accessible by default</span>
<span class="co">-- we need to import it from the module Data.List</span>
<span class="kw">import</span> <span class="dt">Data.List</span>
<span class="kw">import</span> Data.List
evenSum l <span class="fu">=</span> foldl' mysum <span class="dv">0</span> (<span class="fu">filter</span> <span class="fu">even</span> l)
<span class="kw">where</span> mysum acc value <span class="fu">=</span> acc <span class="fu">+</span> value</code></pre>
<p>Version we can simplify by using directly a lambda notation. This way we dont have to create the temporary name <code>mysum</code>.</p>
@ -817,7 +809,7 @@ evenSum l <span class="fu">=</span> foldl' mysum <span class="dv">0</span> (<spa
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="co">-- Version 7</span>
<span class="co">-- Generally it is considered a good practice</span>
<span class="co">-- to import only the necessary function(s)</span>
<span class="kw">import</span> <span class="dt">Data.List</span> (foldl')
<span class="kw">import</span> Data.List (foldl')
evenSum l <span class="fu">=</span> foldl' (\x y <span class="ot">-&gt;</span> x<span class="fu">+</span>y) <span class="dv">0</span> (<span class="fu">filter</span> <span class="fu">even</span> l)</code></pre>
</div>
<p>And of course, we note that</p>
@ -834,7 +826,7 @@ evenSum l <span class="fu">=</span> foldl' (\x y <span class="ot">-&gt;</span> x
<p><a href="code/02_Hard_Part/16_Functions.lhs" class="cut">02_Hard_Part/<strong>16_Functions.lhs</strong></a></p>
<p>Finally</p>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="co">-- Version 8</span>
<span class="kw">import</span> <span class="dt">Data.List</span> (foldl')
<span class="kw">import</span> Data.List (foldl')
<span class="ot">evenSum ::</span> <span class="kw">Integral</span> a <span class="ot">=&gt;</span> [a] <span class="ot">-&gt;</span> a
evenSum l <span class="fu">=</span> foldl' (<span class="fu">+</span>) <span class="dv">0</span> (<span class="fu">filter</span> <span class="fu">even</span> l)</code></pre>
<p><code>foldl'</code> isnt the easiest function to intuit. If you are not used to it, you should study it a bit.</p>
@ -854,13 +846,13 @@ evenSum l <span class="fu">=</span> foldl' (<span class="fu">+</span>) <span cla
<pre class="sourceCode haskell"><code class="sourceCode haskell">(f <span class="fu">.</span> g <span class="fu">.</span> h) x ⇔ f ( g (h x))</code></pre>
<p>We can take advantage of this operator to η-reduce our function:</p>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="co">-- Version 9</span>
<span class="kw">import</span> <span class="dt">Data.List</span> (foldl')
<span class="kw">import</span> Data.List (foldl')
<span class="ot">evenSum ::</span> <span class="kw">Integral</span> a <span class="ot">=&gt;</span> [a] <span class="ot">-&gt;</span> a
evenSum <span class="fu">=</span> (foldl' (<span class="fu">+</span>) <span class="dv">0</span>) <span class="fu">.</span> (<span class="fu">filter</span> <span class="fu">even</span>)</code></pre>
<p>Also, we could rename some parts to make it clearer:</p>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="co">-- Version 10 </span>
<span class="kw">import</span> <span class="dt">Data.List</span> (foldl')
<span class="kw">import</span> Data.List (foldl')
<span class="ot">sum' ::</span> (<span class="kw">Num</span> a) <span class="ot">=&gt;</span> [a] <span class="ot">-&gt;</span> a
sum' <span class="fu">=</span> foldl' (<span class="fu">+</span>) <span class="dv">0</span>
<span class="ot">evenSum ::</span> <span class="kw">Integral</span> a <span class="ot">=&gt;</span> [a] <span class="ot">-&gt;</span> a
@ -1012,9 +1004,9 @@ main <span class="fu">=</span> <span class="fu">putStrLn</span> <span class="fu"
<p>And many accessors are made for you. Furthermore you can use another order when setting values.</p>
<p>Example:</p>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">data</span> <span class="dt">Complex</span> <span class="fu">=</span> <span class="kw">Num</span> a <span class="ot">=&gt;</span> <span class="dt">Complex</span> {<span class="ot"> real ::</span> a,<span class="ot"> img ::</span> a}
c <span class="fu">=</span> <span class="dt">Complex</span> <span class="fl">1.0</span> <span class="fl">2.0</span>
c <span class="fu">=</span> <span class="dt">Complex</span> <span class="dv">1</span><span class="fu">.</span><span class="dv">0</span> <span class="dv">2</span><span class="fu">.</span><span class="dv">0</span>
z <span class="fu">=</span> <span class="dt">Complex</span> { real <span class="fu">=</span> <span class="dv">3</span>, img <span class="fu">=</span> <span class="dv">4</span> }
real c <span class="ot"></span> <span class="fl">1.0</span>
real c <span class="ot"></span> <span class="dv">1</span><span class="fu">.</span><span class="dv">0</span>
img z <span class="ot"></span> <span class="dv">4</span></code></pre>
<p><a href="code/02_Hard_Part/22_Types.lhs" class="cut">02_Hard_Part/<strong>22_Types.lhs</strong> </a></p>
<hr />
@ -1058,7 +1050,7 @@ Trees
<p><img src="../../../../Scratch/img/blog/Haskell-the-Hard-Way/magritte-l-arbre.jpg" alt="Magritte, l" /></p>
<p>Well just give another standard example: binary trees.</p>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">Data.List</span>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> Data.List
<span class="kw">data</span> <span class="dt">BinTree</span> a <span class="fu">=</span> <span class="dt">Empty</span>
<span class="fu">|</span> <span class="dt">Node</span> a (<span class="dt">BinTree</span> a) (<span class="dt">BinTree</span> a)
@ -1263,7 +1255,7 @@ numbers <span class="fu">=</span> <span class="dv">0</span><span class="fu">:map
take' n [] <span class="fu">=</span> []
take' <span class="dv">0</span> l <span class="fu">=</span> []
take' n (x<span class="fu">:</span>xs) <span class="fu">=</span> x<span class="fu">:</span>take' (n<span class="dv">-1</span>) xs
take' n (x<span class="fu">:</span>xs) <span class="fu">=</span> x<span class="fu">:</span>take' (n<span class="fu">-</span><span class="dv">1</span>) xs
main <span class="fu">=</span> <span class="fu">print</span> <span class="fu">$</span> take' <span class="dv">10</span> numbers</code></pre>
</div>
@ -1281,8 +1273,8 @@ main <span class="fu">=</span> <span class="fu">print</span> <span class="fu">$<
<p>This code is mostly the same as the previous one.</p>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">Debug.Trace</span> (trace)
<span class="kw">import</span> <span class="dt">Data.List</span>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> Debug.Trace (trace)
<span class="kw">import</span> Data.List
<span class="kw">data</span> <span class="dt">BinTree</span> a <span class="fu">=</span> <span class="dt">Empty</span>
<span class="fu">|</span> <span class="dt">Node</span> a (<span class="dt">BinTree</span> a) (<span class="dt">BinTree</span> a)
<span class="kw">deriving</span> (<span class="kw">Eq</span>,<span class="kw">Ord</span>)</code></pre>
@ -1339,8 +1331,8 @@ main <span class="fu">=</span> <span class="fu">print</span> <span class="fu">$<
treeTakeDepth _ <span class="dt">Empty</span> <span class="fu">=</span> <span class="dt">Empty</span>
treeTakeDepth <span class="dv">0</span> _ <span class="fu">=</span> <span class="dt">Empty</span>
treeTakeDepth n (<span class="dt">Node</span> x left right) <span class="fu">=</span> <span class="kw">let</span>
nl <span class="fu">=</span> treeTakeDepth (n<span class="dv">-1</span>) left
nr <span class="fu">=</span> treeTakeDepth (n<span class="dv">-1</span>) right
nl <span class="fu">=</span> treeTakeDepth (n<span class="fu">-</span><span class="dv">1</span>) left
nr <span class="fu">=</span> treeTakeDepth (n<span class="fu">-</span><span class="dv">1</span>) right
<span class="kw">in</span>
<span class="dt">Node</span> x nl nr</code></pre>
</div>
@ -1366,8 +1358,8 @@ treeTakeDepth n (<span class="dt">Node</span> x left right) <span class="fu">=</
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell">iTree <span class="fu">=</span> <span class="dt">Node</span> <span class="dv">0</span> (dec iTree) (inc iTree)
<span class="kw">where</span>
dec (<span class="dt">Node</span> x l r) <span class="fu">=</span> <span class="dt">Node</span> (x<span class="dv">-1</span>) (dec l) (dec r)
inc (<span class="dt">Node</span> x l r) <span class="fu">=</span> <span class="dt">Node</span> (x<span class="dv">+1</span>) (inc l) (inc r) </code></pre>
dec (<span class="dt">Node</span> x l r) <span class="fu">=</span> <span class="dt">Node</span> (x<span class="fu">-</span><span class="dv">1</span>) (dec l) (dec r)
inc (<span class="dt">Node</span> x l r) <span class="fu">=</span> <span class="dt">Node</span> (x<span class="fu">+</span><span class="dv">1</span>) (inc l) (inc r) </code></pre>
</div>
<p>Another way to create this tree is to use a higher order function. This function should be similar to <code>map</code>, but should work on <code>BinTree</code> instead of list. Here is such a function:</p>
<div class="codehighlight">
@ -1382,8 +1374,8 @@ treeMap f (<span class="dt">Node</span> x left right) <span class="fu">=</span>
<p>Our definition is now:</p>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="ot">infTreeTwo ::</span> <span class="dt">BinTree</span> <span class="dt">Int</span>
infTreeTwo <span class="fu">=</span> <span class="dt">Node</span> <span class="dv">0</span> (treeMap (\x <span class="ot">-&gt;</span> x<span class="dv">-1</span>) infTreeTwo)
(treeMap (\x <span class="ot">-&gt;</span> x<span class="dv">+1</span>) infTreeTwo) </code></pre>
infTreeTwo <span class="fu">=</span> <span class="dt">Node</span> <span class="dv">0</span> (treeMap (\x <span class="ot">-&gt;</span> x<span class="fu">-</span><span class="dv">1</span>) infTreeTwo)
(treeMap (\x <span class="ot">-&gt;</span> x<span class="fu">+</span><span class="dv">1</span>) infTreeTwo) </code></pre>
</div>
<p>Look at the result for</p>
<pre class="sourceCode haskell"><code class="sourceCode haskell">main <span class="fu">=</span> <span class="fu">print</span> <span class="fu">$</span> treeTakeDepth <span class="dv">4</span> infTreeTwo</code></pre>
@ -1500,7 +1492,7 @@ main = do
<p>Argh! An evil error message and a crash! The first evolution will be to answer with a more friendly message.</p>
<p>In order to do this, we must detect that something went wrong. Here is one way to do this. Use the type <code>Maybe</code>. It is a very common type in Haskell.</p>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">Data.Maybe</span></code></pre>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> Data.Maybe</code></pre>
</div>
<p>What is this thing? <code>Maybe</code> is a type which takes one parameter. Its definition is:</p>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">data</span> <span class="dt">Maybe</span> a <span class="fu">=</span> <span class="kw">Nothing</span> <span class="fu">|</span> <span class="kw">Just</span> a</code></pre>
@ -1543,7 +1535,7 @@ main <span class="fu">=</span> <span class="kw">do</span>
<p>Our next evolution will be to prompt the user again and again until she enters a valid answer.</p>
<p>We keep the first part:</p>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">Data.Maybe</span>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> Data.Maybe
<span class="ot">maybeRead ::</span> <span class="kw">Read</span> a <span class="ot">=&gt;</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">Maybe</span> a
maybeRead s <span class="fu">=</span> <span class="kw">case</span> <span class="fu">reads</span> s <span class="kw">of</span>
@ -1806,7 +1798,7 @@ main <span class="fu">=</span> <span class="kw">do</span>
<span class="fu">print</span> <span class="fu">$</span> <span class="fu">sum</span> list</code></pre>
<p>Is translated into:</p>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">Data.Maybe</span>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> Data.Maybe
<span class="ot">maybeRead ::</span> <span class="kw">Read</span> a <span class="ot">=&gt;</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">Maybe</span> a
maybeRead s <span class="fu">=</span> <span class="kw">case</span> <span class="fu">reads</span> s <span class="kw">of</span>
@ -1979,7 +1971,7 @@ The list monad
<p><img src="../../../../Scratch/img/blog/Haskell-the-Hard-Way/golconde.jpg" alt="Golconde de Magritte" /></p>
<p>The list monad helps us to simulate non deterministic computations. Here we go:</p>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">Control.Monad</span> (guard)
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> Control.Monad (guard)
allCases <span class="fu">=</span> [<span class="dv">1</span><span class="fu">..</span><span class="dv">10</span>]
@ -2035,7 +2027,7 @@ More on Infinite Tree
<p>This code is mostly the same as the one in the <a href="#trees">tree section</a>.</p>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">Data.List</span>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> Data.List
<span class="kw">data</span> <span class="dt">BinTree</span> a <span class="fu">=</span> <span class="dt">Empty</span>
<span class="fu">|</span> <span class="dt">Node</span> a (<span class="dt">BinTree</span> a) (<span class="dt">BinTree</span> a)
<span class="kw">deriving</span> (<span class="kw">Eq</span>,<span class="kw">Ord</span>)
@ -2096,8 +2088,8 @@ treeFromList (x<span class="fu">:</span>xs) <span class="fu">=</span> <span clas
<pre class="sourceCode haskell"><code class="sourceCode haskell">treeTakeDepth _ <span class="dt">Empty</span> <span class="fu">=</span> <span class="dt">Empty</span>
treeTakeDepth <span class="dv">0</span> _ <span class="fu">=</span> <span class="dt">Empty</span>
treeTakeDepth n (<span class="dt">Node</span> x left right) <span class="fu">=</span> <span class="kw">let</span>
nl <span class="fu">=</span> treeTakeDepth (n<span class="dv">-1</span>) left
nr <span class="fu">=</span> treeTakeDepth (n<span class="dv">-1</span>) right
nl <span class="fu">=</span> treeTakeDepth (n<span class="fu">-</span><span class="dv">1</span>) left
nr <span class="fu">=</span> treeTakeDepth (n<span class="fu">-</span><span class="dv">1</span>) right
<span class="kw">in</span>
<span class="dt">Node</span> x nl nr</code></pre>
</div>
@ -2147,8 +2139,8 @@ treeTakeDepth 4 (treeFromList shuffle)
<p>This code is mostly the same as the preceding one.</p>
<div class="codehighlight">
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">Debug.Trace</span> (trace)
<span class="kw">import</span> <span class="dt">Data.List</span>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> Debug.Trace (trace)
<span class="kw">import</span> Data.List
<span class="kw">data</span> <span class="dt">BinTree</span> a <span class="fu">=</span> <span class="dt">Empty</span>
<span class="fu">|</span> <span class="dt">Node</span> a (<span class="dt">BinTree</span> a) (<span class="dt">BinTree</span> a)
<span class="kw">deriving</span> (<span class="kw">Eq</span>,<span class="kw">Ord</span>)</code></pre>
@ -2195,8 +2187,8 @@ treeTakeDepth 4 (treeFromList shuffle)
treeTakeDepth _ <span class="dt">Empty</span> <span class="fu">=</span> <span class="dt">Empty</span>
treeTakeDepth <span class="dv">0</span> _ <span class="fu">=</span> <span class="dt">Empty</span>
treeTakeDepth n (<span class="dt">Node</span> x left right) <span class="fu">=</span> <span class="kw">let</span>
nl <span class="fu">=</span> treeTakeDepth (n<span class="dv">-1</span>) left
nr <span class="fu">=</span> treeTakeDepth (n<span class="dv">-1</span>) right
nl <span class="fu">=</span> treeTakeDepth (n<span class="fu">-</span><span class="dv">1</span>) left
nr <span class="fu">=</span> treeTakeDepth (n<span class="fu">-</span><span class="dv">1</span>) right
<span class="kw">in</span>
<span class="dt">Node</span> x nl nr</code></pre>
</div>
@ -2240,7 +2232,7 @@ safefilter f l <span class="fu">=</span> safefilter' f l nbTry
safefilter' f (x<span class="fu">:</span>xs) n <span class="fu">=</span>
<span class="kw">if</span> f x
<span class="kw">then</span> x <span class="fu">:</span> safefilter' f xs nbTry
<span class="kw">else</span> safefilter' f xs (n<span class="dv">-1</span>) </code></pre>
<span class="kw">else</span> safefilter' f xs (n<span class="fu">-</span><span class="dv">1</span>) </code></pre>
</div>
<p>Now run the program and be happy:</p>
<div class="codehighlight">
@ -2291,25 +2283,26 @@ treeFromList' (x<span class="fu">:</span>xs) n <span class="fu">=</span> <span c
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/Haskell-the-Hard-Way" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -2327,6 +2320,7 @@ treeFromList' (x<span class="fu">:</span>xs) n <span class="fu">=</span> <span c
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2012-02-08

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Higher order function in zsh</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/Higher-order-function-in-zsh/main.jpg" alt="Title image" /></p>
<div class="intro">
@ -107,11 +99,11 @@ done</code></pre>
<li>The <code>:t</code> means tail; if <code>toto=/path/to/file.ext</code> then <code>${toto:t}=file.ext</code>.</li>
</ul>
<p>After ⇒</p>
<pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">gif_to_png()</span> <span class="kw">{</span> convert <span class="ot">$1</span> <span class="ot">${1:r}</span>.png <span class="kw">&amp;&amp;</span> \<span class="kw">rm</span> -f <span class="ot">$1</span> <span class="kw">}</span>
<pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">gif_to_png()</span> <span class="kw">{</span> <span class="kw">convert</span> <span class="ot">$1</span> <span class="ot">${1:r}</span>.png <span class="kw">&amp;&amp;</span> \<span class="kw">rm</span> -f <span class="ot">$1</span> <span class="kw">}</span>
<span class="fu">handle_resources()</span> <span class="kw">{</span> map gif_to_png <span class="ot">$1</span>/resources/*.gif<span class="kw">(</span>.N<span class="kw">)</span> <span class="kw">}</span>
<span class="fu">handle_resources()</span> <span class="kw">{</span> <span class="kw">map</span> gif_to_png <span class="ot">$1</span>/resources/*.gif(.N) <span class="kw">}</span>
map handle_resources /path/to/projects/*<span class="kw">(</span>/N<span class="kw">)</span></code></pre>
<span class="kw">map</span> handle_resources /path/to/projects/*(/N)</code></pre>
<p>No more bloc! It might be a little bit harder to read if youre not used to functional programming notation. But it is more concise and robusts.</p>
<p>Another example with some tests.</p>
<p>Find all files in project not containing an <code>s</code> which their name contains their project name:</p>
@ -205,25 +197,26 @@ function filter {
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/Higher-order-function-in-zsh/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/Higher-order-function-in-zsh" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/Higher-order-function-in-zsh" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -241,6 +234,7 @@ function filter {
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2011-09-28

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Learn Vim Progressively</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/Learn-Vim-Progressively/uber_leet_use_vim.jpg" alt="Über leet use vim!" /></p>
<div class="intro">
@ -311,25 +303,26 @@ $(document).ready(function() {
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/Learn-Vim-Progressively" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -347,6 +340,7 @@ $(document).ready(function() {
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2011-08-25

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>A try to demystify 'Lost Highway'</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/Lost_Highway_Demistified/intro.jpg" alt="Lost Highway" /></p>
<div class="small">
@ -158,25 +150,26 @@ kind: article menupriority: 4 published: 2009-08-04 title: A try to demystify
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/Lost_Highway_Demistified/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/Lost_Highway_Demistified" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/Lost_Highway_Demistified" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -194,6 +187,7 @@ kind: article menupriority: 4 published: 2009-08-04 title: A try to demystify
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-08-04

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>40 character's passwords</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/Password-Management/main.png" alt="Title image" /></p>
<div class="intro">
@ -114,25 +106,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/Password-Management/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/Password-Management" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/Password-Management" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -150,6 +143,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2011-05-18

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Increase the power of deficient languages.</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/SVG-and-m4-fractals/main.png" alt="Yesod logo made in SVG and m4" /></p>
<div class="intro">
@ -182,25 +174,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/SVG-and-m4-fractals/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/SVG-and-m4-fractals" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/SVG-and-m4-fractals" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -218,6 +211,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2011-10-20

View file

@ -0,0 +1,284 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>YBlog - Social link the right way</title>
<meta name="keywords" content="programming">
<link rel="shortcut icon" type="image/x-icon" href="../../../../Scratch/img/favicon.ico" />
<link rel="stylesheet" type="text/css" href="../../../../Scratch/css/scientific.css" />
<link rel="stylesheet" type="text/css" href="../../../../Scratch/css/solarized.css" />
<!-- Font -->
<link href="http://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Droid+Sans:400,700" rel="stylesheet" type="text/css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="http://feeds.feedburner.com/yannespositocomen" />
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
</head>
<body lang="en">
<script type="text/javascript">//
document.write('<div id="blackpage"><div>Soon<img src="/Scratch/img/loading.gif" alt="Loading"></img></div></div>');
//
</script>
<div id="content">
<div id="header">
<div id="choix">
<div id="choixlang">
<a href="../../../../Scratch/fr/blog/Social-link-the-right-way" onclick="setLanguage('fr')">
Français </a>
</div>
<script type="text/javascript">//
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
</div>
<div id="titre">
<h1>Social link the right way</h1>
</div>
<div class="flush"></div>
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/Social-link-the-right-way/main.png" alt="Main image" /></p>
<div class="intro">
<p><span class="sc"><abbr title="Too long; didn't read">tl;dr</abbr>: </span> Default share buttons track your user, arent uniform with your design, use computer ressources and slow down your web page loading.</p>
<p>Do it right. Use static links instead.</p>
<p>If you dont want to read, just copy/paste this in your <span class="sc">html</span>:</p>
<pre class="js"><code>&lt;script&gt;
var url=document.location;
document.write(
'&lt;'+'a href=&quot;https://twitter.com/home?status='+url+'&quot; '
+'target=&quot;_blank&quot;&gt;Tweet this&lt;'+'/a&gt; - '
+ '&lt;'+'a href=&quot;http://www.facebook.com/sharer/sharer.php?u='+url+'&quot; '
+'target=&quot;_blank&quot;&gt;Like this&lt;'+'/a&gt; - '
+ '&lt;'+'a href=&quot;https://plus.google.com/share?url='+url+'&quot; '
+'target=&quot;_blank&quot;&gt;Share on G+&lt;'+'/a&gt;');
&lt;/script&gt;</code></pre>
</div>
<h2 id="the-problem">The problem</h2>
<p>Ever been on a website and want to tweet about it? Fortunately, the website might have a button to help you. But do you really know what this button do?</p>
<p>The “Like”, “Tweet” and “+1” buttons will call a javascript. It will get access to your cookies. It helps the provider of the button to know who you are.</p>
<p>In plain English, the “+1” button will inform Google you are visiting the website, <strong>even if you dont click on “+1”</strong>. The same is true for the “like” button for facebook and the “tweet this” button for twitter.</p>
<p>The problem is not only a privacy issue. In fact (sadly <span class="sc"><abbr title="In my Humble Opinion">imho</abbr></span>) this isnt an issue for most people. These button consume computer ressources. Far more than a simple link. It thus slow down a bit the computer and consume energy. These button could also slow down the rendering of your web page.</p>
<p>Another aspect is their design. Their look and feel is mostly imposed by the provider.</p>
<p>The most problematic aspect in my opinion is to use a third party js on your website. What if tomorrow twitter update their tweet button? If the upgrade broke something for only a minority of people, they wont fix it. This could occur anytime without any notification. They just have to add a <code>document.write</code> in their <code>js</code> you call asynchronously and BAM! Your website is just an empty blank page. And as you call many external ressources, it can be very difficult to find the origin of the problem.</p>
<p><strong>Using social network buttons:</strong></p>
<ul>
<li>Pros:
<ul>
<li>help user share your website,</li>
<li>can provide a popularity indicator to your users.</li>
</ul></li>
<li>Cons:
<ul>
<li>you help tracking your users,</li>
<li>generally doesnt follow the design of your website,</li>
<li>use more computer ressources,</li>
<li>slow down your website,</li>
<li>executing third party js can break things silently.</li>
</ul></li>
</ul>
<h2 id="solutions">Solutions</h2>
<p>I will provide you two solutions with the following properties:</p>
<ul>
<li>Pros:
<ul>
<li>help user share your website,</li>
<li>doesnt follow your user,</li>
<li>use almost no computer ressource,</li>
<li>doesnt slow down your website,</li>
<li>doesnt execute any third party js on your website.</li>
</ul></li>
<li>Cons:
<ul>
<li>doesnt provide any popularity information.</li>
</ul></li>
</ul>
<p><strong>Solution 1 (no js):</strong></p>
<pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;a</span><span class="ot"> href=</span><span class="st">&quot;https://twitter.com/home?status=$url$&quot;</span>
<span class="ot"> target=</span><span class="st">&quot;_blank&quot;</span><span class="kw">&gt;</span>Tweet this<span class="kw">&lt;/a&gt;</span>
<span class="kw">&lt;a</span><span class="ot"> href=</span><span class="st">&quot;http://www.facebook.com/sharer/sharer.php?u=$url$&quot;</span>
<span class="ot"> target=</span><span class="st">&quot;_blank&quot;</span><span class="kw">&gt;</span>Like this<span class="kw">&lt;/a&gt;</span>
<span class="kw">&lt;a</span><span class="ot"> href=</span><span class="st">&quot;https://plus.google.com/share?url=$url$&quot;</span>
<span class="ot"> target=</span><span class="st">&quot;_blank&quot;</span><span class="kw">&gt;</span>Share on G+<span class="kw">&lt;/a&gt;</span></code></pre>
<p>But you have to replace <code>$url$</code> by the current <span class="sc"><abbr title="Uniform Ressource Locator">url</abbr></span>.</p>
<p><strong>Solution 2 (Just copy/paste):</strong></p>
<p>If you dont want to write the <span class="sc"><abbr title="Uniform Ressource Locator">url</abbr></span> yourself, you could use some minimal js:</p>
<pre class="js"><code>&lt;script&gt;
var url=document.location;
document.write(
'&lt;'+'a href=&quot;https://twitter.com/home?status='+url+'&quot; '
+'target=&quot;_blank&quot;&gt;Tweet this&lt;'+'/a&gt; - '
+ '&lt;'+'a href=&quot;http://www.facebook.com/sharer/sharer.php?u='+url+'&quot; '
+'target=&quot;_blank&quot;&gt;Like this&lt;'+'/a&gt; - '
+ '&lt;'+'a href=&quot;https://plus.google.com/share?url='+url+'&quot; '
+'target=&quot;_blank&quot;&gt;Share on G+&lt;'+'/a&gt;');
&lt;/script&gt;</code></pre>
<p>Here is the result:</p>
<div style="text-align:center" class="nostar">
<script>
var url=document.location;
document.write(
'<'+'a href="https://twitter.com/home?status='+url+'" '
+'target="_blank">Tweet this<'+'/a> - '
+ '<'+'a href="http://www.facebook.com/sharer/sharer.php?u='+url+'" '
+'target="_blank">Like this<'+'/a> - '
+ '<'+'a href="https://plus.google.com/share?url='+url+'" '
+'target="_blank">Share on G+<'+'/a>');
</script>
</div>
<h2 id="good-looking-solutions">Good looking solutions</h2>
<p>If you dont want just text but nice icons. You have many choices:</p>
<ul>
<li>Use images <code>&lt;img src=&quot;...&quot;/&gt;</code> in the links.</li>
<li>Use icon fonts</li>
</ul>
<p>As the first solution is pretty straightforward, Ill explain the second one.</p>
<ol style="list-style-type: decimal">
<li>Download the icon font <a href="http://blog.martianwabbit.com/post/4344642365.html">here</a></li>
<li>put the font file(s) at some place (here fonts/social_font.ttf relatively to your <span class="sc">css</span> file)</li>
<li>Add this to your <span class="sc">css</span></li>
</ol>
<pre class="sourceCode css"><code class="sourceCode css"><span class="dv">@font-face</span>
font-family<span class="dv">:</span> <span class="st">'social'</span>
src<span class="dv">:</span> url(<span class="st">'fonts/social_font.ttf'</span>) format(<span class="st">'truetype'</span>)
font-weight<span class="dv">:</span> normal
font-style<span class="dv">:</span> normal
<span class="fl">.social</span>
font-family<span class="dv">:</span> social</code></pre>
<p>Now add this to your <span class="sc">html</span>:</p>
<p><strong>Solution 1 (without js):</strong></p>
<pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;a</span><span class="ot"> href=</span><span class="st">&quot;https://twitter.com/home?status=$url$&quot;</span>
<span class="ot"> target=</span><span class="st">&quot;_blank&quot;</span>
<span class="ot"> class=</span><span class="st">&quot;social&quot;</span><span class="kw">&gt;</span><span class="dv">&amp;#116;</span><span class="kw">&lt;/a&gt;</span>
·
<span class="kw">&lt;a</span><span class="ot"> href=</span><span class="st">&quot;http://www.facebook.com/sharer/sharer.php?u=$url$&quot;</span>
<span class="ot"> target=</span><span class="st">&quot;_blank&quot;</span>
<span class="ot"> class=</span><span class="st">&quot;social&quot;</span><span class="kw">&gt;</span><span class="dv">&amp;#0096;</span><span class="kw">&lt;/a&gt;</span>
·
<span class="kw">&lt;a</span><span class="ot"> href=</span><span class="st">&quot;https://plus.google.com/share?url=$url$&quot;</span>
<span class="ot"> target=</span><span class="st">&quot;_blank&quot;</span>
<span class="ot"> class=</span><span class="st">&quot;social&quot;</span><span class="kw">&gt;</span><span class="dv">&amp;#0103;</span><span class="kw">&lt;/a&gt;</span></code></pre>
<p><strong>Solution 2 (just copy/paste):</strong></p>
<pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;script&gt;</span>
<span class="kw">var</span> url=<span class="ot">document</span>.<span class="fu">location</span>;
<span class="er">document.write(</span>
<span class="st">'&lt;a href=&quot;https://twitter.com/home?status='</span>+url+<span class="st">'&quot;'</span>
+ <span class="st">' target=&quot;_blank&quot;'</span>
+ <span class="st">' class=&quot;social&quot;&gt;&amp;#116;&lt;'</span>+<span class="st">'/a&gt;'</span>
+ <span class="st">' · '</span>
+ <span class="st">'&lt;'</span> + <span class="st">'a href=&quot;http://www.facebook.com/sharer/sharer.php?u='</span>+url+<span class="st">'&quot;'</span>
+ <span class="st">' target=&quot;_blank&quot;'</span>
+ <span class="st">' class=&quot;social&quot;&gt;&amp;#0096;&lt;'</span>+<span class="st">'/a&gt;'</span>
+ <span class="st">' · '</span>
+ <span class="st">'&lt;a href=&quot;https://plus.google.com/share?url='</span>+url+<span class="st">'&quot;'</span>
+ <span class="st">' target=&quot;_blank&quot;'</span>
+ <span class="st">' class=&quot;social&quot;&gt;&amp;#0103;&lt;'</span>+<span class="st">'/a&gt;'</span>);
<span class="kw">&lt;/script&gt;</span></code></pre>
<p>Here is the result:</p>
<div style="font-size: 2em; text-align: center;" class="nostar">
<script>
document.write(
'<a href="https://twitter.com/home?status='+url+'" ' + ' target="_blank" ' + ' class="social">t<'+'/a>'
+ ' · '
+ '<' + 'a href="http://www.facebook.com/sharer/sharer.php?u='+url+'"'
+ ' target="_blank"'
+ ' class="social">`<'+'/a>'
+ ' · '
+ '<a href="https://plus.google.com/share?url='+url+'" ' + ' target="_blank" ' + ' class="social">g<'+'/a>');
</script>
</div>
<h2 id="conclusion">Conclusion</h2>
<ol style="list-style-type: decimal">
<li>You get your design back,</li>
<li>You stop to help tracking people,</li>
<li>You use less computer ressources and more generally power ressources which is good for the planet,</li>
<li>Your web pages will load faster.</li>
</ol>
<p><em>ps</em>: On my personal website I continue to use Google analytics. Therefore, Google (and only Google, not facebook nor twitter) can track you here. But I might change this in the future.</p>
</div>
<div id="social">
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/Social-link-the-right-way/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/Social-link-the-right-way" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/Social-link-the-right-way" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'yannesposito'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2013-03-14
</div>
<div>
<a href="https://twitter.com/yogsototh">Follow @yogsototh</a>
</div>
<div>
Yann Esposito©
</div>
<div>
Done with
<a href="http://www.vim.org">Vim</a>
<span class="nicer">&amp;</span>
<a href="http://jaspervdj.be/hakyll">Hakyll</a>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript" src="../../../../Scratch/js/jquery-1.3.1.min.js"></script>
<script type="text/javascript" src="../../../../Scratch/js/jquery.cookie.js"></script>
<script type="text/javascript" src="../../../../Scratch/js/index.js"></script>
<script type="text/javascript" src="../../../../Scratch/js/highlight/highlight.pack.js"></script>
<script type="text/javascript" src="../../../../Scratch/js/article.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</html>

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Typography and the Web</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/Typography-and-the-Web/first_sc_screenshot.png" alt /></p>
<div class="intro">
@ -107,25 +99,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/Typography-and-the-Web/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/Typography-and-the-Web" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/Typography-and-the-Web" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -143,6 +136,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2012-02-02

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Yesod excellent ideas</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/Yesod-excellent-ideas/main.png" alt="Title image" /></p>
<div class="intro">
@ -65,7 +57,7 @@
<img src="http://imgs.xkcd.com/comics/exploits_of_a_mom.png" alt="SQL injection by a mom" /><p class="caption">SQL injection by a mom</p>
</div>
<p>When you create a web application, a lot of time is spent dealing with strings. Strings for URL, HTML, JavaScript, CSS, SQL, etc… To prevent malicious usage you have to protect each strings to be sure, no script will pass from one point to another. Suppose a user enter this user name:</p>
<pre class="sourceCode javascript"><code class="sourceCode javascript">Newton&lt;script&gt;alert(<span class="st">&quot;An apple fall&quot;</span>)&lt;/script&gt;</code></pre>
<pre class="sourceCode javascript"><code class="sourceCode javascript">Newton&lt;script&gt;<span class="fu">alert</span>(<span class="st">&quot;An apple fall&quot;</span>)&lt;<span class="ot">/script&gt;</span></code></pre>
<p>You must transform each <code>&lt;</code> into <code>&amp;lt;</code>. Without this transformation alert will appear each time you try to display this user name. Safe types associate with each string what kind of string it is. Is it a string for URL? For javascript? For HTML? And the right protection is made by default to prevent problems.</p>
<p>Yesod does its best to handle cross scripting issues. Both between the client and the server and between the server and your DB. Here is an example:</p>
<p><code class="html"><a href="@[AnotherPageR]">Go to the other page ~~~~~~</p>
@ -127,25 +119,26 @@ toWidget hamletFile <span class="st">&quot;buttonTemplate.hamlet&quot;</sp
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/Yesod-excellent-ideas/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/Yesod-excellent-ideas" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/Yesod-excellent-ideas" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -163,6 +156,7 @@ toWidget hamletFile <span class="st">&quot;buttonTemplate.hamlet&quot;</sp
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2011-10-04

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Haskell web programming</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/Yesod-tutorial-for-newbies/flying_neo.jpg" alt="Neo Flying at warp speed" /></p>
<div class="intro">
@ -143,7 +135,7 @@ static/tmp
<li><code>config/models</code></li>
</ol>
<p>Obviously:</p>
<p><code>config/routes</code> | is where youll configure the map %url → Code. |<br /><code>Handler/</code> | contains the files that will contain the code called when a %url is accessed. |<br /><code>templates/</code> | contains <span class="sc">html</span>, js and <span class="sc">css</span> templates. |<br /><code>config/models</code> | is where youll configure the persistent objects (database tables). |</p>
<p><code>config/routes</code> | is where youll configure the map <span class="sc"><abbr title="Uniform Ressource Locator">url</abbr></span> → Code. |<br /><code>Handler/</code> | contains the files that will contain the code called when a <span class="sc"><abbr title="Uniform Ressource Locator">url</abbr></span> is accessed. |<br /><code>templates/</code> | contains <span class="sc">html</span>, js and <span class="sc">css</span> templates. |<br /><code>config/models</code> | is where youll configure the persistent objects (database tables). |</p>
<p>During this tutorial well modify other files as well, but we wont explore them in detail.</p>
<p>Also note, shell commands are executed in the root directory of your project instead specified otherwise.</p>
<p>We are now ready to start!</p>
@ -153,7 +145,7 @@ static/tmp
<p>Goal:</p>
<p>Make a server that when accessed <code>/echo/[some text]</code> should return a web page containing “some text” inside an <code>h1</code> bloc.</p>
</blockquote>
<p>In a first time, we must declare the %url of the form <code>/echo/...</code> are meaningful. Lets take a look at the file <code>config/routes</code>:</p>
<p>In a first time, we must declare the <span class="sc"><abbr title="Uniform Ressource Locator">url</abbr></span> of the form <code>/echo/...</code> are meaningful. Lets take a look at the file <code>config/routes</code>:</p>
<pre>
/static StaticR Static getStatic
/auth AuthR Auth getAuth
@ -169,7 +161,7 @@ static/tmp
/echo/#String EchoR GET
</pre>
<p>This line contains three elements: the %url pattern, a handler name, an %http method. I am not particularly fan of the big R notation but this is the standard convention.</p>
<p>This line contains three elements: the <span class="sc"><abbr title="Uniform Ressource Locator">url</abbr></span> pattern, a handler name, an %http method. I am not particularly fan of the big R notation but this is the standard convention.</p>
<p>If you save <code>config/routes</code>, you should see your terminal in which you launched <code>yesod devel</code> activate and certainly displaying an error message.</p>
<pre>
Application.hs:31:1: Not in scope: `getEchoR'
@ -186,12 +178,12 @@ getEchoR theText <span class="fu">=</span> <span class="kw">do</span>
<p>TADA! It works!</p>
<h3 id="bulletproof">Bulletproof?</h3>
<p><img src="../../../../Scratch/img/blog/Yesod-tutorial-for-newbies/neo_bullet_proof.jpg" alt="Neo stops a myriad of bullets" /></p>
<p>Even this extremely minimal web application has some impressive properties. For exemple, imagine an attacker entering this %url:</p>
<p>Even this extremely minimal web application has some impressive properties. For exemple, imagine an attacker entering this <span class="sc"><abbr title="Uniform Ressource Locator">url</abbr></span>:</p>
[<code>http://localhost:3000/echo/&lt;a&gt;I'm &lt;script&gt;alert(&quot;Bad!&quot;);</code>](http://localhost:3000/echo/<a>Im
<script>alert("Bad!");)<% "</script>
<p>&quot; %&gt;</p>
<p>The special characters are protected for us. A malicious user could not hide some bad script inside.</p>
<p>This behavior is a direct consequence of <em>type safety</em>. The %url string is put inside a %url type. Then the interesting part in the %url is put inside a String type. To pass from %url type to String type some transformation are made. For example, replace all “<code>%20</code>” by space characters. Then to show the String inside an <span class="sc">html</span> document, the string is put inside an <span class="sc">html</span> type. Some transformations occurs like replace “<code>&lt;</code>” by “<code>&amp;lt;</code>”. Thanks to yesod, this tedious job is done for us.</p>
<p>This behavior is a direct consequence of <em>type safety</em>. The <span class="sc"><abbr title="Uniform Ressource Locator">url</abbr></span> string is put inside a <span class="sc"><abbr title="Uniform Ressource Locator">url</abbr></span> type. Then the interesting part in the <span class="sc"><abbr title="Uniform Ressource Locator">url</abbr></span> is put inside a String type. To pass from <span class="sc"><abbr title="Uniform Ressource Locator">url</abbr></span> type to String type some transformation are made. For example, replace all “<code>%20</code>” by space characters. Then to show the String inside an <span class="sc">html</span> document, the string is put inside an <span class="sc">html</span> type. Some transformations occurs like replace “<code>&lt;</code>” by “<code>&amp;lt;</code>”. Thanks to yesod, this tedious job is done for us.</p>
<pre class="zsh"><code>&quot;http://localhost:3000/echo/some%20text&lt;a&gt;&quot; :: URL
&quot;some text&lt;a&gt;&quot; :: String
@ -236,7 +228,7 @@ a<span class="dv">:visited</span> <span class="kw">{</span> <span class="kw">col
<p>Generally you dont want to have all your code inside a unique file. This is why we will separate our handlers. In a first time create a new file <code>Handler/Echo.hs</code> containing:</p>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">module</span> <span class="dt">Handler.Echo</span> <span class="kw">where</span>
<span class="kw">import</span> <span class="dt">Import</span>
<span class="kw">import</span> Import
<span class="ot">getEchoR ::</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">Handler</span> <span class="dt">RepHtml</span>
getEchoR theText <span class="fu">=</span> <span class="kw">do</span>
@ -249,7 +241,7 @@ getEchoR theText <span class="fu">=</span> <span class="kw">do</span>
</pre>
<p>We must also declare this new Handler module inside <code>Application.hs</code>. Just after the “<code>import Handler.Home</code>”, add:</p>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> <span class="dt">Handler.Echo</span></code></pre>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">import</span> Handler.Echo</code></pre>
<p>This is it.</p>
<p><small><em>ps:</em> I am sure not so far in the future we could simply write <code>yesod add-handler Echo</code> to declare it and create a new handler file.</small></p>
<h4 id="data.text"><code>Data.Text</code></h4>
@ -264,7 +256,7 @@ getEchoR theText <span class="fu">=</span> <span class="kw">do</span>
<p>And do the same in <code>Handler/Echo.hs</code>:</p>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">module</span> <span class="dt">Handler.Echo</span> <span class="kw">where</span>
<span class="kw">import</span> <span class="dt">Import</span>
<span class="kw">import</span> Import
<span class="ot">getEchoR ::</span> <span class="dt">Text</span> <span class="ot">-&gt;</span> <span class="dt">Handler</span> <span class="dt">RepHtml</span>
getEchoR theText <span class="fu">=</span> <span class="kw">do</span>
@ -290,8 +282,8 @@ getEchoR theText <span class="fu">=</span> <span class="kw">do</span>
<p>This time the path <code>/mirror</code> will accept GET and POST requests. Add the corresponding new Handler file:</p>
<pre class="sourceCode haskell"><code class="sourceCode haskell"><span class="kw">module</span> <span class="dt">Handler.Mirror</span> <span class="kw">where</span>
<span class="kw">import</span> <span class="dt">Import</span>
<span class="kw">import</span> <span class="kw">qualified</span> <span class="dt">Data.Text</span> <span class="kw">as</span> <span class="dt">T</span>
<span class="kw">import</span> Import
<span class="kw">import</span> <span class="kw">qualified</span> Data.Text <span class="kw">as</span> T
<span class="ot">getMirrorR ::</span> <span class="dt">Handler</span> <span class="dt">RepHtml</span>
getMirrorR <span class="fu">=</span> <span class="kw">do</span>
@ -349,11 +341,11 @@ Article
)
<span class="kw">where</span>
<span class="kw">import</span> <span class="dt">Import</span>
<span class="kw">import</span> <span class="dt">Data.Monoid</span>
<span class="kw">import</span> Import
<span class="kw">import</span> Data.Monoid
<span class="co">-- to use Html into forms</span>
<span class="kw">import</span> <span class="dt">Yesod.Form.Nic</span> (<span class="dt">YesodNic</span>, nicHtmlField)
<span class="kw">import</span> Yesod.Form.Nic (YesodNic, nicHtmlField)
<span class="kw">instance</span> <span class="dt">YesodNic</span> <span class="dt">App</span></code></pre>
<p><small>Remark: it is a best practice to add the YesodNic instance inside <code>Foundation.hs</code>. I put this definition here to make things easier but you should see a warning about this orphan instance. To put the include inside Foundation.hs is left as an exercice to the reader.</small></p>
<p><small><em>Hint: Do not forget to put <code>YesodNic</code> and <code>nicHtmlField</code> inside the exported objects of the module.</em> </small></p>
@ -428,7 +420,7 @@ getArticleR articleId <span class="fu">=</span> <span class="kw">do</span>
<pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;p&gt;</span>A last try to <span class="kw">&lt;em&gt;</span>cross script<span class="kw">&lt;/em&gt;</span>
and <span class="kw">&lt;em&gt;</span>SQL injection<span class="kw">&lt;/em&gt;&lt;/p&gt;</span>
<span class="kw">&lt;p&gt;</span>Here is the first try:
<span class="kw">&lt;script&gt;</span>alert(<span class="st">&quot;You loose&quot;</span>);<span class="kw">&lt;/script&gt;&lt;/p&gt;</span>
<span class="er"> &lt;script&gt;alert(&quot;You loose&quot;);&lt;/script&gt;&lt;/p&gt;</span>
<span class="kw">&lt;p&gt;</span> And Here is the last <span class="kw">&lt;/p&gt;</span>
&quot;); DROP TABLE ARTICLE;;</code></pre>
<h2 id="conclusion">Conclusion</h2>
@ -458,25 +450,26 @@ getArticleR articleId <span class="fu">=</span> <span class="kw">do</span>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/Yesod-tutorial-for-newbies/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/Yesod-tutorial-for-newbies" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/Yesod-tutorial-for-newbies" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -494,6 +487,7 @@ getArticleR articleId <span class="fu">=</span> <span class="kw">do</span>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2012-01-15

File diff suppressed because it is too large Load diff

View file

@ -103,6 +103,9 @@ Learn Haskell Fast and Hard <span class="nicer">»</span>
<ul>
<li>
<a href="../../../Scratch/en/blog/Social-link-the-right-way"><span class="small">2013-03-14</span> <div class="inlineblockimg"><img src="../../../Scratch/img/blog/Social link the right way/main.png" alt="Social link the right way" class="inlineimage" /></div> Social link the right way</a>
</li>
<li>
<a href="../../../Scratch/en/blog/Category-Theory-Presentation"><span class="small">2012-12-12</span> <div class="inlineblockimg"><img src="http://yogsototh.github.com/Category-Theory-Presentation/categories/img/mp/cat-hask-endofunctor.png" alt="Category Theory Presentation" class="inlineimage" /></div> Category Theory Presentation</a>
</li>
<li>

View file

@ -32,16 +32,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -49,7 +41,7 @@
<h1>MVC explained</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="why-this-article-and-for-whom">Why This article and for whom?</h1>
<p>Many website explaining how MVC works. But I cant found one who explain why.</p>
@ -69,25 +61,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/mvc/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/mvc" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/mvc" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -105,6 +98,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-07-06

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Change Theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Programming Language Experience</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/programming-language-experience/dragon.jpg" alt="Title image" /></p>
<div class="intro">
@ -209,25 +201,26 @@ X=whatever[C,D]</code></pre>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomen">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomen" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/en/blog/programming-language-experience/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/en/blog/programming-language-experience" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/en/blog/programming-language-experience" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/en/blog/Social-link-the-right-way/">These social sharing links preserve your privacy</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/en/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -245,6 +238,7 @@ X=whatever[C,D]</code></pre>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2011-09-28

View file

@ -60,7 +60,7 @@
</blockquote>
<ul>
<li><a href="http://ypassword.espozito.com">Le site officiel de YPassword</a></li>
<li><a href="http://yann.esposito.free.fr/recherche.php?css=blue&amp;amp;lang=fr">Mes activités de recherches.</a></li>
<li><a href="http://yann.esposito.free.fr/recherche.php?css=blue&amp;lang=fr">Mes activités de recherches.</a></li>
<li><a href="http://yann.esposito.free.fr/">Mon site personnel lorsque jétais étudiant. ✞ 2007</a></li>
</ul>
</div>

View file

@ -32,7 +32,34 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
</div>
<div id="titre">
<h1>nanoc</h1>
</div>
<div class="flush"></div>
<div id="afterheader" class="article">
<div class="corps">
<h1 id="quest-ce-que-nanoc">Quest-ce que nanoc ?</h1>
<p>Il ne sagit pas exactement dun <abbr title="Content Management System">CMS</abbr>, mais plutôt dun <em>système</em> de gestion de pages statiques.</p>
<p>Il faut programmer sois-même les pages web, le code pour engendrer les menus…</p>
<p>Jai programmé des filtres pour rendre ce site multilangue par exemple</p>
<p>Vous pourrez trouver beaucoup dinformations sur le <a href="http://nanoc.stoneship.org">site officiel de nanoc</a>.</p>
</div>
<div id="social">
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/01_nanoc/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/01_nanoc" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/01_nanoc" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
@ -43,41 +70,7 @@
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
<div id="titre">
<h1>nanoc</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<h1 id="quest-ce-que-nanoc">Quest-ce que nanoc ?</h1>
<p>Il ne sagit pas exactement dun <abbr title="Content Management System">CMS</abbr>, mais plutôt dun <em>système</em> de gestion de pages statiques.</p>
<p>Il faut programmer sois-même les pages web, le code pour engendrer les menus…</p>
<p>Jai programmé des filtres pour rendre ce site multilangue par exemple</p>
<p>Vous pourrez trouver beaucoup dinformations sur le <a href="http://nanoc.stoneship.org">site officiel de nanoc</a>.</p>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -95,6 +88,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2008-10-10

View file

@ -32,16 +32,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -49,7 +41,7 @@
<h1>Mieux que grep</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="mise-à-jour">Mise à jour</h1>
<p>Comme <a href="http://www.theworkinggeek.com">Andy Lester</a> me la fait remarqué. <a href="http://betterthangrep.com"><code>ack</code></a> est un simple fichier perl quil suffit de copier dans son répertoire personnel <code>~/bin</code>. Maintenant jai <code>ack</code> sur mon serveur professionnel.</p>
@ -74,25 +66,26 @@ listeFic=( <em><em>/</em>(.) ) autoload zargs zargs $listeFic grep $1 |
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/02_ackgrep/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/02_ackgrep" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/02_ackgrep" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -110,6 +103,7 @@ listeFic=( <em><em>/</em>(.) ) autoload zargs zargs $listeFic grep $1 |
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-07-22

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Lost Highway démystifié (un peu)</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/03_losthighway/intro.jpg" alt="Lost Highway" /></p>
<div class="intro">
@ -133,25 +125,26 @@ Lost Highway ne laisse pas indiférent. Le revoir ne lasse pas même sil parr
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/03_losthighway/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/03_losthighway" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/03_losthighway" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -169,6 +162,7 @@ Lost Highway ne laisse pas indiférent. Le revoir ne lasse pas même sil parr
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-08-04

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Les protections anti-copies sont LE MAL</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="protections-anti-copie-belle-connerie-1">Protections anti-copie = Belle connerie (+1)!</h1>
<p>Ma femme a acheté pour environ 500€ (au moins) de séries télé sur iTunes. Mais elles sest trompé pour la première saison de Battlestar Galactica. Quelle a téléchargé en anglais. Hors comme les séries sont protégées, on ne peut simplement pas voir la série avec des sous-titres !</p>
@ -70,25 +62,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/04_drm/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/04_drm" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/04_drm" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -106,6 +99,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-08-15

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Création de branches externe avec Git</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h2 id="créer-une-branche-git-externe-facilement">Créer une branche Git externe facilement</h2>
<p>Jutilise Git pour synchroniser des projets personnels. Cest pourquoi quand je crée une branche locale je souhaite quasiment toujours quelle soit aussi créée en <em>externe</em> (remote).</p>
@ -66,25 +58,26 @@ branch=<span class="math">1<em>g</em><em>i</em><em>t</em><em>b</em><em>r</em></s
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/05_git_create_remote_branch/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/05_git_create_remote_branch" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/05_git_create_remote_branch" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -102,6 +95,7 @@ branch=<span class="math">1<em>g</em><em>i</em><em>t</em><em>b</em><em>r</em></s
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-08-17

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Git en solo</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><img src="../../../../Scratch/img/blog/06_How_I_use_git/central_architecture.png" alt="central architecture" /></p>
<div class="encadre">
@ -184,25 +176,26 @@ done</code></pre>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/06_How_I_use_git/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/06_How_I_use_git" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/06_How_I_use_git" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -220,6 +213,7 @@ done</code></pre>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-08-18

View file

@ -33,7 +33,34 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
</div>
<div id="titre">
<h1>Compilation d'économiseur d'écran sous Snow Leopard<small>©</small></h1>
</div>
<div class="flush"></div>
<div id="afterheader" class="article">
<div class="corps">
<h1 id="comment-recompiler-un-économiseur-décran-sous-snow-leopardc">Comment recompiler un économiseur décran sous Snow Leopard(c)</h1>
<p>Mon économiseur décran ne fonctionnait plus sous Mac OS X 10.6 Snow Leopard(c). Après un peu de recherche sous google, le problème semblait pouvoir être réglé avec une recompilation. Cependant, même en recomilant en 64 bits ça ne fonctionnait toujours pas. Après un peu plus de recherches (merci à <a href="http://community.electricsheep.org/node/236">ElectricSheep</a> ), jai découvert les bons paramètres.</p>
<p><img src="../../../../Scratch/img/blog/07_Screensaver_compilation_option_for_Snow_Leopard/xcodeConfig.png" alt="XCode configuration" /></p>
<p>Pour linstant je ne lai pas compilé pour être compatible Tiger et Leopard. Je ne connais pas assez bien XCode pour savoir comment désactiver le garbage collector sur la version 32 bits et lactiver sur la version 64 bits.</p>
<p>Il a été assez difficile de découvrir toutes ces informations. Jespère que cet article aura pu aider quelquun.</p>
</div>
<div id="social">
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/07_Screensaver_compilation_option_for_Snow_Leopard/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/07_Screensaver_compilation_option_for_Snow_Leopard" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/07_Screensaver_compilation_option_for_Snow_Leopard" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
@ -44,41 +71,7 @@
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
<div id="titre">
<h1>Compilation d'économiseur d'écran sous Snow Leopard<small>©</small></h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div class="corps">
<h1 id="comment-recompiler-un-économiseur-décran-sous-snow-leopardc">Comment recompiler un économiseur décran sous Snow Leopard(c)</h1>
<p>Mon économiseur décran ne fonctionnait plus sous Mac OS X 10.6 Snow Leopard(c). Après un peu de recherche sous google, le problème semblait pouvoir être réglé avec une recompilation. Cependant, même en recomilant en 64 bits ça ne fonctionnait toujours pas. Après un peu plus de recherches (merci à <a href="http://community.electricsheep.org/node/236">ElectricSheep</a> ), jai découvert les bons paramètres.</p>
<p><img src="../../../../Scratch/img/blog/07_Screensaver_compilation_option_for_Snow_Leopard/xcodeConfig.png" alt="XCode configuration" /></p>
<p>Pour linstant je ne lai pas compilé pour être compatible Tiger et Leopard. Je ne connais pas assez bien XCode pour savoir comment désactiver le garbage collector sur la version 32 bits et lactiver sur la version 64 bits.</p>
<p>Il a été assez difficile de découvrir toutes ces informations. Jespère que cet article aura pu aider quelquun.</p>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -96,6 +89,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-06

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>ssh sur le port 443 avec Snow Leopard</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="surfez-partout-comme-si-vous-étiez-chez-vous">Surfez partout comme si vous étiez chez vous</h1>
<p>Que ce soit pour surfer en toute sécurité depuis un accès <sc>wifi</sc> non sécurisé ou pour contourner les parefeux diaboliques des entreprises. Jai configuré un serveur ssh écoutant sur le port 443 chez moi.</p>
@ -111,25 +103,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/08_Configure_ssh_to_listen_the_port_443_on_Snow_Leopard/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/08_Configure_ssh_to_listen_the_port_443_on_Snow_Leopard" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/08_Configure_ssh_to_listen_the_port_443_on_Snow_Leopard" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -147,6 +140,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-07

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Pourquoi je n'ai pas conservé whos.amung.us</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>Jai arrété dutiliser <a href="http://whos.amung.us">whos.amung.us</a> en faveur de <a href="http://www.google.com/analytics">Google Analytics</a>.</p>
<p>La plupart du temps je préfère ne pas utiliser le même produit que tout le monde. Jaime bien essayer des choses un peu nouvelles. Mais whosamung.us avait trop de publicités. Je devais affichier une de leur image sur mon site qui nécrivait que le nombre de personne actuellement présentes. Pas les nombres de visites.</p>
@ -66,25 +58,26 @@ Google Analytics <big><strong>&gt;</strong></big> Whos Amung Us
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/09_Why_I_didn-t_keep_whosamung-us/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/09_Why_I_didn-t_keep_whosamung-us" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/09_Why_I_didn-t_keep_whosamung-us" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -102,6 +95,7 @@ Google Analytics <big><strong>&gt;</strong></big> Whos Amung Us
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-11

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Héberger son site personnel sur le site mobileMe</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="mise-à-jour-du-20120111">Mise à jour du <small>(2012/01/11)</small></h1>
<p>iDisk va bientôt disparaître. Cet article est donc presque complètement obsolète.</p>
@ -284,25 +276,26 @@ print -P -- &quot; Publish terminated&quot;</code></pre>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/10_Synchronize_Custom_WebSite_with_mobileMe/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/10_Synchronize_Custom_WebSite_with_mobileMe" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/10_Synchronize_Custom_WebSite_with_mobileMe" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -320,6 +313,7 @@ print -P -- &quot; Publish terminated&quot;</code></pre>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-11

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Load Disqus Asynchronously [en]</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="update">Update</h1>
<p>In fact this method works for old threads. But it fails to create new post threads. This is why I tried and be conquered by <a href="http://intensedebate.com">intensedebate</a>, as you can see in the bottom of this page.</p>
@ -73,14 +65,14 @@
<h3 id="javascript">Javascript</h3>
<p>replace:</p>
<div>
<pre class="sourceCode javascript"><code class="sourceCode javascript">&lt;script type=<span class="st">&quot;text/javascript&quot;</span> src=<span class="st">&quot;http://disqus.com/forums/YOUR_DISQUS_ID/embed.js&quot;</span>&gt;&lt;/script&gt;</code></pre>
<pre class="sourceCode javascript"><code class="sourceCode javascript">&lt;script type=<span class="st">&quot;text/javascript&quot;</span> src=<span class="st">&quot;http://disqus.com/forums/YOUR_DISQUS_ID/embed.js&quot;</span>&gt;&lt;<span class="ot">/script&gt;</span></code></pre>
</div>
<p>by</p>
<div>
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="kw">window</span>.<span class="fu">disqus</span>_<span class="fu">no</span>_<span class="fu">style</span>=<span class="kw">true</span>;
$(<span class="kw">document</span>).<span class="fu">ready</span>(<span class="kw">function</span>(){
$.<span class="fu">getScript</span>(<span class="st">&quot;http://disqus.com/forums/YOUR_DISQUS_ID/embed.js&quot;</span>);
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="ot">window</span>.<span class="fu">disqus_no_style</span>=<span class="kw">true</span>;
<span class="fu">$</span>(document).<span class="fu">ready</span>(<span class="kw">function</span>(){
<span class="ot">$</span>.<span class="fu">getScript</span>(<span class="st">&quot;http://disqus.com/forums/YOUR_DISQUS_ID/embed.js&quot;</span>);
});</code></pre>
</div>
@ -92,25 +84,26 @@ $(<span class="kw">document</span>).<span class="fu">ready</span>(<span class="k
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/11_Load_Disqus_Asynchronously/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/11_Load_Disqus_Asynchronously" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/11_Load_Disqus_Asynchronously" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -128,6 +121,7 @@ $(<span class="kw">document</span>).<span class="fu">ready</span>(<span class="k
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-17

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Disqus contre Intense Debate (pourquois j'ai changé)</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h1 id="disqus-vs.-intense-debate"><a href="http://disqus.com/">Disqus</a> <em>vs.</em> <a href="http://intensedebate.com/">Intense Debate</a></h1>
<p>Jai écrit un article sur la façon dont jai essayé dintégrer <a href="http://disqus.com">Disqus</a>. Mon problème majeur avec <a href="http://disqus.com/">Disqus</a> cétait que ma page ne saffichait pas correctement tant que les commentaire navait pas fini de safficher. Ça mest arrivé plusieurs fois davoir ma page complètement bloquée parce que les serveurs de <a href="http://disqus.com/">Disqus</a> ne répondait pas. Cest pourquoi jai essayer de linclure de manière asynchrone. Cependant jai eu des <a href="../../../../Scratch/fr/blog/11_Load_Disqus_Asynchronously/">difficultés pour le faire fonctionner correctement</a>.</p>
@ -59,13 +51,13 @@
<p>Lorsque jai commencé à intégrer <a href="http://disqus.com/">Disqus</a> je nai jamais essayé <a href="http://intensedebate.com">Intense Debate</a>. Maintenant que jai essayé je doit dire que je suis conquis. Il correspond exactement à ce que jespérais de ce type de service.</p>
<p>Pour le rendre complètement asynchrone il suffit de récupérer leur js commun et de remplacer la ligne suivante :</p>
<div>
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="kw">document</span>.<span class="fu">getElementsByTagName</span>(<span class="st">&quot;head&quot;</span>)[<span class="dv">0</span>].<span class="fu">appendChild</span>(commentScript);</code></pre>
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="ot">document</span>.<span class="fu">getElementsByTagName</span>(<span class="st">&quot;head&quot;</span>)[<span class="dv">0</span>].<span class="fu">appendChild</span>(commentScript);</code></pre>
</div>
<p>par (si vous utilisez jQuery) :</p>
<div>
<pre class="sourceCode javascript"><code class="sourceCode javascript">$(<span class="kw">document</span>).<span class="fu">ready</span>( <span class="kw">function</span>() {
<span class="kw">document</span>.<span class="fu">getElementsByTagName</span>(<span class="st">&quot;head&quot;</span>)[<span class="dv">0</span>].<span class="fu">appendChild</span>(commentScript);
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="fu">$</span>(document).<span class="fu">ready</span>( <span class="kw">function</span>() {
<span class="ot">document</span>.<span class="fu">getElementsByTagName</span>(<span class="st">&quot;head&quot;</span>)[<span class="dv">0</span>].<span class="fu">appendChild</span>(commentScript);
});</code></pre>
</div>
@ -79,25 +71,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/2009-09-Disqus-versus-Intense-Debate--Why-I-switched-/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/2009-09-Disqus-versus-Intense-Debate--Why-I-switched-" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/2009-09-Disqus-versus-Intense-Debate--Why-I-switched-" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -115,6 +108,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-28

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>jQuery Tag Cloud [en]</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>Here is how I done the tag cloud of my blog. It is done mostly in jQuery. All my site is static and pages are generated with <a href="nanoc.stoneship.org">nanoc</a>. It is (in my humble opinion) the modern geek way to make a website.</p>
<p>This is why Ill give only a Ruby Generator, not a full javascript generator. But you can easily translate from Ruby to Javascript.</p>
@ -64,12 +56,12 @@
<h1 id="jquery">jQuery</h1>
<p>Here is the simple jQuery code:</p>
<div>
<pre class="sourceCode javascript"><code class="sourceCode javascript"> $(<span class="kw">document</span>).<span class="fu">ready</span>( <span class="kw">function</span>(){$(<span class="ch">'.list'</span>).<span class="fu">hide</span>();} );
<span class="kw">function</span> tagSelected(id) {
$(<span class="ch">'.list'</span>).<span class="fu">hide</span>();
$(<span class="ch">'#'</span>+id).<span class="fu">fadeIn</span>();
$(<span class="ch">'.tag.selected'</span>).<span class="fu">removeClass</span>(<span class="ch">'selected'</span>);
$(<span class="ch">'#tag_'</span>+id).<span class="fu">addClass</span>(<span class="ch">'selected'</span>);
<pre class="sourceCode javascript"><code class="sourceCode javascript"> <span class="fu">$</span>(document).<span class="fu">ready</span>( <span class="kw">function</span>(){<span class="fu">$</span>(<span class="st">'.list'</span>).<span class="fu">hide</span>();} );
<span class="kw">function</span> <span class="fu">tagSelected</span>(id) {
<span class="fu">$</span>(<span class="st">'.list'</span>).<span class="fu">hide</span>();
<span class="fu">$</span>(<span class="st">'#'</span>+id).<span class="fu">fadeIn</span>();
<span class="fu">$</span>(<span class="st">'.tag.selected'</span>).<span class="fu">removeClass</span>(<span class="st">'selected'</span>);
<span class="fu">$</span>(<span class="st">'#tag_'</span>+id).<span class="fu">addClass</span>(<span class="st">'selected'</span>);
}</code></pre>
</div>
@ -248,25 +240,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/2009-09-jQuery-Tag-Cloud/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/2009-09-jQuery-Tag-Cloud" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/2009-09-jQuery-Tag-Cloud" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -284,6 +277,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-23

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Remplacer tout sauf une partie</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>My problem is simple:</p>
<p>I want to filter a text except some part of it. I can match easily the part I dont want to be filtered. For example</p>
@ -123,25 +115,26 @@ allExceptCode(<span class="st">:filter</span>, content)
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/2009-09-replace-all-except-some-part/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/2009-09-replace-all-except-some-part" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/2009-09-replace-all-except-some-part" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -159,6 +152,7 @@ allExceptCode(<span class="st">:filter</span>, content)
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-09-22

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Synchronisation avec mobileme (2)</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>Jai déjà discuté de la façon dont je <a href="../../../../Scratch/fr/blog/10_Synchronize_Custom_WebSite_with_mobileMe">synchronise mon site web sur mobileme</a>. Jai amélioré mon script pour le rendre incrémental.</p>
<p>Voici mon script, il créé tout dabord un fichier qui contient la liste des fichiers avec leur <em>hash</em>. Afin de les comparer avec ceux qui sont en ligne sans avoir à les parcourir. Ensuite pour chaque fichier qui semble différent, je met à jour le contenu.</p>
@ -136,25 +128,26 @@ fi </code>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/2009-10-28-custom-website-synchronisation-with-mobileme--2-/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/2009-10-28-custom-website-synchronisation-with-mobileme--2-" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/2009-10-28-custom-website-synchronisation-with-mobileme--2-" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -172,6 +165,7 @@ fi </code>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-10-28

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Une CSS pour IE seulement</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>Pour les développeur de site web Internet Explorer est un cauchemar. Cest pourquoi jutilise un style complètement différent pour ce navigateur. Avec la librairie jQuery.</p>
<div>
@ -76,25 +68,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/2009-10-30-How-to-handle-evil-IE/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/2009-10-30-How-to-handle-evil-IE" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/2009-10-30-How-to-handle-evil-IE" class="social">g</a>
<br></br>
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -112,6 +105,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-10-30

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1><em>Focus</em> &gt; Minimalisme</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>Je crois que le but du minimalisme est de facilité le <em><strong>Focus</strong></em> cest-à-dire la concentration sur le contenu. Je crois que le minimalisme doit être un moyen et pas une fin. Le <em>Focus</em> devrait être le but, et je pense que le minimalisme nest pas obligatoire pour latteindre.</p>
<p>Cest pourquoi mon design nest pas minimaliste. Mais jai décidé denlever la majorité des objets servant à la navigation pour améliorer lattention sur larticle. Peut-être que plus tard, je préfèrerai laisser le menu dans les pages normales du site pour ne le cacher que dans les articles de blog. Pour linstant je le cache partout.</p>
@ -74,19 +66,19 @@ top: 5em; left: 0; position: fixed; width: 10em; z-index: 9000; } ~~~~~~
<p>Le code javascript (utilisant jQuery)</p>
<div>
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="kw">function</span> hideMenu() {
$(<span class="ch">'#entete'</span>).<span class="fu">animate</span>({<span class="dt">left</span>:<span class="st">&quot;-10em&quot;</span>}, <span class="dv">500</span> );
$(<span class="ch">'#menuButton'</span>).<span class="fu">html</span>(<span class="ch">'&amp;rarr;'</span>);
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="kw">function</span> <span class="fu">hideMenu</span>() {
<span class="fu">$</span>(<span class="st">'#entete'</span>).<span class="fu">animate</span>({<span class="dt">left</span>:<span class="st">&quot;-10em&quot;</span>}, <span class="dv">500</span> );
<span class="fu">$</span>(<span class="st">'#menuButton'</span>).<span class="fu">html</span>(<span class="st">'&amp;rarr;'</span>);
}
<span class="kw">function</span> showMenu() {
$(<span class="ch">'#entete'</span>).<span class="fu">animate</span>({<span class="dt">left</span>:<span class="st">&quot;0em&quot;</span>}, <span class="dv">500</span> );
$(<span class="ch">'#menuButton'</span>).<span class="fu">html</span>(<span class="ch">'&amp;larr;'</span>);
<span class="kw">function</span> <span class="fu">showMenu</span>() {
<span class="fu">$</span>(<span class="st">'#entete'</span>).<span class="fu">animate</span>({<span class="dt">left</span>:<span class="st">&quot;0em&quot;</span>}, <span class="dv">500</span> );
<span class="fu">$</span>(<span class="st">'#menuButton'</span>).<span class="fu">html</span>(<span class="st">'&amp;larr;'</span>);
}
<span class="kw">function</span> toggleMenu() {
<span class="kw">if</span> ( $(<span class="ch">'#entete'</span>).<span class="fu">css</span>(<span class="ch">'left'</span>)==<span class="ch">'-10em'</span> ) {
showMenu();
<span class="kw">function</span> <span class="fu">toggleMenu</span>() {
<span class="kw">if</span> ( <span class="fu">$</span>(<span class="st">'#entete'</span>).<span class="fu">css</span>(<span class="st">'left'</span>)==<span class="st">'-10em'</span> ) {
<span class="fu">showMenu</span>();
} <span class="kw">else</span> {
hideMenu();
<span class="fu">hideMenu</span>();
}
}</code></pre>
</div>
@ -95,25 +87,26 @@ top: 5em; left: 0; position: fixed; width: 10em; z-index: 9000; } ~~~~~~
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/2009-10-Focus-vs-Minimalism/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/2009-10-Focus-vs-Minimalism" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/2009-10-Focus-vs-Minimalism" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -131,6 +124,7 @@ top: 5em; left: 0; position: fixed; width: 10em; z-index: 9000; } ~~~~~~
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-10-22

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Charger une page web avec style</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<h2 id="exemple">Exemple</h2>
<p>Voici comment apparaissent mes pages pendant leur chargement.</p>
@ -114,8 +106,8 @@ Loading… <img style="border: none; background-color: none; background: none" s
<p>ainsi que le code jQuery associé :</p>
<div>
<pre class="sourceCode javascript"><code class="sourceCode javascript">$(<span class="kw">document</span>).<span class="fu">ready</span>(<span class="kw">function</span>(){
$(<span class="ch">'#blackpage'</span>).<span class="fu">fadeOut</span>();
<pre class="sourceCode javascript"><code class="sourceCode javascript"><span class="fu">$</span>(document).<span class="fu">ready</span>(<span class="kw">function</span>(){
<span class="fu">$</span>(<span class="st">'#blackpage'</span>).<span class="fu">fadeOut</span>();
});</code></pre>
</div>
@ -124,25 +116,26 @@ Loading… <img style="border: none; background-color: none; background: none" s
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/2009-10-How-to-preload-your-site-with-style/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/2009-10-How-to-preload-your-site-with-style" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/2009-10-How-to-preload-your-site-with-style" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -160,6 +153,7 @@ Loading… <img style="border: none; background-color: none; background: none" s
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-10-03

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Un menu qui attends avant de se cacher</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>Jai déjà dit pourquoi <a href="../../../../Scratch/fr/blog/2009-10-Focus-vs-Minimalism">je préférais que mon menu de navigation soit caché</a>. Jai finalement décidé dattendre un peu avant de cacher le menu. Juste le temps que lutilisateur le voit. Mais voilà. Comment faire pour quil ne disparaisse que lorsque lon ne sen sert pas pendant un petit moment ?</p>
<p>Voici la solution que jutilise avec jQuery</p>
@ -102,25 +94,26 @@ autoHideMenu(0);</code></pre>
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/2009-10-Wait-to-hide-a-menu-in-jQuery/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/2009-10-Wait-to-hide-a-menu-in-jQuery" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/2009-10-Wait-to-hide-a-menu-in-jQuery" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -138,6 +131,7 @@ autoHideMenu(0);</code></pre>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-10-26

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>lancer un démon en ligne de commande</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p>Une petite astuce dont je ne me souvient jamais (je ne sais pas pourquoi).</p>
<p>Lorsque que vous souhaitez lancer une commande qui ne soit pas tuée après la fermeture du terminal voici comment sy prendre :</p>
@ -62,25 +54,26 @@
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/2009-10-launch-daemon-from-command-line/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/2009-10-launch-daemon-from-command-line" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/2009-10-launch-daemon-from-command-line" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -98,6 +91,7 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-10-23

View file

@ -33,16 +33,8 @@
document.write('<div id="switchcss"><a href="#">Changer de theme</a></div>');
//
</script>
<div class="tomenu"><a href="#navigation">↓ Menu ↓</a></div>
<div class="flush"></div>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
</div>
@ -50,7 +42,7 @@
<h1>Usages non dits de Git</h1>
</div>
<div class="flush"></div>
<div id="afterheader">
<div id="afterheader" class="article">
<div class="corps">
<p><small> <em>Je décris pourquoi jai eu tant de mal à me faire à Git. Il y a en effet une partie “non dite” qui ma bloqué pendant un bon moment. Jusquà ce que je découvre le bon document. </em></small></p>
<p><small> <em> Le fait est que les <em>branches légères</em> ne sont pas destinée à être des branches isolées. Ainsi, il y a un </em>“workflow standard”<em> qui sil nest pas suivi rend lutilisation de Git inappropriée. </em> </small></p>
@ -190,25 +182,26 @@ OK
</div>
<div id="social">
<span>
<a class="rss" href="http://feeds.feedburner.com/yannespositocomfr">RSS</a>
</span>
<span>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="yogsototh">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</span>
<span>
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="106"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<div class="flush"></div>
<a target="_blank" href="http://feeds.feedburner.com/yannespositocomfr" class="social">r</a>
·
<a target="_blank" href="https://twitter.com/home?status=http://yannesposito.com/Scratch/fr/blog/2009-10-untaught-git-usage/index.html%22via%22@yogsototh" class="social">t</a>
·
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=/Scratch/fr/blog/2009-10-untaught-git-usage" class="social">`</a>
·
<a target="_blank" href="https://plus.google.com/share?url=http://yannesposito.com/Scratch/fr/blog/2009-10-untaught-git-usage" class="social">g</a>
<br />
<a class="message" href="../../../../Scratch/fr/blog/Social-link-the-right-way/">Ces liens sociaux préservent votre vie privée</a>
</div>
<div id="navigation">
<a href="../../../../">Home</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/blog">Blog</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/softwares">Softwares</a>
<span class="sep">¦</span>
<a href="../../../../Scratch/fr/about">About</a>
</div>
<div id="totop"><a href="#header">↑ Top ↑</a></div>
<div class="corps" id="comment">
<h2 class="first">Comments</h2>
<div id="disqus_thread"></div>
@ -226,6 +219,7 @@ OK
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div class="tomenu"><a href="#navigation">↑ Menu ↑</a></div>
<div id="bottom">
<div>
Published on 2009-10-13

Some files were not shown because too many files have changed in this diff Show more