Entête de fichier markdown pour serveur statique jekyll

---
layout: post
title:  tmux
toc: true
ref: (falcutatif)
date: 2016-10-18
last_modified_at : 2019-03-06  
categories: [linux,autre]
tags: [tmux,divers]
lang: fr
description:  outil permettant d'exploiter plusieurs terminaux au sein d'un seul et même affichage
---
  • layout : toujours post
  • title : le titre du billet
  • toc : true pour avoir un menu de lien des différentes entêtes du billet
  • date : respecter le format aaaa-mm-jj
  • categories et tags : un mot entre crochets sans espace ni caractères spéciaux , si plusieurs une virgule pour les séparer

jekyll tips

Faire un lien interne sur un autre billet

Welcome to my Jekyll Blog. I’m exploring how Jekyll handles links:
* [An absolute link](http://203.0.113.0:4000/about/)
* [A root relative link](/jekyll/update/welcome-to-jekyll/)
* [A Jekyll post_url link]({% post_url 2016-05-09-website-response-time %})

Vidéos

Création d’un fichier video.html situé dans _includes/

<iframe width="560" 
	height="315" 
	src="" 
	frameborder="0" 
	allowfullscreen>
</iframe>

Alternative N°1
Syntaxe dans le “post” pour inclure une video

{% include video.html url=”https://www.youtube.com/embed/youtubeId” %}

Exemple vidéo youtube : Markdown tutorial
Remplacer https://www.youtube.com/watch?v=6A5EpqqDOdkhttps://www.youtube.com/embed/6A5EpqqDOdk

Alternative N°2
On affiche la première image de la vidéo , un clic permet la lecture sur le site youtube
Syntaxe dans le “post”

[![IMAGE ALT TEXT](https://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](https://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE "Video Title")

Exemple vidéo youtube : Markdown tutorial

Markdown tutorial

Alternative N°3
Syntaxe directe

<iframe src="https://player.vimeo.com/video/193567768?title=0&byline=0&portrait=0" width="640" height="360" frameborder="0" ></iframe>

Images

![alt text](/images/A20-olinuxino-micro-top.png "Top view")

alt text

Images largeur fixée (si hauteur ajouter height="36px")
Avec hauteur et largeur image {:height="36px" width="30px"}

![image](/images/A20-olinuxino-micro-top.png){:width="300px"}

image

Fichiers

Les fichiers sont dans le dossier /files

[Fichier téléchargeable](/files/nomFichier)

Syntaxe makdown

This is intended as a quick reference and showcase. For more complete info, see John Gruber’s original spec and the Github-flavored Markdown info page.

Note that there is also a Cheatsheet specific to Markdown Here if that’s what you’re looking for. You can also check out more Markdown tools.

it is possible to disable liquid processing engine using the raw / endraw tags:

Exemple

{% this %}

Emphasis

Emphasis, aka italics, with *asterisks* or _underscores_.
Strong emphasis, aka bold, with ***asterisks*** or __underscores__.
Combined emphasis with ***asterisks* and _underscores_**.

Emphasis, aka italics, with asterisks or underscores.
Strong emphasis, aka bold, with asterisks or underscores.
Combined emphasis with asterisks and underscores.

Test ~~texte raturé~~   
<s>this is strike through text</s>  

Test texte raturé

this is strike through text

Lists

(In this example, leading and trailing spaces are shown with with dots: ⋅)

1. First ordered list item
2. Another item
....* Unordered sub-list. 
1. Actual numbers don't matter, just that it's a number
....1. Ordered sub-list
4. And another item.

⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅
⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅

* Unordered list can use asterisks
- Or minuses
+ Or pluses
  1. First ordered list item
  2. Another item
    • Unordered sub-list.
  3. Actual numbers don’t matter, just that it’s a number
    1. Ordered sub-list
  4. And another item.

    You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we’ll use three here to also align the raw Markdown).

    To have a line break without a paragraph, you will need to use two trailing spaces.
    Note that this line is separate, but within the same paragraph.

  • Unordered list can use asterisks
  • Or minuses
  • Or pluses

  • List 0
  • List
  • Hello!

    Hello

    Item 2 Hello

    Hibuli habuli!Code here

    • Item 3
  • Hello again

         Hassd *code*
    

    Code here

  1. Stuff

Hello

Markdown FTW!

1986. What a great season. A link here: http://www.example.com/ that should be automatically detected.

Stuff here!. This is pretty cool.

  • Hello
    • Booboo

What [up to the ][name] cats n dogs :) Hello!! Some emphasized stuff here. A * star * has [born]. This * i dont know what*will happen.

  1. Stuff
  2. Hello
  3. Again
  4. Stuff

This is an example inline link.

Hello **`strong text** here

These * should * not *be* selected. This* neither! should be. This *neither should* be

There are two ways to create links.

[I'm an inline-style link](https://www.google.com)

[I'm an inline-style link with title](https://www.google.com "Google's Homepage")

[You can use numbers for reference-style link definitions][1]

URLs and URLs in angle brackets will automatically get turned into links in the preview. 
http://www.example.com or <http://www.example.com>

[1]: http://www.qownnotes.org

You can also put the [link URL][1] below the current paragraph
like [this][2].

   [1]: http://url
   [2]: http://another.url "A funky title"

I’m an inline-style link

I’m an inline-style link with title

You can use numbers for reference-style link definitions

URLs and URLs in angle brackets will automatically get turned into links in the preview. http://www.example.com or http://www.example.com

You can also put the link URL below the current paragraph like this.

Code and Syntax Highlighting

Inline `code` has `back-ticks around` it.

Inline code has back-ticks around it.

Blocks of code are either fenced by lines with three back-ticks, or are indented with four spaces. I recommend only using the fenced code blocks – they’re easier and only they support syntax highlighting.

indent code

	s = "Code with space indent"
	print s

highlighting codes

highlighting code

#!/bin/sh
#lancement jekyll
cd /srv/wikistatic/
#bundle exec jekyll serve
/usr/local/bin/bundle exec jekyll build --watch
codes        
abap (‘*.abap’) ada (‘.adb’, ‘.ads’, ‘*.ada’) ahk (‘.ahk’, ‘.ahkl’) apacheconf (‘.htaccess’, ‘apache.conf’, ‘apache2.conf’) applescript (‘*.applescript’)
as (‘*.as’) as3 (‘*.as’) asy (‘*.asy’) bash (‘.sh’, ‘.ksh’, ‘.bash’, ‘.ebuild’, ‘*.eclass’) bat (‘.bat’, ‘.cmd’)
befunge (‘*.befunge’) blitzmax (‘*.bmx’) boo (‘*.boo’) brainfuck (‘.bf’, ‘.b’) c (‘.c’, ‘.h’)
cfm (‘.cfm’, ‘.cfml’, ‘*.cfc’) cheetah (‘.tmpl’, ‘.spt’) cl (‘.cl’, ‘.lisp’, ‘*.el’) clojure (‘.clj’, ‘.cljs’) cmake (‘*.cmake’, ‘CMakeLists.txt’)
coffeescript (‘*.coffee’) console (‘*.sh-session’) control (‘control’) cpp (‘.cpp’, ‘.hpp’, ‘.c++’, ‘.h++’, ‘.cc’, ‘.hh’, ‘.cxx’, ‘.hxx’, ‘*.pde’) csharp (‘*.cs’)
css (‘*.css’) cython (‘.pyx’, ‘.pxd’, ‘*.pxi’) d (‘.d’, ‘.di’) delphi (‘*.pas’) diff (‘.diff’, ‘.patch’)
dpatch (‘.dpatch’, ‘.darcspatch’) duel (‘.duel’, ‘.jbst’) dylan (‘.dylan’, ‘.dyl’) erb (‘*.erb’) erl (‘*.erl-sh’)
erlang (‘.erl’, ‘.hrl’) evoque (‘*.evoque’) factor (‘*.factor’) felix (‘.flx’, ‘.flxh’) fortran (‘.f’, ‘.f90’)
gas (‘.s’, ‘.S’) genshi (‘*.kid’) glsl (‘.vert’, ‘.frag’, ‘*.geo’) gnuplot (‘.plot’, ‘.plt’) go (‘*.go’)
groff (‘.(1234567)’, ‘.man’) haml (‘*.haml’) haskell (‘*.hs’) html (‘.html’, ‘.htm’, ‘.xhtml’, ‘.xslt’) hx (‘*.hx’)
hybris (‘.hy’, ‘.hyb’) ini (‘.ini’, ‘.cfg’) io (‘*.io’) ioke (‘*.ik’) irc (‘*.weechatlog’)
jade (‘*.jade’) java (‘*.java’) js (‘*.js’) jsp (‘*.jsp’) lhs (‘*.lhs’)
llvm (‘*.ll’) logtalk (‘*.lgt’) lua (‘.lua’, ‘.wlua’) make (‘.mak’, ‘Makefile’, ‘makefile’, ‘Makefile.’, ‘GNUmakefile’) mako (‘*.mao’)
maql (‘*.maql’) mason (‘.mhtml’, ‘.mc’, ‘*.mi’, ‘autohandler’, ‘dhandler’) markdown (‘*.md’) modelica (‘*.mo’) modula2 (‘.def’, ‘.mod’)
moocode (‘*.moo’) mupad (‘*.mu’) mxml (‘*.mxml’) myghty (‘*.myt’, ‘autodelegate’) nasm (‘.asm’, ‘.ASM’)
newspeak (‘*.ns2’) objdump (‘*.objdump’) objectivec (‘*.m’) objectivej (‘*.j’) ocaml (‘.ml’, ‘.mli’, ‘.mll’, ‘.mly’)
ooc (‘*.ooc’) perl (‘.pl’, ‘.pm’) php (‘.php’, ‘.php(345)’) postscript (‘.ps’, ‘.eps’) pot (‘.pot’, ‘.po’)
pov (‘.pov’, ‘.inc’) prolog (‘.prolog’, ‘.pro’, ‘*.pl’) properties (‘*.properties’) protobuf (‘*.proto’) py3tb (‘*.py3tb’)
pytb (‘*.pytb’) python (‘.py’, ‘.pyw’, ‘.sc’, ‘SConstruct’, ‘SConscript’, ‘.tac’) rb (‘.rb’, ‘.rbw’, ‘Rakefile’, ‘.rake’, ‘.gemspec’, ‘.rbx’, ‘.duby’) rconsole (‘*.Rout’) rebol (‘.r’, ‘.r3’)
redcode (‘*.cw’) rhtml (‘*.rhtml’) rst (‘.rst’, ‘.rest’) sass (‘*.sass’) scala (‘*.scala’)
scaml (‘*.scaml’) scheme (‘*.scm’) scss (‘*.scss’) smalltalk (‘*.st’) smarty (‘*.tpl’)
sourceslist (‘sources.list’) splus (‘.S’, ‘.R’) sql (‘*.sql’) sqlite3 (‘*.sqlite3-console’) squidconf (‘squid.conf’)
ssp (‘*.ssp’) tcl (‘*.tcl’) tcsh (‘.tcsh’, ‘.csh’) tex (‘.tex’, ‘.aux’, ‘*.toc’) text (‘*.txt’)
v (‘.v’, ‘.sv’) vala (‘.vala’, ‘.vapi’) vbnet (‘.vb’, ‘.bas’) velocity (‘.vm’, ‘.fhtml’) vim (‘*.vim’, ‘.vimrc’)
xml (‘.xml’, ‘.xsl’, ‘.rss’, ‘.xslt’, ‘.xsd’, ‘.wsdl’) xquery (‘.xqy’, ‘.xquery’) xslt (‘.xsl’, ‘.xslt’) yaml (‘.yaml’, ‘.yml’)  

Exemples de code

bash

#/bin/bash
fichierindex="indexA.html"
echo '<!doctype html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <title>Fichiers html</title>
</head>
<body>
 <ul>' > $fichierindex
OIFS=$IFS
IFS=$'\n'
  for file in $(find /home/yannick/Documents/html/ -name "*.html")
    do 
       lien=$(basename ${file%.*})
       echo '<li><a href="'$lien'.html">'$lien'</a></li>' >> $fichierindex
    done
IFS=$OIFS
echo '
 </ul>
</body>
</html>' >> $fichierindex

Entre deux ` ` (altgr 7)

entre deux altgr 7

python

#!/usr/bin/env python
import os
from gi.repository import Gtk
from gi.repository import AppIndicator3

class AppIndicatorExample:
    def __init__(self, indicator_id):
        self.ind = AppIndicator3.Indicator.new(str(indicator_id), os.path.abspath('sample_icon.svg'), AppIndicator3.IndicatorCategory.SYSTEM_SERVICES)
        self.ind.set_status(AppIndicator3.IndicatorStatus.ACTIVE)

        # create a menu
        self.menu = Gtk.Menu()

        item = Gtk.MenuItem(str(indicator_id))
        item.show()
        self.menu.append(item)

        image = Gtk.ImageMenuItem(Gtk.STOCK_QUIT)
        self.menu.append(image)

        self.menu.show()

        self.ind.set_menu(self.menu)

    def quit(self, widget, data=None):
        Gtk.main_quit()

if __name__ == "__main__":
    indicator = AppIndicatorExample(1)
    Gtk.main()

perl

#!/usr/bin/perl -w
 
use strict;
use warnings;
 
use constant VERSION => 0.03;
 
if(scalar @ARGV != 4) {
   &help;
}
 
my $image_web;
my $dimensions;
 
# Détermination des arguments
for(my $i = 0; $i < scalar @ARGV; $i +=2) {
   if($ARGV[$i] eq "-s") {
      $dimensions = $ARGV[$i + 1];
   }
   elsif($ARGV[$i] eq "-i") {
      $image_web = $ARGV[$i + 1];
   }
   else {
      print STDERR "Argument $ARGV[$i] inconnu\n";
      &help;
   }
}

javascript

 function init() {
    /* Sidebar height set */
    $sidebarStyles = $('.sidebar').attr('style')
    $sidebarStyles += ' min-height: ' + $(document).height() + 'px;';
    $('.sidebar').attr('style', $sidebarStyles);

    /* Secondary contact links */
    var $scontacts = $('#contact-list-secondary');
    var $contactList = $('#contact-list');

    $scontacts.hide();
    $contactList.mouseenter(function(){ $scontacts.fadeIn(); });
    $contactList.mouseleave(function(){ $scontacts.fadeOut(); });

    /**
     * Tags & categories tab activation based on hash value. If hash is undefined then first tab is activated.
     */
    function activateTab() {
      if(['/tags.html', '/categories.html'].indexOf(window.location.pathname) > -1) {
        var hash = window.location.hash;
        if(hash)
          $('.tab-pane').length && $('a[href="' + hash + '"]').tab('show');
        else
          $('.tab-pane').length && $($('.cat-tag-menu li a')[0]).tab('show');
      }
    }

    // watch hash change and activate relevant tab
    $(window).on('hashchange', activateTab);

    // initial activation
    activateTab();
  };

Tables

Tables aren’t part of the core Markdown spec, but the QOwnNotes preview supports them.

Colons can be used to align columns.

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |

There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don't need to make the 
raw Markdown line up prettily. You can also use inline Markdown.

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3

Colons can be used to align columns.

Tables Are Cool
col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1
There must be at least 3 dashes separating each header cell. The outer pipes ( ) are optional, and you don’t need to make the raw Markdown line up prettily. You can also use inline Markdown.
Markdown Less Pretty
Still renders nicely
1 2 3

Blockquotes

> Blockquotes are very handy in email to emulate reply text.
> This line is part of the same quote.

Quote break.

> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote. 

Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.

Quote break.

This is a very long line that will still be quoted properly when it wraps. Oh boy let’s keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can put Markdown into a blockquote.

Horizontal Rule

Three or more...

---

Hyphens

***

Asterisks

___

Underscores

Three or more…


Hyphens


Asterisks


Underscores

Line Breaks

Here's a line for us to start with.

This line is separated from the one above by two newlines, so it will be a *separate paragraph*.

This line is also begins a separate paragraph, but...  
This line is only separated by two trailing spaces and a single newline, so it's a separate line in the *same paragraph*.

Here’s a line for us to start with.

This line is separated from the one above by two newlines, so it will be a separate paragraph.

This line is also begins a separate paragraph, but…
This line is only separated by two trailing spaces and a single newline, so it’s a separate line in the same paragraph.

Escapes and HTML

What if you want to just show asterisks, not italics?

  • this shows up in italics: a happy day
  • this shows the asterisks: *a happy day*

Output:

this shows up in italics: a happy day
this shows the asterisks: *a happy day*

The backslashes will disappear and leave the asterisks. You can do the same with any of the characters that have a special meaning for Markdown.

Many simple HTML tags are allowed, for example And unknown tags will be dropped. To show a literal or an unknown tag like you need escape it with HTML entities: :

<b>this will be bold</b>
you should escape &lt;unknown&gt; tags
&copy; special entities work
&amp;copy; if you want to escape it

Output:

this will be bold
you should escape <unknown> tags
© special entities work
&copy; if you want to escape it

HTML tags that are block-level like <div> can be used, but if there is markdown formatting within it, you must add a “markdown” attribute: <div markdown> Some safe attributes are also allowed, permitting basic styling and layout: <div markdown style="float:left">

Individual ampersands (&) and less-than signs (<) are fine, they will be shown as expected.

un deux trois
Foo1 Foo2 Foo3

Headers

# H1
## H2
### H3
#### H4
##### H5
###### H6

Alternatively, for H1 and H2, an underline-ish style:

Alt-H1
======

Alt-H2
------

H1

H2

H3

H4

H5
H6

Alternatively, for H1 and H2, an underline-ish style:

Alt-H1

Alt-H2

Another header

Let’s see _if the emphasis

carries over_ to another paragraph.

And ` maybe this ` should Hello not be

Header


Credit: markdown-here
License: CC-BY