Commit 0a8316d2 authored by antoine masson youmi's avatar antoine masson youmi
Browse files

add saving loging

parent d095eb89
Pipeline #29 passed with stage
in 11 minutes and 4 seconds
I"<p>Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents. Created by John Gruber in 2004, Markdown is now one of the world’s most popular markup languages. It is used in many platforms like GitHub.</p>
<p>Using Markdown is different than using a WYSIWYG editor. In an application like Microsoft Word, you click buttons to format words and phrases, and the changes are visible immediately. Markdown isn’t like that. When you create a Markdown-formatted file, you add Markdown syntax to the text to indicate which words and phrases should look different.</p>
<p>For instance, to denote a heading, you add a number sign before it (e.g., <code class="highlighter-rouge"># Heading One</code>). Or to make a phrase bold, you add two asterisks before and after it (e.g., <code class="highlighter-rouge">**this text is bold**</code>).</p>
<p>You want to try ? You can use <a href="https://dillinger.io/">dillinger</a></p>
<p>Markdown files are just regular text files with the <code class="highlighter-rouge">.md</code> extension.</p>
<h3 id="some-examples">Some examples</h3>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>* Use asterisks
* to create
* bullet lists.
</code></pre></div> </div>
</div>
<div class="col-md-6">
<ul>
<li>Use asterisks</li>
<li>to create</li>
<li>bullet lists.</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>1. Use numbers
1. to create
1. numbered lists.
</code></pre></div> </div>
</div>
<div class="col-md-6">
<ol>
<li>Use numbers</li>
<li>to create</li>
<li>numbered lists.</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>* You can use indents
* To create sublists
* of the same type
* Or sublists
1. Of different
1. types
</code></pre></div> </div>
</div>
<div class="col-md-6">
<ul>
<li>You can use indents
<ul>
<li>To create sublists</li>
<li>of the same type</li>
</ul>
</li>
<li>Or sublists
<ol>
<li>Of different</li>
<li>types</li>
</ol>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code># A Level-1 Heading
</code></pre></div> </div>
</div>
<div class="col-md-6">
<h1 id="a-level-1-heading">A Level-1 Heading</h1>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>## A Level-2 Heading (etc.)
</code></pre></div> </div>
</div>
<div class="col-md-6">
<h2 id="a-level-2-heading-etc">A Level-2 Heading (etc.)</h2>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Line breaks
don't matter.
But blank lines
create new paragraphs.
</code></pre></div> </div>
</div>
<div class="col-md-6">
<p>Line breaks
don’t matter.</p>
<p>But blank lines
create new paragraphs.</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[Create links](http://software-carpentry.org) with `[...](...)`.
Or use [named links][data_carpentry].
[data_carpentry]: http://datacarpentry.org
</code></pre></div> </div>
</div>
<div class="col-md-6">
<p><a href="http://software-carpentry.org">Create links</a> with <code class="highlighter-rouge">[...](...)</code>.
Or use <a href="http://datacarpentry.org">named links</a>.</p>
</div>
</div>
<h3 id="to-know-more">To know more</h3>
<ul>
<li>
<p><a href="https://www.markdownguide.org/">markdownguide</a> a website with introduction, commands, and tools for markdown</p>
</li>
<li>
<p><a href="https://guides.github.com/pdfs/markdown-cheatsheet-online.pdf">Markdown GitHub cheatsheet</a> presents the markdown commands</p>
</li>
</ul>
<blockquote class="challenge">
<h2 id="creating-lists-in-markdown">Creating Lists in Markdown</h2>
<p>Create a nested list in a Markdown cell in a notebook that looks like this:</p>
<ol>
<li>Get funding.</li>
<li>Do work.
<ul>
<li>Design experiment.</li>
<li>Collect data.</li>
<li>Analyze.</li>
</ul>
</li>
<li>Write up.</li>
<li>Publish.</li>
</ol>
<blockquote class="solution">
<h2 id="solution">Solution</h2>
<p>This challenge integrates both the numbered list and bullet list.
Note that the bullet list is indented 2 spaces so that it is inline with the items of the numbered list.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>1. Get funding.
2. Do work.
* Design experiment.
* Collect data.
* Analyze.
3. Write up.
4. Publish.
</code></pre></div> </div>
</blockquote>
</blockquote>
:ET
\ No newline at end of file
I"<p>Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents. Created by John Gruber in 2004, Markdown is now one of the world’s most popular markup languages. It is used in many platforms like GitHub.</p>
<p>Using Markdown is different than using a WYSIWYG editor. In an application like Microsoft Word, you click buttons to format words and phrases, and the changes are visible immediately. Markdown isn’t like that. When you create a Markdown-formatted file, you add Markdown syntax to the text to indicate which words and phrases should look different.</p>
<p>For instance, to denote a heading, you add a number sign before it (e.g., <code class="highlighter-rouge"># Heading One</code>). Or to make a phrase bold, you add two asterisks before and after it (e.g., <code class="highlighter-rouge">**this text is bold**</code>).</p>
<p>You want to try ? You can use <a href="https://dillinger.io/">dillinger</a></p>
<h3 id="some-examples">Some examples</h3>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>* Use asterisks
* to create
* bullet lists.
</code></pre></div> </div>
</div>
<div class="col-md-6">
<ul>
<li>Use asterisks</li>
<li>to create</li>
<li>bullet lists.</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>1. Use numbers
1. to create
1. numbered lists.
</code></pre></div> </div>
</div>
<div class="col-md-6">
<ol>
<li>Use numbers</li>
<li>to create</li>
<li>numbered lists.</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>* You can use indents
* To create sublists
* of the same type
* Or sublists
1. Of different
1. types
</code></pre></div> </div>
</div>
<div class="col-md-6">
<ul>
<li>You can use indents
<ul>
<li>To create sublists</li>
<li>of the same type</li>
</ul>
</li>
<li>Or sublists
<ol>
<li>Of different</li>
<li>types</li>
</ol>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code># A Level-1 Heading
</code></pre></div> </div>
</div>
<div class="col-md-6">
<h1 id="a-level-1-heading">A Level-1 Heading</h1>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>## A Level-2 Heading (etc.)
</code></pre></div> </div>
</div>
<div class="col-md-6">
<h2 id="a-level-2-heading-etc">A Level-2 Heading (etc.)</h2>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Line breaks
don't matter.
But blank lines
create new paragraphs.
</code></pre></div> </div>
</div>
<div class="col-md-6">
<p>Line breaks
don’t matter.</p>
<p>But blank lines
create new paragraphs.</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[Create links](http://software-carpentry.org) with `[...](...)`.
Or use [named links][data_carpentry].
[data_carpentry]: http://datacarpentry.org
</code></pre></div> </div>
</div>
<div class="col-md-6">
<p><a href="http://software-carpentry.org">Create links</a> with <code class="highlighter-rouge">[...](...)</code>.
Or use <a href="http://datacarpentry.org">named links</a>.</p>
</div>
</div>
<h3 id="to-know-more">To know more</h3>
<ul>
<li>
<p><a href="https://www.markdownguide.org/">markdownguide</a> a website with introduction, commands, and tools for markdown</p>
</li>
<li>
<p><a href="https://guides.github.com/pdfs/markdown-cheatsheet-online.pdf">Markdown GitHub cheatsheet</a> presents the markdown commands</p>
</li>
</ul>
<blockquote class="challenge">
<h2 id="creating-lists-in-markdown">Creating Lists in Markdown</h2>
<p>Create a nested list in a Markdown cell in a notebook that looks like this:</p>
<ol>
<li>Get funding.</li>
<li>Do work.
<ul>
<li>Design experiment.</li>
<li>Collect data.</li>
<li>Analyze.</li>
</ul>
</li>
<li>Write up.</li>
<li>Publish.</li>
</ol>
<blockquote class="solution">
<h2 id="solution">Solution</h2>
<p>This challenge integrates both the numbered list and bullet list.
Note that the bullet list is indented 2 spaces so that it is inline with the items of the numbered list.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>1. Get funding.
2. Do work.
* Design experiment.
* Collect data.
* Analyze.
3. Write up.
4. Publish.
</code></pre></div> </div>
</blockquote>
</blockquote>
:ET
\ No newline at end of file
I"'<p>When we use Git on a new computer for the first time,
we need to configure a few things. Below are a few examples
of configurations we will set as we get started with Git:</p>
<ul>
<li>our name and email address,</li>
<li>what our preferred text editor is,</li>
<li>and that we want to use these settings globally (i.e. for every project).</li>
</ul>
<p>On a command line, Git commands are written as <code class="highlighter-rouge">git verb options</code>,
where <code class="highlighter-rouge">verb</code> is what we actually want to do and <code class="highlighter-rouge">options</code> is additional optional information which may be needed for the <code class="highlighter-rouge">verb</code>. So here is how
Dracula sets up his new laptop:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>git config <span class="nt">--global</span> user.name <span class="s2">"Vlad Dracula"</span>
<span class="nv">$ </span>git config <span class="nt">--global</span> user.email <span class="s2">"vlad@tran.sylvan.ia"</span>
</code></pre></div></div>
<p>Please use your own name and email address instead of Dracula’s. This user name and email will be associated with your subsequent Git activity,
which means that any changes pushed to
<a href="https://github.com/">GitHub</a>,
<a href="https://bitbucket.org/">BitBucket</a>,
<a href="https://gitlab.com/">GitLab</a> or
another Git host server
in a later lesson will include this information.</p>
<p>For these lessons, we will be interacting with <a href="https://github.com/">GitHub</a> and so the email address used should be the same as the one used when setting up your GitHub account. If you are concerned about privacy, please review <a href="https://help.github.com/articles/keeping-your-email-address-private/">GitHub’s instructions for keeping your email address private</a>.</p>
<blockquote class="callout">
<h2 id="keeping-your-email-private">Keeping your email private</h2>
<p>If you elect to use a private email address with GitHub, then use that same email address for the <code class="highlighter-rouge">user.email</code> value, e.g. <code class="highlighter-rouge">username@users.noreply.github.com</code> replacing <code class="highlighter-rouge">username</code> with your GitHub one.</p>
</blockquote>
<blockquote class="callout">
<h2 id="line-endings">Line Endings</h2>
<p>As with other keys, when you hit <kbd>Return</kbd> on your keyboard,
your computer encodes this input as a character.
Different operating systems use different character(s) to represent the end of a line.
(You may also hear these referred to as newlines or line breaks.)
Because Git uses these characters to compare files,
it may cause unexpected issues when editing a file on different machines.
Though it is beyond the scope of this lesson, you can read more about this issue
<a href="https://help.github.com/articles/dealing-with-line-endings/">on this GitHub page</a>.</p>
</blockquote>
<blockquote>
<p>You can change the way Git recognizes and encodes line endings
using the <code class="highlighter-rouge">core.autocrlf</code> command to <code class="highlighter-rouge">git config</code>.
The following settings are recommended:</p>
<p>On macOS and Linux:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>git config <span class="nt">--global</span> core.autocrlf input
</code></pre></div> </div>
<p>And on Windows:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>git config <span class="nt">--global</span> core.autocrlf <span class="nb">true</span>
</code></pre></div> </div>
</blockquote>
<p>Dracula also has to set his favorite text editor, following this table:</p>
<table>
<thead>
<tr>
<th style="text-align: left">Editor</th>
<th style="text-align: left">Configuration command</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">Atom</td>
<td style="text-align: left"><code class="highlighter-rouge">$ git config --global core.editor "atom --wait"</code></td>
</tr>
<tr>
<td style="text-align: left">nano</td>
<td style="text-align: left"><code class="highlighter-rouge">$ git config --global core.editor "nano -w"</code></td>
</tr>
<tr>
<td style="text-align: left">BBEdit (Mac, with command line tools)</td>
<td style="text-align: left"><code class="highlighter-rouge">$ git config --global core.editor "bbedit -w"</code></td>
</tr>
<tr>
<td style="text-align: left">Sublime Text (Mac)</td>
<td style="text-align: left"><code class="highlighter-rouge">$ git config --global core.editor "/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n -w"</code></td>
</tr>
<tr>
<td style="text-align: left">Sublime Text (Win, 32-bit install)</td>
<td style="text-align: left"><code class="highlighter-rouge">$ git config --global core.editor "'c:/program files (x86)/sublime text 3/sublime_text.exe' -w"</code></td>
</tr>
<tr>
<td style="text-align: left">Sublime Text (Win, 64-bit install)</td>
<td style="text-align: left"><code class="highlighter-rouge">$ git config --global core.editor "'c:/program files/sublime text 3/sublime_text.exe' -w"</code></td>
</tr>
<tr>
<td style="text-align: left">Notepad++ (Win, 32-bit install)</td>
<td style="text-align: left"><code class="highlighter-rouge">$ git config --global core.editor "'c:/program files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"</code></td>
</tr>
<tr>
<td style="text-align: left">Notepad++ (Win, 64-bit install)</td>
<td style="text-align: left"><code class="highlighter-rouge">$ git config --global core.editor "'c:/program files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"</code></td>
</tr>
<tr>
<td style="text-align: left">Kate (Linux)</td>
<td style="text-align: left"><code class="highlighter-rouge">$ git config --global core.editor "kate"</code></td>
</tr>
<tr>
<td style="text-align: left">Gedit (Linux)</td>
<td style="text-align: left"><code class="highlighter-rouge">$ git config --global core.editor "gedit --wait --new-window"</code></td>
</tr>
<tr>
<td style="text-align: left">Scratch (Linux)</td>
<td style="text-align: left"><code class="highlighter-rouge">$ git config --global core.editor "scratch-text-editor"</code></td>
</tr>
<tr>
<td style="text-align: left">Emacs</td>
<td style="text-align: left"><code class="highlighter-rouge">$ git config --global core.editor "emacs"</code></td>
</tr>
<tr>
<td style="text-align: left">Vim</td>
<td style="text-align: left"><code class="highlighter-rouge">$ git config --global core.editor "vim"</code></td>
</tr>
<tr>
<td style="text-align: left">VS Code</td>
<td style="text-align: left"><code class="highlighter-rouge">$ git config --global core.editor "code --wait"</code></td>
</tr>
</tbody>
</table>
<p>It is possible to reconfigure the text editor for Git whenever you want to change it.</p>
<blockquote class="callout">
<h2 id="exiting-vim">Exiting Vim</h2>
<p>Note that Vim is the default editor for many programs. If you haven’t used Vim before and wish to exit a session without saving
your changes, press <kbd>Esc</kbd> then type <code class="highlighter-rouge">:q!</code> and hit <kbd>Return</kbd>.
If you want to save your changes and quit, press <kbd>Esc</kbd> then type <code class="highlighter-rouge">:wq</code> and hit <kbd>Return</kbd>.</p>
</blockquote>
<p>The four commands we just ran above only need to be run once: the flag <code class="highlighter-rouge">--global</code> tells Git
to use the settings for every project, in your user account, on this computer.</p>
<p>You can check your settings at any time:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>git config <span class="nt">--list</span>
</code></pre></div></div>
<p>You can change your configuration as many times as you want: use the
same commands to choose another editor or update your email address.</p>
<blockquote class="callout">
<h2 id="proxy">Proxy</h2>
<p>In some networks you need to use a
<a href="https://en.wikipedia.org/wiki/Proxy_server">proxy</a>. If this is the case, you
may also need to tell Git about the proxy:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>git config <span class="nt">--global</span> http.proxy proxy-url
<span class="nv">$ </span>git config <span class="nt">--global</span> https.proxy proxy-url
</code></pre></div> </div>
<p>To disable the proxy, use</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>git config <span class="nt">--global</span> <span class="nt">--unset</span> http.proxy
<span class="nv">$ </span>git config <span class="nt">--global</span> <span class="nt">--unset</span> https.proxy
</code></pre></div> </div>
</blockquote>
<blockquote class="callout">
<h2 id="git-help-and-manual">Git Help and Manual</h2>
<p>Always remember that if you forget a <code class="highlighter-rouge">git</code> command, you can access the list of commands by using <code class="highlighter-rouge">-h</code> and access the Git manual by using <code class="highlighter-rouge">--help</code> :</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>git config <span class="nt">-h</span>
<span class="nv">$ </span>git config <span class="nt">--help</span>
</code></pre></div> </div>
<p>While viewing the manual, remember the <code class="highlighter-rouge">:</code> is a prompt waiting for commands and you can press <kbd>Q</kbd> to exit the manual.</p>
</blockquote>
:ET
\ No newline at end of file
I"<p>Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents. Created by John Gruber in 2004, Markdown is now one of the world’s most popular markup languages. It is used in many platforms like GitHub.</p>
<p>Using Markdown is different than using a WYSIWYG editor. In an application like Microsoft Word, you click buttons to format words and phrases, and the changes are visible immediately. Markdown isn’t like that. When you create a Markdown-formatted file, you add Markdown syntax to the text to indicate which words and phrases should look different.</p>
<p>For instance, to denote a heading, you add a number sign before it (e.g., <code class="highlighter-rouge"># Heading One</code>). Or to make a phrase bold, you add two asterisks before and after it (e.g., <code class="highlighter-rouge">**this text is bold**</code>).</p>
<p>You want to try ? You can use <a href="https://dillinger.io/">dillinger</a></p>
<h3 id="some-examples">Some examples</h3>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>* Use asterisks
* to create
* bullet lists.
</code></pre></div> </div>
</div>
<div class="col-md-6">
<ul>
<li>Use asterisks</li>
<li>to create</li>
<li>bullet lists.</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>1. Use numbers
1. to create
1. numbered lists.
</code></pre></div> </div>