Browse Source

support raw HTML and merged old blog

merge-yannesposito
parent
commit
7f5758cd6e
Signed by: yogsototh GPG Key ID: 7B19A4C650D59646
  1. 9
      app/Shakefile.hs
  2. 90
      engine/ye-com-fastpublish.hs
  3. 1
      src/CNAME
  4. 1
      src/Scratch/css/brutalist.css
  5. 1
      src/Scratch/css/pandoc-solarized.css
  6. 1
      src/Scratch/css/solarized.css
  7. 142
      src/Scratch/en/about/index.html
  8. 109
      src/Scratch/en/blog/01_nanoc/index.html
  9. 13
      src/Scratch/en/blog/02_ackgrep/code/ack
  10. 126
      src/Scratch/en/blog/02_ackgrep/index.html
  11. 189
      src/Scratch/en/blog/03_losthighway/index.html
  12. 118
      src/Scratch/en/blog/04_drm/index.html
  13. 13
      src/Scratch/en/blog/05_git_create_remote_branch/code/git-create-new-branch.sh
  14. 122
      src/Scratch/en/blog/05_git_create_remote_branch/index.html
  15. 12
      src/Scratch/en/blog/06_How_I_use_git/code/git-create-new-branch
  16. 13
      src/Scratch/en/blog/06_How_I_use_git/code/git-get-remote-branches
  17. 213
      src/Scratch/en/blog/06_How_I_use_git/index.html
  18. 113
      src/Scratch/en/blog/07_Screensaver_compilation_option_for_Snow_Leopard/index.html
  19. 34
      src/Scratch/en/blog/08_Configure_ssh_to_listen_the_port_443_on_Snow_Leopard/code/ssh-443.plist
  20. 160
      src/Scratch/en/blog/08_Configure_ssh_to_listen_the_port_443_on_Snow_Leopard/index.html
  21. 115
      src/Scratch/en/blog/09_Why_I_didn-t_keep_whosamung-us/index.html
  22. 101
      src/Scratch/en/blog/10_Synchronize_Custom_WebSite_with_mobileMe/code/publish
  23. 331
      src/Scratch/en/blog/10_Synchronize_Custom_WebSite_with_mobileMe/index.html
  24. 140
      src/Scratch/en/blog/11_Load_Disqus_Asynchronously/index.html
  25. 127
      src/Scratch/en/blog/2009-09-Disqus-versus-Intense-Debate--Why-I-switched-/index.html
  26. 288
      src/Scratch/en/blog/2009-09-jQuery-Tag-Cloud/index.html
  27. 169
      src/Scratch/en/blog/2009-09-replace-all-except-some-part/index.html
  28. 118
      src/Scratch/en/blog/2009-10-28-custom-website-synchronisation-with-mobileme--2-/code/publish
  29. 108
      src/Scratch/en/blog/2009-10-28-custom-website-synchronisation-with-mobileme--2-/code/webdav-framework
  30. 174
      src/Scratch/en/blog/2009-10-28-custom-website-synchronisation-with-mobileme--2-/index.html
  31. 17
      src/Scratch/en/blog/2009-10-30-How-to-handle-evil-IE/code/ie.js
  32. 129
      src/Scratch/en/blog/2009-10-30-How-to-handle-evil-IE/index.html
  33. 150
      src/Scratch/en/blog/2009-10-Focus-vs-Minimalism/index.html
  34. 170
      src/Scratch/en/blog/2009-10-How-to-preload-your-site-with-style/index.html
  35. 170
      src/Scratch/en/blog/2009-10-Wait-to-hide-a-menu-in-jQuery/index.html
  36. 110
      src/Scratch/en/blog/2009-10-launch-daemon-from-command-line/index.html
  37. 229
      src/Scratch/en/blog/2009-10-untaught-git-usage/index.html
  38. 19
      src/Scratch/en/blog/2009-11-12-Git-for-n00b/code/gitconfig
  39. 468
      src/Scratch/en/blog/2009-11-12-Git-for-n00b/index.html
  40. 107
      src/Scratch/en/blog/2009-12-06-iphone-call-filter/index.html
  41. 2
      src/Scratch/en/blog/2009-12-14-Git-vs--Bzr/code/gitconfig
  42. 167
      src/Scratch/en/blog/2009-12-14-Git-vs--Bzr/index.html
  43. 109
      src/Scratch/en/blog/2010-01-04-Change-default-shell-on-Mac-OS-X/index.html
  44. 54
      src/Scratch/en/blog/2010-01-12-antialias-font-in-Firefox-under-Ubuntu/code/local.conf
  45. 164
      src/Scratch/en/blog/2010-01-12-antialias-font-in-Firefox-under-Ubuntu/index.html
  46. 136
      src/Scratch/en/blog/2010-02-15-All-but-something-regexp/index.html
  47. 161
      src/Scratch/en/blog/2010-02-16-All-but-something-regexp--2-/index.html
  48. 117
      src/Scratch/en/blog/2010-02-18-split-a-file-by-keyword/index.html
  49. 24
      src/Scratch/en/blog/2010-02-23-When-regexp-is-not-the-best-solution/code/regex_benchmark_ext.rb
  50. 20
      src/Scratch/en/blog/2010-02-23-When-regexp-is-not-the-best-solution/code/regex_benchmark_strip.rb
  51. 142
      src/Scratch/en/blog/2010-02-23-When-regexp-is-not-the-best-solution/index.html
  52. 130
      src/Scratch/en/blog/2010-03-22-Git-Tips/index.html
  53. 102
      src/Scratch/en/blog/2010-03-23-Encapsulate-git/code/eng
  54. 158
      src/Scratch/en/blog/2010-03-23-Encapsulate-git/index.html
  55. 127
      src/Scratch/en/blog/2010-05-17-at-least-this-blog-revive/index.html
  56. 24
      src/Scratch/en/blog/2010-05-19-How-to-cut-HTML-and-repair-it/code/repair_xml.rb
  57. 172
      src/Scratch/en/blog/2010-05-19-How-to-cut-HTML-and-repair-it/index.html
  58. BIN
      src/Scratch/en/blog/2010-05-24-Trees--Pragmatism-and-Formalism/code/The_destination_tree.png
  59. BIN
      src/Scratch/en/blog/2010-05-24-Trees--Pragmatism-and-Formalism/code/The_source_tree.png
  60. 295
      src/Scratch/en/blog/2010-05-24-Trees--Pragmatism-and-Formalism/index.html
  61. 131
      src/Scratch/en/blog/2010-06-14-multi-language-choices/index.html
  62. 166
      src/Scratch/en/blog/2010-06-15-Get-my-blog-engine/index.html
  63. 20
      src/Scratch/en/blog/2010-06-17-hide-yourself-to-analytics/code/become_hidden.html
  64. 20
      src/Scratch/en/blog/2010-06-17-hide-yourself-to-analytics/code/become_visible.html
  65. 157
      src/Scratch/en/blog/2010-06-17-hide-yourself-to-analytics/index.html
  66. 45
      src/Scratch/en/blog/2010-06-17-track-events-with-google-analytics/code/yga.js
  67. 162
      src/Scratch/en/blog/2010-06-17-track-events-with-google-analytics/index.html
  68. 22
      src/Scratch/en/blog/2010-06-19-jQuery-popup-the-easy-way/code/essai.js
  69. 131
      src/Scratch/en/blog/2010-06-19-jQuery-popup-the-easy-way/index.html
  70. 190
      src/Scratch/en/blog/2010-07-05-Cappuccino-and-Web-applications/index.html
  71. 120
      src/Scratch/en/blog/2010-07-07-CSS-rendering-problems-by-navigator/index.html
  72. 201
      src/Scratch/en/blog/2010-07-09-Indecidabilities/index.html
  73. 107
      src/Scratch/en/blog/2010-07-31-New-style-after-holidays/index.html
  74. 42
      src/Scratch/en/blog/2010-08-23-Now-heberged-on-heroku/code/config.ru
  75. 168
      src/Scratch/en/blog/2010-08-23-Now-heberged-on-heroku/index.html
  76. 142
      src/Scratch/en/blog/2010-08-31-send-mail-from-command-line-with-attached-file/index.html
  77. 14
      src/Scratch/en/blog/2010-09-02-Use-git-to-calculate-trusted-mtimes/code/gitmtime.rb
  78. 123
      src/Scratch/en/blog/2010-09-02-Use-git-to-calculate-trusted-mtimes/index.html
  79. 42
      src/Scratch/en/blog/2010-09-02-base64-and-sha1-on-iPhone/code/iphone_base64_sha1.c
  80. 155
      src/Scratch/en/blog/2010-09-02-base64-and-sha1-on-iPhone/index.html
  81. 112
      src/Scratch/en/blog/2010-10-06-New-Blog-Design-Constraints/index.html
  82. 134
      src/Scratch/en/blog/2010-10-10-Secure-eMail-on-Mac-in-few-steps/index.html
  83. 58
      src/Scratch/en/blog/2010-10-14-Fun-with-wav/code/wavsum.c
  84. 27
      src/Scratch/en/blog/2010-10-14-Fun-with-wav/code/wavsum.py
  85. 11
      src/Scratch/en/blog/2010-10-14-Fun-with-wav/code/wavsum.rb
  86. 106
      src/Scratch/en/blog/2010-10-14-Fun-with-wav/code/wavsum2.c
  87. 351
      src/Scratch/en/blog/2010-10-14-Fun-with-wav/index.html
  88. 43
      src/Scratch/en/blog/2010-10-26-LaTeX-like-macro-and-markdown/code/macros.rb
  89. 160
      src/Scratch/en/blog/2010-10-26-LaTeX-like-macro-and-markdown/index.html
  90. 109
      src/Scratch/en/blog/2011-01-03-Happy-New-Year/index.html
  91. 179
      src/Scratch/en/blog/2011-01-03-Why-I-sadly-won-t-use-coffeescript/index.html
  92. 108
      src/Scratch/en/blog/2011-04-20-Now-hosted-on-github/index.html
  93. 22
      src/Scratch/en/blog/A-more-convenient-diff/code/ydiff
  94. 130
      src/Scratch/en/blog/A-more-convenient-diff/index.html
  95. 1068
      src/Scratch/en/blog/Category-Theory-Presentation/index.html
  96. 520
      src/Scratch/en/blog/Hakyll-setup/index.html
  97. 8
      src/Scratch/en/blog/Haskell-Mandelbrot/code/animandel.hs
  98. 205
      src/Scratch/en/blog/Haskell-Mandelbrot/index.html
  99. 53
      src/Scratch/en/blog/Haskell-OpenGL-Mandelbrot/code/00_Introduction.lhs
  100. 182
      src/Scratch/en/blog/Haskell-OpenGL-Mandelbrot/code/01_Introduction/hglmandel.lhs

9
app/Shakefile.hs

@ -144,7 +144,11 @@ buildRules = do
".html" -> do
if out == siteDir </> "index.html"
then buildArchive getPosts getTemplate out
else genHtmlAction getPost getTemplate out
else do
htmlExists <- doesFileExist (srcDir </> asset)
if htmlExists
then copyFileChanged (srcDir </> asset) out
else genHtmlAction getPost getTemplate out
".pdf" -> do
txtExists <- doesFileExist (srcDir </> asset)
if txtExists
@ -183,7 +187,8 @@ buildArchive getPosts getTemplate out = do
title = "#+title: Yann Esposito's blog"
menu = "@@html:<a href=\"/index.html\">Home</a> | <a href=\"/slides.html\">Slides</a> | <a href=\"/about-me.html\">About</a>@@"
articleList = toS $ T.intercalate "\n" $ map postInfo posts
fileContent = title <> "\n\n" <> menu <> "\n\n" <> welcomeTxt <> "\n\n" <> articleList
olderArchives = "---\n\n@@html:<a href=\"/Scratch/en/blog/index.html\">Older Archives from my previous blog</a>@@"
fileContent = title <> "\n\n" <> menu <> "\n\n" <> welcomeTxt <> "\n\n" <> articleList <> olderArchives
eitherResult <- liftIO $ Pandoc.runIO $ Readers.readOrg (def { readerStandalone = True }) (toS fileContent)
bp <- case eitherResult of
Left _ -> fail "BAD"

90
engine/ye-com-fastpublish.hs

@ -0,0 +1,90 @@
#!/usr/bin/env stack
{- stack
--resolver lts-6.12
--install-ghc
runghc
--package turtle
--package ansi-terminal
--verbosity s
-}
{-# LANGUAGE OverloadedStrings #-}
import Turtle
import Prelude hiding (FilePath)
import qualified Control.Foldl as Fold
import Data.Maybe (fromMaybe)
import System.Console.ANSI
import Control.Exception (catches,Handler(..))
main = mainProc `catches` [ Handler handleShellFailed
, Handler handleProcFailed
]
handleShellFailed :: ShellFailed -> IO ()
handleShellFailed (ShellFailed cmdLine _) = do
setSGR [SetColor Foreground Dull Red]
echo $ ("[FAILED]: " <> cmdLine)
setSGR [Reset]
handleProcFailed :: ProcFailed -> IO ()
handleProcFailed (ProcFailed procCommand procArgs _) = do
setSGR [SetColor Foreground Dull Red]
echo $ ("[FAILED]: " <> procCommand <> (mconcat procArgs))
setSGR [Reset]
mainProc :: IO ()
mainProc = do
-- So we can't have access to $0 in Haskell via stack.
-- Too bad.
-- So instead, I'll check I'm in the right directory.
debug "Checking directory"
(hakylldir,pubdir) <- checkDir
debug "Retrieving revision number"
rev <- fold (inshell "git rev-parse --short HEAD" empty) Fold.head
debug ("Revision number retrieved: " <> fromMaybe "unknow" rev)
debug $ "cd " <> (format fp pubdir)
cd pubdir
pwd >>= echo . format fp
dshells "git init ."
dshell ("git remote add upstream " <> mainRepository)
dshells "git fetch upstream"
dshells "git reset upstream/gh-pages"
dshells "git add -A ."
echo "Commit and publish"
dshells ("git commit -m \"publishing at rev " <> (fromMaybe "unknow" rev) <> "\"")
echo "Don't `git push` this time"
dshells "git push -q upstream HEAD:gh-pages"
debug txt = do
setSGR [SetColor Foreground Dull Yellow]
echo txt
setSGR [Reset]
dshells x = do
debug x
shells x empty
dshell x = do
debug x
shell x empty
checkDir :: IO (FilePath,FilePath)
checkDir = do
toolsExists <- testdir "tools"
if (not toolsExists)
then exit (ExitFailure 1)
else return (".","content/_site")
mainRepository = "git@github.com:yogsototh/yannesposito.com.git"
cloneIfNeeded :: FilePath -> IO ()
cloneIfNeeded pubdir = do
contentExists <- testdir pubdir
when (not contentExists) $
procs "git"
[ "clone"
, "-b", "gh-pages"
, mainRepository
, format fp pubdir]
empty

1
src/CNAME

@ -0,0 +1 @@
yannesposito.com

1
src/Scratch/css/brutalist.css

File diff suppressed because one or more lines are too long

1
src/Scratch/css/pandoc-solarized.css

@ -0,0 +1 @@
pre code{color:#073642}code span.kw,code span a.kw{color:#859900;font-weight:normal;font-style:normal}code span.dt,code span a.dt{color:#B58900;font-weight:normal;font-style:normal}code span.dv,code span.bn,code span.fl,code span.ch,code span.st,code span a.dv,code span a.bn,code span a.fl,code span a.ch,code span a.st{color:#2AA198;font-weight:normal;font-style:normal}code span.co,code span a.co{color:#93A1A1;font-weight:normal;font-style:italic}code span.ot,code span a.ot{color:#268BD2;font-weight:normal;font-style:normal}code span.al,code span a.al{color:#DC322F;font-weight:normal;font-style:normal}code span.fu,code span a.fu{color:#268BD2;font-weight:normal;font-style:normal}code span.er,code span a.er{color:#DC322F;font-weight:normal;font-style:normal}code span.wa,code span a.wa{color:#CB4B16;font-weight:normal;font-style:italic}code span.cn,code span a.cn{color:#2AA198;font-weight:normal;font-style:normal}code span.sc,code span a.sc{color:#DC322F;font-weight:normal;font-style:normal}code span.vs,code span a.vs{color:#657B83;font-weight:normal;font-style:normal}code span.ss,code span a.ss{color:#DC322F;font-weight:normal;font-style:normal}code span.im,code span a.im{color:#657B83;font-weight:normal;font-style:normal}code span.va,code span a.va{color:#268BD2;font-weight:normal;font-style:normal}code span.cf,code span.op,code span a.cf,code span a.op{color:#859900;font-weight:normal;font-style:normal}code span.bu,code span.ex,code span a.bu,code span a.ex{color:#657B83;font-weight:normal;font-style:normal}code span.pp,code span a.pp{color:#CB4B16;font-weight:normal;font-style:normal}code span.at,code span a.at{color:#657B83;font-weight:normal;font-style:normal}code span.do,code span.an,code span.cv,code span.in,code span a.do,code span a.an,code span a.cv,code span a.in{color:#93A1A1;font-weight:normal;font-style:italic}a.sourceLine::before{text-decoration:none}

1
src/Scratch/css/solarized.css

@ -0,0 +1 @@
.hljs{background:#f3f4f5}pre{padding:.8em;background:#f3f4f5;color:#657b83;color:#839496;display:block}pre .high0{color:#586e75}pre .high,pre .high1{color:#073642}pre .high2{color:#002b36}pre .DiffInserted,pre .DiffChanged,pre .DiffHeader,pre .DiffDeleted,pre .EmbeddedSource,pre .EmbeddedSourceBright{color:#839496}pre .DiffHeader{font-style:italic}pre .EmbeddedSource,pre .EmbeddedSourceBright{background-color:#073642}pre .low,pre .line-numbers,pre .DoctypeXmlProcessing{color:#586e75}pre .Comment{color:#586e75;font-style:italic}pre .yellow,pre .CssClass,pre .CssPropertyName,pre .Entity,pre .MarkupList{color:#b58900}pre .EntityInheritedClass{color:#b58900;font-style:italic}pre .orange,pre .String,pre .StringRegexp,pre .StringEmbeddedSource,pre .StringConstant,pre .MetaTagAll{color:#cb4b16}pre .red{color:#dc322f}pre .InvalidIllegal,pre .CssAtRule,pre .InvalidDeprecated{color:#dc322f;font-style:italic}pre .magenta,pre .CCCPreprocessorLine,pre .CCCPreprocessorDirective{color:#d33682}pre .violet,pre .Constant{color:#6c71c4}pre .blue,pre .Storage,pre .Variable,pre .CssId,pre .SupportFunction,pre .MetaTagInline,pre .StringRegexpSpecial,pre .CssTagName,pre .StringVariable,pre .Support{color:#268bd2}pre .cyan,pre .MarkupHeading,pre .CssAdditionalConstants,pre .CssPropertyValue,pre .SupportConstant{color:#2aa198}pre .green,pre .CssPseudoClass,pre .Keyword,pre .CssConstructorArgument{color:#859900}pre code{color:#657b83;background-color:#f3f4f5}pre .comment,pre .template_comment,pre .diff .header,pre .doctype,pre .lisp .string,pre .javadoc{color:#93a1a1;font-style:italic}pre .keyword,pre .css .rule .keyword,pre .winutils,pre .javascript .title,pre .method,pre .addition,pre .css .tag,pre .lisp .title{color:#859900}pre .number,pre .command,pre .string,pre .tag .value,pre .phpdoc,pre .tex .formula,pre .regexp,pre .hexcolor{color:#2aa198}pre .title,pre .localvars,pre .function .title,pre .chunk,pre .decorator,pre .builtin,pre .built_in,pre .lisp .title,pre .identifier,pre .title .keymethods,pre .id{color:#268bd2}pre .attribute,pre .variable,pre .instancevar,pre .lisp .body,pre .smalltalk .number,pre .constant,pre .class .title,pre .parent,pre .haskell .label{color:#b58900}pre .preprocessor,pre .pi,pre .shebang,pre .symbol,pre .diff .change,pre .special,pre .keymethods,pre .attr_selector,pre .important,pre .subst,pre .cdata{color:#cb4b16}pre .deletion{color:#dc322f}pre .tex .formula{background:#eee8d5}

142
src/Scratch/en/about/index.html

@ -0,0 +1,142 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>YBlog - About</title>
<link rel="shortcut icon" type="image/x-icon" href="../../../Scratch/img/favicon.ico" />
<link rel="stylesheet" type="text/css" href="../../../Scratch/css/brutalist.css" />
<link rel="stylesheet" type="text/css" href="../../../Scratch/css/pandoc-solarized.css" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../../Scratch/en/blog/feed/feed.xml" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" href="../../../Scratch/img/about/FlatAvatar@2x.png" />
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
<!-- IndieAuth -->
<link href="https://twitter.com/yogsototh" rel="me">
<link href="https://github.com/yogsototh" rel="me">
<link href="mailto:yann.esposito@gmail.com" rel="me">
<link rel="pgpkey" href="../../../pubkey.txt">
</head>
<body lang="en" class="default">
<div id="content">
<div id="header">
<div id="choix">
<div id="choixlang">
<a href="../../../Scratch/fr/about/">French</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>
<div id="titre">
<h1>About</h1>
</div>
<div class="flush"></div>
<div id="afterheader" class="default">
<div class="corps">
<p><img src="../../../Scratch/img/about/FlatAvatar.png" alt="Avatar" class="clean left" /></p>
<p><strong>@</strong> <a href="mailto:yann.esposito@gmail.com">yann.esposito@gmail.com</a><br />
<a href="http://twitter.com/yogsototh"><span class="social">t</span> <span class="citation" data-cites="yogsototh">@yogsototh</span></a><br />
<a href="https://keybase.io/yogsototh"><img src="../../../Scratch/img/keybase.svg" style="height:16px" /> yogsototh</a><br />
<a href="http://pinboard.in/u:yogsototh"><img src="../../../Scratch/img/pinboard.png" class="simple" style="height: 16px" /> yogsototh</a><br />
<a href="http://github.com/yogsototh"><img src="../../../Scratch/img/GitHub-Mark-32px.png" class="simple" style="height: 16px" /> yogsototh</a><br />
<a href="http://stackoverflow.com/users/40569/yogsototh"><img src="../../../Scratch/img/stackoverflow-logo.png" class="simple" style="height: 16px" /> yogsototh</a></p>
<hr style="clear:both" />
<p><a href="https://cardanohub.org"><img src="../../../Scratch/img/ada-logo.png" class="simple" style="height: 16px; border-radius: 50%;" /> ADA:</a> <code style="display:inline-block; word-wrap:break-word; text-align: left; vertical-align: top; max-width: 85%;"> DdzFFzCqrhtAvdkmATx5Fm8NPJViDy85ZBw13p4XcNzVzvQg8e3vWLXq23JQWFxPEXK6Kvhaxxe7oJt4VMYHxpA2vtCFiP8fziohN6Yp </code></p>
<h2 id="one-photo">One photo</h2>
<figure>
<img src="../../../Scratch/img/about/yann1.jpg" alt="I look like this" /><figcaption>I look like this</figcaption>
</figure>
<h2 id="shortly">Shortly</h2>
<p>I am a Senior Software Engineer (Clojurist) for <a href="http://cisco.com">Cisco</a>, Threatgrid team.</p>
<p>I was a Machine Learning expert and Software Engineer for Vigiglobe.</p>
<p>I tend to use functional programming a lot. Mostly <a href="http://haskell.org">Haskell</a> and <a href="http://clojure.org">Clo<i>j</i>ure</a>.</p>
<p>I am generally passionate about:</p>
<ul>
<li>Computer Science: <a href="http://yann.esposito.free.fr/recherche.php">I’ve got a post Ph. D. degree in Computer Science</a>.</li>
<li>Programming: <a href="http://yann.esposito.free.fr/logiciels.php">I developed two scientific apps</a>, <a href="../../../Scratch/en/softwares">two Mac screen savers</a>, an <a href="http://ypassword.espozito.com">iOS app</a> and many other things; <a href="http://github.com/yogsototh">see my github</a></li>
<li>Computer Security: <a href="http://yann.esposito.free.fr/enseignement/rez0.php#projet">I designed a secure web protocol (similar to TOR)</a>, a method to securely remember strong passwords, (<a href="../../../Scratch/en/softwares/ypassword/">programmed a dashboard widget</a> and a shell script to use this method).</li>
</ul>
<p>But before all, I love to learn. For example, I learned many programming languages:</p>
<p>Functional:</p>
<ul>
<li><a href="http://haskell.org">Haskell</a>, <a href="http://purescript.org">Purescript</a>, <a href="http://elm-lang.org">Elm</a>,</li>
<li><a href="http://clojure.org">Clo<i>j</i>ure</a>, <a href="https://mitpress.mit.edu/sites/default/files/sicp/index.html">Scheme</a>,</li>
<li><a href="http://caml.inria.fr">camL</a></li>
</ul>
<p>Object Oriented:</p>
<ul>
<li>javascript, C, C++, Objective-C,</li>
<li>Java,</li>
<li><a href="http://python.org">Python</a>,</li>
<li><a href="http://ruby-lang.org">Ruby</a>,</li>
</ul>
<p>Also:</p>
<ul>
<li><a href="http://perl.org">Perl</a>,</li>
<li>awk,</li>
<li>bash,</li>
<li><a href="http://www.zsh.org">zsh</a>,</li>
<li><a href="http://www.latex-project.org"><span style="text-transform: uppercase">L<sup style="vertical-align: 0.15em; margin-left: -0.36em; margin-right: -0.15em; font-size: .85em">a</sup>T<sub style="vertical-align: -0.5ex; margin-left: -0.1667em; margin-right: -0.125em; font-size: 1em">e</sub>X</span></a>,</li>
<li><a href="http://www.tug.org/metapost.html">metapost</a>,</li>
</ul>
<p><a href="../../../Scratch/files/resume/resume.html">My full resume»</a></p>
<h2 id="old-stuff">Old stuff</h2>
<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;lang=en">Research activities ✞</a></li>
<li><a href="http://yann.esposito.free.fr/">My student website ✞ 2007</a></li>
</ul>
</div>
<div id="afterarticle">
<div id="bottom">
<div>
<a href="https://twitter.com/yogsototh">Follow @yogsototh</a>
</div>
<div>
Yann Esposito©
</div>
<div>
Done with
<a href="http://www.vim.org" target="_blank" rel="noopener noreferrer nofollow"><span class="strike">Vim</span></a>
<a href="http://spacemacs.org" target="_blank" rel="noopener noreferrer nofollow">spacemacs</a>
<span class="pala">&amp;</span>
<a href="http://nanoc.ws" target="_blank" rel="noopener noreferrer nofollow"><span class="strike">nanoc</span></a>
<a href="http://jaspervdj.be/hakyll" target="_blank" rel="noopener noreferrer nofollow">Hakyll</a>
</div>
<hr />
<div style="max-width: 100%">
<a href="https://cardanohub.org">
<img src="../../../Scratch/img/ada-logo.png" class="simple" style="height: 16px;
border-radius: 50%;
vertical-align:middle;
display:inline-block;" />
ADA:
</a>
<code style="display:inline-block;
word-wrap:break-word;
text-align: left;
vertical-align: top;
max-width: 85%;">
DdzFFzCqrhtAvdkmATx5Fm8NPJViDy85ZBw13p4XcNzVzvQg8e3vWLXq23JQWFxPEXK6Kvhaxxe7oJt4VMYHxpA2vtCFiP8fziohN6Yp
</code>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

109
src/Scratch/en/blog/01_nanoc/index.html

@ -0,0 +1,109 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>YBlog - Nanoc</title>
<link rel="shortcut icon" type="image/x-icon" href="../../../../Scratch/img/favicon.ico" />
<link rel="stylesheet" type="text/css" href="../../../../Scratch/css/brutalist.css" />
<link rel="stylesheet" type="text/css" href="../../../../Scratch/css/pandoc-solarized.css" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../../../Scratch/en/blog/feed/feed.xml" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" href="../../../../Scratch/img/about/FlatAvatar@2x.png" />
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
<!-- IndieAuth -->
<link href="https://twitter.com/yogsototh" rel="me">
<link href="https://github.com/yogsototh" rel="me">
<link href="mailto:yann.esposito@gmail.com" rel="me">
<link rel="pgpkey" href="../../../../pubkey.txt">
</head>
<body lang="en" class="article">
<div id="content">
<div id="header">
<div id="choix">
<span id="choixlang">
<a href="../../../../Scratch/fr/blog/01_nanoc/">French</a>
</span>
<span class="tomenu"><a href="#navigation">↓ Menu ↓</a></span>
<span class="flush"></span>
</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>You’ll can find many informations on the <a href="http://nanoc.stoneship.org">official nanoc website</a>.</p>
</div>
<div id="afterarticle">
<div id="social">
<a href="../../../../Scratch/en/blog/feed/feed.xml" target="_blank" rel="noopener noreferrer nofollow" class="social">RSS</a>
·
<a href="https://twitter.com/home?status=http%3A%2F%2Fyannesposito.com/Scratch/en/blog/01_nanoc/%20via%20@yogsototh" target="_blank" rel="noopener noreferrer nofollow" class="social">Tweet</a>
·
<a href="http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fyannesposito.com/Scratch/en/blog/01_nanoc/" target="_blank" rel="noopener noreferrer nofollow" class="social">FB</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 id="bottom">
<div>
Published on 2008-10-10
</div>
<div>
<a href="https://twitter.com/yogsototh">Follow @yogsototh</a>
</div>
<div>
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/deed.en_US">Yann Esposito©</a>
</div>
<div>
Done with
<a href="http://www.vim.org" target="_blank" rel="noopener noreferrer nofollow"><strike>Vim</strike></a>
<a href="http://spacemacs.org" target="_blank" rel="noopener noreferrer nofollow">spacemacs</a>
<span class="pala">&amp;</span>
<a href="http://nanoc.ws" target="_blank" rel="noopener noreferrer nofollow"><strike>nanoc</strike></a>
<a href="http://jaspervdj.be/hakyll" target="_blank" rel="noopener noreferrer nofollow">Hakyll</a>
</div>
<hr />
<div style="max-width: 100%">
<a href="https://cardanohub.org">
<img src="../../../../Scratch/img/ada-logo.png" class="simple" style="height: 16px;
border-radius: 50%;
vertical-align:middle;
display:inline-block;" />
ADA:
</a>
<code style="display:inline-block;
word-wrap:break-word;
text-align: left;
vertical-align: top;
max-width: 85%;">
DdzFFzCqrhtAvdkmATx5Fm8NPJViDy85ZBw13p4XcNzVzvQg8e3vWLXq23JQWFxPEXK6Kvhaxxe7oJt4VMYHxpA2vtCFiP8fziohN6Yp
</code>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

13
src/Scratch/en/blog/02_ackgrep/code/ack

@ -0,0 +1,13 @@
#!/usr/bin/env zsh
(($#<1)) && { print 'usage: ack "regexp"' >&2; exit 1 }
listeFic=( **/*(.) )
autoload zargs
zargs -- $listeFic -- grep $1 | perl -ne 'use Term::ANSIColor;
if (m/([^:]*)(:.*)('$1')(.*)/) {
print color("green").$1;
print color("reset").$2;
print color("black","on_yellow").$3;
print color("reset").$4."\n";
} '

126
src/Scratch/en/blog/02_ackgrep/index.html

@ -0,0 +1,126 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>YBlog - Better than Grep</title>
<link rel="shortcut icon" type="image/x-icon" href="../../../../Scratch/img/favicon.ico" />
<link rel="stylesheet" type="text/css" href="../../../../Scratch/css/brutalist.css" />
<link rel="stylesheet" type="text/css" href="../../../../Scratch/css/pandoc-solarized.css" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../../../Scratch/en/blog/feed/feed.xml" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" href="../../../../Scratch/img/about/FlatAvatar@2x.png" />
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
<!-- IndieAuth -->
<link href="https://twitter.com/yogsototh" rel="me">
<link href="https://github.com/yogsototh" rel="me">
<link href="mailto:yann.esposito@gmail.com" rel="me">
<link rel="pgpkey" href="../../../../pubkey.txt">
</head>
<body lang="en" class="article">
<div id="content">
<div id="header">
<div id="choix">
<span id="choixlang">
<a href="../../../../Scratch/fr/blog/02_ackgrep/">French</a>
</span>
<span class="tomenu"><a href="#navigation">↓ Menu ↓</a></span>
<span class="flush"></span>
</div>
</div>
<div id="titre">
<h1>Better than Grep</h1>
</div>
<div class="flush"></div>
<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 I’ve got <code>ack</code> on my professional server.</p>
<p>Go on <a href="http://betterthangrep.com">http://betterthangrep.com</a> to download it.</p>
<p>Sincerely, I don’t understand <code>ack</code> don’t become a common command on all UNIX systems. I can no more live without. For me it is as essential as <code>which</code> or <code>find</code>.</p>
<hr />
<h1 id="better-than-grep">Better than grep</h1>
<p>One of the my main usage of <code>grep</code> is</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode zsh"><code class="sourceCode zsh"><a class="sourceLine" id="cb1-1" title="1"><span class="kw">grep</span> <span class="st">'pattern'</span> **/*<span class="kw">(.)</span></a></code></pre></div>
<p>Most of time it is enough. But it is far better with colored output. <code>ack-grep</code> in Ubuntu does that. As I couldn’t install it on my ‘Evil Company Server’, I had done one myself in very few lines:</p>
<pre><code>#!/usr/bin/env zsh
(($#&lt;1)) &amp;&amp; { print 'usage: ack &quot;regexp&quot;' &gt;&amp;2; exit 1 }
listeFic=( **/*(.) )
autoload zargs
zargs -- $listeFic -- grep $1 | perl -ne 'use Term::ANSIColor;
if (m/([^:]*)(:.*)('$1')(.*)/) {
print color(&quot;green&quot;).$1;
print color(&quot;reset&quot;).$2;
print color(&quot;black&quot;,&quot;on_yellow&quot;).$3;
print color(&quot;reset&quot;).$4.&quot;\n&quot;;
} '</code></pre>
<p>For my team and I it is usable enough. I hope it could help.</p>
</div>
<div id="afterarticle">
<div id="social">
<a href="../../../../Scratch/en/blog/feed/feed.xml" target="_blank" rel="noopener noreferrer nofollow" class="social">RSS</a>
·
<a href="https://twitter.com/home?status=http%3A%2F%2Fyannesposito.com/Scratch/en/blog/02_ackgrep/%20via%20@yogsototh" target="_blank" rel="noopener noreferrer nofollow" class="social">Tweet</a>
·
<a href="http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fyannesposito.com/Scratch/en/blog/02_ackgrep/" target="_blank" rel="noopener noreferrer nofollow" class="social">FB</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 id="bottom">
<div>
Published on 2009-07-22
</div>
<div>
<a href="https://twitter.com/yogsototh">Follow @yogsototh</a>
</div>
<div>
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/deed.en_US">Yann Esposito©</a>
</div>
<div>
Done with
<a href="http://www.vim.org" target="_blank" rel="noopener noreferrer nofollow"><strike>Vim</strike></a>
<a href="http://spacemacs.org" target="_blank" rel="noopener noreferrer nofollow">spacemacs</a>
<span class="pala">&amp;</span>
<a href="http://nanoc.ws" target="_blank" rel="noopener noreferrer nofollow"><strike>nanoc</strike></a>
<a href="http://jaspervdj.be/hakyll" target="_blank" rel="noopener noreferrer nofollow">Hakyll</a>
</div>
<hr />
<div style="max-width: 100%">
<a href="https://cardanohub.org">
<img src="../../../../Scratch/img/ada-logo.png" class="simple" style="height: 16px;
border-radius: 50%;
vertical-align:middle;
display:inline-block;" />
ADA:
</a>
<code style="display:inline-block;
word-wrap:break-word;
text-align: left;
vertical-align: top;
max-width: 85%;">
DdzFFzCqrhtAvdkmATx5Fm8NPJViDy85ZBw13p4XcNzVzvQg8e3vWLXq23JQWFxPEXK6Kvhaxxe7oJt4VMYHxpA2vtCFiP8fziohN6Yp
</code>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

189
src/Scratch/en/blog/03_losthighway/index.html

@ -0,0 +1,189 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>YBlog - A try to demystify 'Lost Highway'</title>
<meta name="keywords" content="movie, David Lynch, Lost Highway, alternate reality" />
<link rel="shortcut icon" type="image/x-icon" href="../../../../Scratch/img/favicon.ico" />
<link rel="stylesheet" type="text/css" href="../../../../Scratch/css/brutalist.css" />
<link rel="stylesheet" type="text/css" href="../../../../Scratch/css/pandoc-solarized.css" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../../../Scratch/en/blog/feed/feed.xml" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" href="../../../../Scratch/img/about/FlatAvatar@2x.png" />
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
<!-- IndieAuth -->
<link href="https://twitter.com/yogsototh" rel="me">
<link href="https://github.com/yogsototh" rel="me">
<link href="mailto:yann.esposito@gmail.com" rel="me">
<link rel="pgpkey" href="../../../../pubkey.txt">
</head>
<body lang="en" class="article">
<div id="content">
<div id="header">
<div id="choix">
<span id="choixlang">
<a href="../../../../Scratch/fr/blog/03_losthighway/">French</a>
</span>
<span class="tomenu"><a href="#navigation">↓ Menu ↓</a></span>
<span class="flush"></span>
</div>
</div>
<div id="titre">
<h1>A try to demystify 'Lost Highway'</h1>
<h2>introduction</h2>
</div>
<div class="flush"></div>
<div id="afterheader" class="article">
<div class="corps">
<div>
<img src="../../../../Scratch/img/blog/03_losthighway/intro.jpg" alt="Lost Highway" />
</div>
<div class="small">
<p>…this movie must be watched knowing you’ll cannot resolve the solution. At his best you’ll can suggest an interpretation close to the one of David Lynch.<br />I believe I had found a coherent interpretation which allow to follow the movie without being totally lost. I believed it can give the keys necessary to make its own idea of the movie…</p>
</div>
<p>Lost Higway is a really good movie. You keep watching it event it seem totally obscure. This is one of the strength of David Lynch.</p>
<p>The first time I watched Lost Highway, I was a bit lost. Here some of explanations of Lost Highway I found on the Internet:</p>
<ul>
<li>Fred make a pact with the devil incarnated by the <em>Mysterious Man</em>,</li>
<li><em>Mysterious Man</em> is a video camera,</li>
<li>Just the first part of the story is real. The rest is in the Fred’s imagination,</li>
</ul>
<p>and I don’t speak about many point of view found in forums.</p>
<p>I finished to find two good site talking about this movie. But none of them still totally convinced me:</p>
<ul>
<li>the first is <a href="http://www.mediacircus.net/lh.html">mediacircus</a>,</li>
<li>the second which state almost the same interpretation about the movie and explain with even more details is on <a href="http://www.jasonsweb.com/LostHighway/main.htm">jasonweb</a></li>
</ul>
<p>Nonetheless, this movie must be watched knowing you’ll cannot resolve the solution. At his best you’ll can suggest an interpretation close to the one of David Lynch.</p>
<p>I believe I had found a coherent interpretation which allow to follow the movie <strong>without being totally lost</strong>. I believed it can give the keys necessary to make its own idea of the movie.</p>
<h2 id="the-rorschach-test">The Rorschach test</h2>
<div>
<img src="../../../../Scratch/img/blog/03_losthighway/rorschach.gif" alt="test de Rorschach" class="left" />
</div>
<p>Like the protagonist, everybody see what he want to see in this movie. It is an invitation to think. Watch this movie is a little like watch a Rorschach’s test. What do we see in it? Everybody put its own personnality in the interpretation of the movie.</p>
<ul>
<li>If you are mystic, you’ll see in the mysterious man a devil,</li>
<li>If you are more psychanalytics, you’ll see an inconscient part of the protagonist…</li>
</ul>
<p>Generally, we stay in this movie and we fail explaining everything. There is almost always a point that don’t fit within the interpretation of the movie. This is why trying to find a unique good interpretation of this movie is a mistake.</p>
<h2 id="interprétation-explanation">Interprétation ≠ Explanation</h2>
<p>I give an <strong>interpretation</strong> and not an <strong>explanation</strong>. Just to tell my vision of the movie should be very different from yours. There is certainly many coherent explanations.</p>
<p>I write this post because I believe I had found an interpretation which seems coherent for most of the movie.</p>
<h1 id="movies-keys">Movie’s keys</h1>
<div class="encadre" style="text-align: center">
<p><strong>All is in Fred’s memory</strong></p>
</div>
<p>In a first, it is clear for me, it is not a fantastic movie. If you follow this line, you’ll face many problem explaining some scenes.</p>
<p>My hypothesis is the movie describe the Fred’s representation of reality. Each of his tries to escape reality will fail.</p>
<p>Fred had commited an horrible act, a murder, and try to <em>repair</em> his memory to accepts it. He’ll then create alternative realities.</p>
<ul>
<li>In a first time he kills his wife (Renee) because he believes she cheated at him.</li>
<li>In the second part, he’s weaker and will be manipulated by the blond equivalent of Renee to kill Dick Laurent.</li>
<li>In a third part, he kills Dick Laurent</li>
</ul>
<h2 id="why-this-interpretation-can-be-valid">Why this interpretation can be valid?</h2>
<p>Because of the dialog at the begining of the movie. Cops ask Fred if he’s own a video camera:</p>
<blockquote>
<p>“Do you own a video camera?”<br />
“No, Fred hates them.”<br />
“I like to remember things my own way.”<br />
“What do you mean by that?”<br />
“How I remember them, not necessarily the way they happened.”</p>
</blockquote>
<p>Then, what we see is not reality but the Fred’s perception. Fred is the God of the reality we see. This is why some God/Devil interpretation of the movie works not so bad.</p>
<h2 id="who-is-the-mysterious-man">Who is the mysterious man?</h2>
<div>
<img src="../../../../Scratch/img/blog/03_losthighway/mysteryman.jpg" alt=" " class="left" />
</div>
<p>Who’s this mysterious man? He tells Fred it’s him who invited him in his house. He’s present at the party and in the house of Fred in the same time. Eyes wide open, looking everything Fred’s doing?</p>
<p>It’s a key of the movie. In my humble opinion, I believe it represents the bad part of Fred. Certainly jalousy. If I was catholic, I’ll said he’s Satan. He observe, film but don’t act. He helps Fred to kill Dick Laurent. Fred had let him enter and cannot let him go. As <em>Iago</em> of Shakespeare is imprisonned by its own jalousy. The Mysterious Man help Fred doing the acts of violence. It also force Fred to remember the reality.</p>
<p>When he makes love to his wife (Renee), he sees the face of the Mysterious Man instead of his wife’s face. In reality, it’s the same person for Fred. It should be her who’s the origin of his interior badness.</p>
<h2 id="whos-at-the-origin-of-the-video-tapes">Who’s at the origin of the video tapes?</h2>
<p>Certainly it’s the mysterious man (Fred himself) who makes them. Their reason should be:</p>
<ul>
<li>Remember the reality to Fred. From Fred point-of-view, video tapes are the reality. He tries to forget reality. But, finally, the video tapes go to the end: the murder of his wife.</li>
<li>It may also be a reference to pornographic video tapes, made by Renee.</li>
</ul>
<h2 id="what-really-happened">What really happened?</h2>
<p>There is many possibilities here. But we have many indices. Here is a supposition.</p>
<h3 id="hypothesis">#1 Hypothesis</h3>
<p>The protagonist is a garagist fallen in love with a porno actress. He believe the producer is the bad guy who go again his will. Then he kills Dick Laurent.</p>
<h3 id="hypothesis-1">#2 Hypothesis</h3>
<p>He was really married, he had killed his wife. The the remorse let him create an alternate self, which live in a kind of perfect world. But after the time pass, his obsession about the murder came again. And nobody could know if he had killed Andy or not.</p>
<h2 id="which-one-then">which one then?</h2>
<p>The second hypothesis seems better. We can make much more interpretation with it. It explain in most part the strange phone call from Dick Laurent to Pete. But the first hypothesis remain coherent. And, we should probably make an in depth explanantion using the first hypothesis. And I’m not sure it would be better.</p>
<p>One of the strength of this movie is to understand there is many other coherent hypothesis. It is an expression of the <a href="http://en.wikipedia.org/wiki/Rashomon_effect">Rashomon effect</a>. Many different persons could describe in a coherent manner what they saw. But each description contradicts the others.</p>
<hr />
<h2 id="conclusion">Conclusion</h2>
<p>There is much to tell about this movie. But I believe I put all essential keys here. It is a proof this movie is not a random one.</p>
<p>I believe it is essential to remember the “test of Rorschach effet” when watching this movie.</p>
<p>I’d like to know or opinion ; is my interpration wrong?</p>
</div>
<div id="afterarticle">
<div id="social">
<a href="../../../../Scratch/en/blog/feed/feed.xml" target="_blank" rel="noopener noreferrer nofollow" class="social">RSS</a>
·
<a href="https://twitter.com/home?status=http%3A%2F%2Fyannesposito.com/Scratch/en/blog/03_losthighway/%20via%20@yogsototh" target="_blank" rel="noopener noreferrer nofollow" class="social">Tweet</a>
·
<a href="http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fyannesposito.com/Scratch/en/blog/03_losthighway/" target="_blank" rel="noopener noreferrer nofollow" class="social">FB</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 id="bottom">
<div>
Published on 2009-08-04
</div>
<div>
<a href="https://twitter.com/yogsototh">Follow @yogsototh</a>
</div>
<div>
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/deed.en_US">Yann Esposito©</a>
</div>
<div>
Done with
<a href="http://www.vim.org" target="_blank" rel="noopener noreferrer nofollow"><strike>Vim</strike></a>
<a href="http://spacemacs.org" target="_blank" rel="noopener noreferrer nofollow">spacemacs</a>
<span class="pala">&amp;</span>
<a href="http://nanoc.ws" target="_blank" rel="noopener noreferrer nofollow"><strike>nanoc</strike></a>
<a href="http://jaspervdj.be/hakyll" target="_blank" rel="noopener noreferrer nofollow">Hakyll</a>
</div>
<hr />
<div style="max-width: 100%">
<a href="https://cardanohub.org">
<img src="../../../../Scratch/img/ada-logo.png" class="simple" style="height: 16px;
border-radius: 50%;
vertical-align:middle;
display:inline-block;" />
ADA:
</a>
<code style="display:inline-block;
word-wrap:break-word;
text-align: left;
vertical-align: top;
max-width: 85%;">
DdzFFzCqrhtAvdkmATx5Fm8NPJViDy85ZBw13p4XcNzVzvQg8e3vWLXq23JQWFxPEXK6Kvhaxxe7oJt4VMYHxpA2vtCFiP8fziohN6Yp
</code>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

118
src/Scratch/en/blog/04_drm/index.html

@ -0,0 +1,118 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>YBlog - DRM are EVIL</title>
<meta name="keywords" content="drm, protection, iTunes, Apple" />
<link rel="shortcut icon" type="image/x-icon" href="../../../../Scratch/img/favicon.ico" />
<link rel="stylesheet" type="text/css" href="../../../../Scratch/css/brutalist.css" />
<link rel="stylesheet" type="text/css" href="../../../../Scratch/css/pandoc-solarized.css" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../../../Scratch/en/blog/feed/feed.xml" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" href="../../../../Scratch/img/about/FlatAvatar@2x.png" />
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
<!-- IndieAuth -->
<link href="https://twitter.com/yogsototh" rel="me">
<link href="https://github.com/yogsototh" rel="me">
<link href="mailto:yann.esposito@gmail.com" rel="me">
<link rel="pgpkey" href="../../../../pubkey.txt">
</head>
<body lang="en" class="article">
<div id="content">
<div id="header">
<div id="choix">
<span id="choixlang">
<a href="../../../../Scratch/fr/blog/04_drm/">French</a>
</span>
<span class="tomenu"><a href="#navigation">↓ Menu ↓</a></span>
<span class="flush"></span>
</div>
</div>
<div id="titre">
<h1>DRM are EVIL</h1>
<h2>DRM are bad (+1)</h2>
</div>
<div class="flush"></div>
<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>
<div class="encadre">
<p style="text-align: center; font-size: 5em">
<strong>WTF?</strong>
</p>
</div>
<p>Result, my wife would never buy any TV show on iTunes. She don’t like DVD because it is not as easy to buy and to use than to simply download episodes.</p>
<div class="encadre">
<p>Therefore far less money for you EVIL Copyrighter!!!!!</p>
</div>
<p>My wife won’t see these episodes.<br /> This is a <strong>‘LOSE-LOSE’</strong> cooperation.</p>
</div>
<div id="afterarticle">
<div id="social">
<a href="../../../../Scratch/en/blog/feed/feed.xml" target="_blank" rel="noopener noreferrer nofollow" class="social">RSS</a>
·
<a href="https://twitter.com/home?status=http%3A%2F%2Fyannesposito.com/Scratch/en/blog/04_drm/%20via%20@yogsototh" target="_blank" rel="noopener noreferrer nofollow" class="social">Tweet</a>
·
<a href="http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fyannesposito.com/Scratch/en/blog/04_drm/" target="_blank" rel="noopener noreferrer nofollow" class="social">FB</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 id="bottom">
<div>
Published on 2009-08-15
</div>
<div>
<a href="https://twitter.com/yogsototh">Follow @yogsototh</a>
</div>
<div>
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/deed.en_US">Yann Esposito©</a>
</div>
<div>
Done with
<a href="http://www.vim.org" target="_blank" rel="noopener noreferrer nofollow"><strike>Vim</strike></a>
<a href="http://spacemacs.org" target="_blank" rel="noopener noreferrer nofollow">spacemacs</a>
<span class="pala">&amp;</span>
<a href="http://nanoc.ws" target="_blank" rel="noopener noreferrer nofollow"><strike>nanoc</strike></a>
<a href="http://jaspervdj.be/hakyll" target="_blank" rel="noopener noreferrer nofollow">Hakyll</a>
</div>
<hr />
<div style="max-width: 100%">
<a href="https://cardanohub.org">
<img src="../../../../Scratch/img/ada-logo.png" class="simple" style="height: 16px;
border-radius: 50%;
vertical-align:middle;
display:inline-block;" />
ADA:
</a>
<code style="display:inline-block;
word-wrap:break-word;
text-align: left;
vertical-align: top;
max-width: 85%;">
DdzFFzCqrhtAvdkmATx5Fm8NPJViDy85ZBw13p4XcNzVzvQg8e3vWLXq23JQWFxPEXK6Kvhaxxe7oJt4VMYHxpA2vtCFiP8fziohN6Yp
</code>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

13
src/Scratch/en/blog/05_git_create_remote_branch/code/git-create-new-branch.sh

@ -0,0 +1,13 @@
#!/usr/bin/env zsh
if (($#<1)); then
print -- "usage: $0:t branch_name" >&2
exit 1
fi
branch=$1
git br ${branch}
git co ${branch}
git config branch.${branch}.remote origin
git config branch.${branch}.merge refs/heads/${branch}

122
src/Scratch/en/blog/05_git_create_remote_branch/index.html

@ -0,0 +1,122 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>YBlog - Git remote branch creation</title>
<meta name="keywords" content="git, branch, local, remote" />
<link rel="shortcut icon" type="image/x-icon" href="../../../../Scratch/img/favicon.ico" />
<link rel="stylesheet" type="text/css" href="../../../../Scratch/css/brutalist.css" />
<link rel="stylesheet" type="text/css" href="../../../../Scratch/css/pandoc-solarized.css" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../../../Scratch/en/blog/feed/feed.xml" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" href="../../../../Scratch/img/about/FlatAvatar@2x.png" />
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
<!-- IndieAuth -->
<link href="https://twitter.com/yogsototh" rel="me">
<link href="https://github.com/yogsototh" rel="me">
<link href="mailto:yann.esposito@gmail.com" rel="me">
<link rel="pgpkey" href="../../../../pubkey.txt">
</head>
<body lang="en" class="article">
<div id="content">
<div id="header">
<div id="choix">
<span id="choixlang">
<a href="../../../../Scratch/fr/blog/05_git_create_remote_branch/">French</a>
</span>
<span class="tomenu"><a href="#navigation">↓ Menu ↓</a></span>
<span class="flush"></span>
</div>
</div>
<div id="titre">
<h1>Git remote branch creation</h1>
</div>
<div class="flush"></div>
<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>
<p>Here is the script I use to achieve that:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode zsh"><code class="sourceCode zsh"><a class="sourceLine" id="cb1-1" title="1"><span class="co">#!/usr/bin/env zsh</span></a>
<a class="sourceLine" id="cb1-2" title="2"></a>
<a class="sourceLine" id="cb1-3" title="3"><span class="kw">if</span> <span class="kw">((</span><span class="ot">$#</span>&lt;1<span class="kw">))</span>; <span class="kw">then</span></a>
<a class="sourceLine" id="cb1-4" title="4"> <span class="kw">print</span> -- <span class="st">&quot;usage: </span><span class="ot">$0</span><span class="st">:t branch_name&quot;</span> <span class="kw">&gt;&amp;2</span></a>
<a class="sourceLine" id="cb1-5" title="5"> <span class="kw">exit</span> 1</a>
<a class="sourceLine" id="cb1-6" title="6"><span class="kw">fi</span></a>
<a class="sourceLine" id="cb1-7" title="7"></a>
<a class="sourceLine" id="cb1-8" title="8"><span class="ot">branch=$1</span></a>
<a class="sourceLine" id="cb1-9" title="9">git br <span class="ot">${branch}</span></a>
<a class="sourceLine" id="cb1-10" title="10">git <span class="kw">co</span> <span class="ot">${branch}</span></a>
<a class="sourceLine" id="cb1-11" title="11">git config branch.<span class="ot">${branch}</span>.remote origin</a>
<a class="sourceLine" id="cb1-12" title="12">git config branch.<span class="ot">${branch}</span>.merge refs/heads/<span class="ot">${branch}</span></a></code></pre></div>
<p>Of course, I suppose <code>origin</code> is already configured.</p>
<p><em>Edit: Now I use <code>git push -u</code></em></p>
</div>
<div id="afterarticle">
<div id="social">
<a href="../../../../Scratch/en/blog/feed/feed.xml" target="_blank" rel="noopener noreferrer nofollow" class="social">RSS</a>
·
<a href="https://twitter.com/home?status=http%3A%2F%2Fyannesposito.com/Scratch/en/blog/05_git_create_remote_branch/%20via%20@yogsototh" target="_blank" rel="noopener noreferrer nofollow" class="social">Tweet</a>
·
<a href="http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fyannesposito.com/Scratch/en/blog/05_git_create_remote_branch/" target="_blank" rel="noopener noreferrer nofollow" class="social">FB</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 id="bottom">
<div>
Published on 2009-08-17
</div>
<div>
<a href="https://twitter.com/yogsototh">Follow @yogsototh</a>
</div>
<div>
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/deed.en_US">Yann Esposito©</a>
</div>
<div>
Done with
<a href="http://www.vim.org" target="_blank" rel="noopener noreferrer nofollow"><strike>Vim</strike></a>
<a href="http://spacemacs.org" target="_blank" rel="noopener noreferrer nofollow">spacemacs</a>
<span class="pala">&amp;</span>
<a href="http://nanoc.ws" target="_blank" rel="noopener noreferrer nofollow"><strike>nanoc</strike></a>
<a href="http://jaspervdj.be/hakyll" target="_blank" rel="noopener noreferrer nofollow">Hakyll</a>
</div>
<hr />
<div style="max-width: 100%">
<a href="https://cardanohub.org">
<img src="../../../../Scratch/img/ada-logo.png" class="simple" style="height: 16px;
border-radius: 50%;
vertical-align:middle;
display:inline-block;" />
ADA:
</a>
<code style="display:inline-block;
word-wrap:break-word;
text-align: left;
vertical-align: top;
max-width: 85%;">
DdzFFzCqrhtAvdkmATx5Fm8NPJViDy85ZBw13p4XcNzVzvQg8e3vWLXq23JQWFxPEXK6Kvhaxxe7oJt4VMYHxpA2vtCFiP8fziohN6Yp
</code>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

12
src/Scratch/en/blog/06_How_I_use_git/code/git-create-new-branch

@ -0,0 +1,12 @@
#!/usr/bin/env zsh
if (($#<1)); then
print -- "usage: $0:t branch_name" >&2
exit 1
fi
branch=$1
git br ${branch}
git co ${branch}
git config branch.${branch}.remote origin
git config branch.${branch}.merge refs/heads/${branch}

13
src/Scratch/en/blog/06_How_I_use_git/code/git-get-remote-branches

@ -0,0 +1,13 @@
#!/usr/bin/env zsh
# recup branches not on local
localbranches=( $(git br | sed 's/\*/ /') )
remoteMissingBranches=( $(git br -r | \
egrep -v "origin/HEAD|(${(j:|:)localbranches})" ) )
for br in $remoteMissingBranches; do
branch=${br#origin/}
print "get remote branch $branch"
git br ${branch}
git config branch.${branch}.remote origin
git config branch.${branch}.merge refs/heads/${branch}
done

213
src/Scratch/en/blog/06_How_I_use_git/index.html

@ -0,0 +1,213 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>YBlog - Git for self</title>
<meta name="keywords" content="git, svn, workflow" />
<link rel="shortcut icon" type="image/x-icon" href="../../../../Scratch/img/favicon.ico" />
<link rel="stylesheet" type="text/css" href="../../../../Scratch/css/brutalist.css" />
<link rel="stylesheet" type="text/css" href="../../../../Scratch/css/pandoc-solarized.css" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../../../Scratch/en/blog/feed/feed.xml" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" href="../../../../Scratch/img/about/FlatAvatar@2x.png" />
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
<!-- IndieAuth -->
<link href="https://twitter.com/yogsototh" rel="me">
<link href="https://github.com/yogsototh" rel="me">
<link href="mailto:yann.esposito@gmail.com" rel="me">
<link rel="pgpkey" href="../../../../pubkey.txt">
</head>
<body lang="en" class="article">
<div id="content">
<div id="header">
<div id="choix">
<span id="choixlang">
<a href="../../../../Scratch/fr/blog/06_How_I_use_git/">French</a>
</span>
<span class="tomenu"><a href="#navigation">↓ Menu ↓</a></span>
<span class="flush"></span>
</div>
</div>
<div id="titre">
<h1>Git for self</h1>
</div>
<div class="flush"></div>
<div id="afterheader" class="article">
<div class="corps">
<div>
<img src="../../../../Scratch/img/blog/06_How_I_use_git/central_architecture.png" alt="central architecture" />
</div>
<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 didn’t find clearly what I needed on the official Git documentation.</p>
<p>In two words, if you want to use an SVN workflow with Git (and all its advantages) here is how to proceed.</p>
<hr />
<h2 id="initialisation">Initialisation</h2>
<p>Suppose I’ve got a directory on my local computer containing a project I want to manage via Git. Here what to do:</p>
<div>
<div class="sourceCode" id="cb1"><pre class="sourceCode zsh"><code class="sourceCode zsh"><a class="sourceLine" id="cb1-1" title="1"><span class="kw">cd</span> to/project/directory/</a>
<a class="sourceLine" id="cb1-2" title="2">git init</a>
<a class="sourceLine" id="cb1-3" title="3">git add</a>
<a class="sourceLine" id="cb1-4" title="4">git commit</a></code></pre></div>
</div>
<p>Now all files in the <code>to/project/directory/</code> are versionned. If you want not to follow some just edit the file <code>.gitignore</code></p>
<p>for example mine is:</p>
<div>
<div class="sourceCode" id="cb2"><pre class="sourceCode zsh"><code class="sourceCode zsh"><a class="sourceLine" id="cb2-1" title="1">*.swp</a>
<a class="sourceLine" id="cb2-2" title="2">.DS_Store</a>
<a class="sourceLine" id="cb2-3" title="3">ikog.py.bak</a>
<a class="sourceLine" id="cb2-4" title="4">output/Scratch/assets</a>
<a class="sourceLine" id="cb2-5" title="5">output/Scratch/en</a>
<a class="sourceLine" id="cb2-6" title="6">output/Scratch/fr</a>
<a class="sourceLine" id="cb2-7" title="7">output/Scratch/multi</a></code></pre></div>
</div>
<p>Next, you want to put your project on a directory accessible from the web:</p>
<div>
<div class="sourceCode" id="cb3"><pre class="sourceCode zsh"><code class="sourceCode zsh"><a class="sourceLine" id="cb3-1" title="1">git <span class="kw">clone</span> --bare <span class="kw">.</span> /path/to/repository</a></code></pre></div>
</div>
<p>Now on any computer you can do:</p>
<div>
<div class="sourceCode" id="cb4"><pre class="sourceCode zsh"><code class="sourceCode zsh"><a class="sourceLine" id="cb4-1" title="1">git <span class="kw">clone</span> protocol://path/to/repository local_directory</a></code></pre></div>
</div>
<p>and <code>local_directory</code> will contain an up-to-date project.</p>
<div class="encadre">
<p><em> You should make this operation also on the computer used to create the repository. Just to verify all will be okay.</p>
<p></em></p>
</div>
<hr />
<h2 id="the-workflow">The workflow</h2>
<p>To resume you now have one repository on the Internet, and one or many computer associated with it. Now, what you want is to synchronize everything.</p>
<p>Before begining your work, the first thing to do is to get all modification from the Internet to your local host:</p>
<div>
<div class="sourceCode" id="cb5"><pre class="sourceCode zsh"><code class="sourceCode zsh"><a class="sourceLine" id="cb5-1" title="1">git pull</a></code></pre></div>
</div>
<p>After that you can do (many times):</p>
<div>
<div class="sourceCode" id="cb6"><pre class="sourceCode zsh"><code class="sourceCode zsh"><a class="sourceLine" id="cb6-1" title="1">hack, hack, hack...</a>
<a class="sourceLine" id="cb6-2" title="2">git add some files</a>
<a class="sourceLine" id="cb6-3" title="3">git commit</a></code></pre></div>
</div>
<p>When you want your local modification to be on the Internet just do a simple:</p>
<div>
<div class="sourceCode" id="cb7"><pre class="sourceCode zsh"><code class="sourceCode zsh"><a class="sourceLine" id="cb7-1" title="1">git push</a></code></pre></div>
</div>
<p>All should be ok.</p>
<p>If you have some trouble with the <code>push</code> and <code>pull</code> verify your <code>.git/config</code> file ; it should contain the following lines:</p>
<div>
<div class="sourceCode" id="cb8"><pre class="sourceCode zsh"><code class="sourceCode zsh"><a class="sourceLine" id="cb8-1" title="1">...</a>
<a class="sourceLine" id="cb8-2" title="2">[remote <span class="st">&quot;origin&quot;</span>]</a>
<a class="sourceLine" id="cb8-3" title="3"> url = protocol://url/of/the/repository</a>
<a class="sourceLine" id="cb8-4" title="4"> fetch = +refs/heads/*:refs/remotes/origin/*</a>
<a class="sourceLine" id="cb8-5" title="5">[branch <span class="st">&quot;master&quot;</span>]</a>
<a class="sourceLine" id="cb8-6" title="6"> remote = origin</a>
<a class="sourceLine" id="cb8-7" title="7"> merge = refs/heads/master</a>
<a class="sourceLine" id="cb8-8" title="8">...</a></code></pre></div>
</div>
<h2 id="branches-synchronisation">Branches Synchronisation</h2>
<p>Well, now, all seems ok, but you have to worry about two little things. Git is all about decentralisation and branches. It is very easy to manage one branch, or many branches on the same host. But synchronize branches on many hosts is not a natural operation.</p>
<p>This is why I created two simple scripts to automate this. One for creating a branch locally and remotely. And one to get remotely created branched on your local host.</p>
<p>Then when you want to create a new branch (locally and remotely) ; you simply have to do a:</p>
<div>
<code class="zsh">git-create-new-branch branch_name</code>
</div>
<p>and when you are on another computer and want to get locally all the remote branches you execute:</p>
<div>
<code class="zsh">git-get-remote-branches</code>
</div>
<p>Here are the code of theese two scripts:</p>
<div>
<div class="sourceCode" id="cb9"><pre class="sourceCode zsh"><code class="sourceCode zsh"><a class="sourceLine" id="cb9-1" title="1"><span class="co">#!/usr/bin/env zsh</span></a>
<a class="sourceLine" id="cb9-2" title="2"></a>
<a class="sourceLine" id="cb9-3" title="3"><span class="kw">if</span> <span class="kw">((</span><span class="ot">$#</span>&lt;1<span class="kw">))</span>; <span class="kw">then</span></a>
<a class="sourceLine" id="cb9-4" title="4"> <span class="kw">print</span> -- <span class="st">&quot;usage: </span><span class="ot">$0</span><span class="st">:t branch_name&quot;</span> <span class="kw">&gt;&amp;2</span></a>
<a class="sourceLine" id="cb9-5" title="5"> <span class="kw">exit</span> 1</a>
<a class="sourceLine" id="cb9-6" title="6"><span class="kw">fi</span></a>
<a class="sourceLine" id="cb9-7" title="7"></a>
<a class="sourceLine" id="cb9-8" title="8"><span class="ot">branch=$1</span></a>
<a class="sourceLine" id="cb9-9" title="9">git br <span class="ot">${branch}</span></a>
<a class="sourceLine" id="cb9-10" title="10">git <span class="kw">co</span> <span class="ot">${branch}</span></a>
<a class="sourceLine" id="cb9-11" title="11">git config branch.<span class="ot">${branch}</span>.remote origin</a>
<a class="sourceLine" id="cb9-12" title="12">git config branch.<span class="ot">${branch}</span>.merge refs/heads/<span class="ot">${branch}</span></a></code></pre></div>
</div>
<div>
<div class="sourceCode" id="cb10"><pre class="sourceCode zsh"><code class="sourceCode zsh"><a class="sourceLine" id="cb10-1" title="1"><span class="co">#!/usr/bin/env zsh</span></a>
<a class="sourceLine" id="cb10-2" title="2"></a>
<a class="sourceLine" id="cb10-3" title="3"><span class="co"># recup branches not on local</span></a>
<a class="sourceLine" id="cb10-4" title="4"><span class="ot">localbranches=(</span> <span class="ot">$(</span>git br <span class="kw">|</span> <span class="kw">sed</span> <span class="st">'s/\*/ /'</span><span class="ot">)</span> <span class="ot">)</span></a>
<a class="sourceLine" id="cb10-5" title="5"><span class="ot">remoteMissingBranches=(</span> <span class="ot">$(</span>git br -r <span class="kw">|</span> <span class="kw">\</span></a>
<a class="sourceLine" id="cb10-6" title="6"> <span class="kw">egrep</span> -v <span class="st">&quot;origin/HEAD|(${(j:|:)localbranches})&quot;</span> <span class="ot">)</span> <span class="ot">)</span></a>
<a class="sourceLine" id="cb10-7" title="7"><span class="kw">for</span> br <span class="kw">in</span> <span class="ot">$remoteMissingBranches</span>; <span class="kw">do</span></a>
<a class="sourceLine" id="cb10-8" title="8"> <span class="ot">branch=${br#</span>origin/<span class="ot">}</span></a>
<a class="sourceLine" id="cb10-9" title="9"> <span class="kw">print</span> <span class="st">&quot;get remote branch </span><span class="ot">$branch</span><span class="st">&quot;</span></a>
<a class="sourceLine" id="cb10-10" title="10"> git br <span class="ot">${branch}</span></a>
<a class="sourceLine" id="cb10-11" title="11"> git config branch.<span class="ot">${branch}</span>.remote origin</a>
<a class="sourceLine" id="cb10-12" title="12"> git config branch.<span class="ot">${branch}</span>.merge refs/heads/<span class="ot">${branch}</span></a>
<a class="sourceLine" id="cb10-13" title="13"><span class="kw">done</span></a></code></pre></div>
</div>
</div>
<div id="afterarticle">
<div id="social">
<a href="../../../../Scratch/en/blog/feed/feed.xml" target="_blank" rel="noopener noreferrer nofollow" class="social">RSS</a>
·
<a href="https://twitter.com/home?status=http%3A%2F%2Fyannesposito.com/Scratch/en/blog/06_How_I_use_git/%20via%20@yogsototh" target="_blank" rel="noopener noreferrer nofollow" class="social">Tweet</a>
·
<a href="http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fyannesposito.com/Scratch/en/blog/06_How_I_use_git/" target="_blank" rel="noopener noreferrer nofollow" class="social">FB</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 id="bottom">
<div>
Published on 2009-08-18
</div>
<div>
<a href="https://twitter.com/yogsototh">Follow @yogsototh</a>
</div>
<div>
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/deed.en_US">Yann Esposito©</a>
</div>
<div>
Done with
<a href="http://www.vim.org" target="_blank" rel="noopener noreferrer nofollow"><strike>Vim</strike></a>
<a href="http://spacemacs.org" target="_blank" rel="noopener noreferrer nofollow">spacemacs</a>
<span class="pala">&amp;</span>
<a href="http://nanoc.ws" target="_blank" rel="noopener noreferrer nofollow"><strike>nanoc</strike></a>
<a href="http://jaspervdj.be/hakyll" target="_blank" rel="noopener noreferrer nofollow">Hakyll</a>
</div>
<hr />
<div style="max-width: 100%">
<a href="https://cardanohub.org">
<img src="../../../../Scratch/img/ada-logo.png" class="simple" style="height: 16px;
border-radius: 50%;
vertical-align:middle;
display:inline-block;" />
ADA:
</a>
<code style="display:inline-block;
word-wrap:break-word;
text-align: left;
vertical-align: top;
max-width: 85%;">
DdzFFzCqrhtAvdkmATx5Fm8NPJViDy85ZBw13p4XcNzVzvQg8e3vWLXq23JQWFxPEXK6Kvhaxxe7oJt4VMYHxpA2vtCFiP8fziohN6Yp
</code>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

113
src/Scratch/en/blog/07_Screensaver_compilation_option_for_Snow_Leopard/index.html