<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>FDUCAT Notebook</title>
    <link>https://notes.ducatillon.net/fr/docs/devops/</link>
    <description>Recent content on FDUCAT Notebook</description>
    <generator>Hugo</generator>
    <language>fr</language>
    <atom:link href="https://notes.ducatillon.net/fr/docs/devops/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Commandes Bash pour les développeurs</title>
      <link>https://notes.ducatillon.net/fr/docs/devops/bash-commands/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://notes.ducatillon.net/fr/docs/devops/bash-commands/</guid>
      <description>&lt;h1 id=&#34;day-to-day-bash-commands-for-developers&#34;&gt;Day to day bash commands for developers&lt;a class=&#34;anchor&#34; href=&#34;#day-to-day-bash-commands-for-developers&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://notes.ducatillon.net/img/linux_pingouin.png&#34; alt=&#34;Penguin&#34; /&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;bash-commands&#34;&gt;Bash commands&lt;a class=&#34;anchor&#34; href=&#34;#bash-commands&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;cd folder_name&lt;/code&gt; entrer dans un dossier&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;cd ..&lt;/code&gt; : revenir au dossier précédant&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;cat file_name&lt;/code&gt; : affiche le contenu d&amp;rsquo;un fichier&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pwd&lt;/code&gt; : dis moi où je suis !&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;mkdir folder_name&lt;/code&gt; : créer un dossier&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;cd / :&lt;/code&gt; Aller à la racine du serveur&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;cd :&lt;/code&gt; Aller au répertoire de l&amp;rsquo;utilisateur (la &amp;ldquo;home directory&amp;rdquo; de l&amp;rsquo;utilisateur)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;df -h :&lt;/code&gt; Affiche les informations sur le volume de stockage. (h pour &lt;strong&gt;h&lt;/strong&gt;uman)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;du -hd1 (anciennement du -h --max-depth=1):&lt;/code&gt; Affiche les informations sur le volume de stockage du répertoire dans lequel on se trouve.(&amp;ldquo;disk free&amp;rdquo;,&amp;ldquo;disk usage&amp;rdquo;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;rmdir file_name :&lt;/code&gt; supprimer un dossier&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;rmdir -rf file_name :&lt;/code&gt; supprimer un dossier &lt;strong&gt;non vide.&lt;/strong&gt; Attention, cela supprime tous le contenu à l&amp;rsquo;intérieur du dossier (sous dossiers et fichiers)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;touch nomdufichier&lt;/code&gt; : créer un fichier ou mettre à jour la date de modification sur un fichier existant.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;chmod 700 file_name&lt;/code&gt; : Modifier les permissions du fichier/dossier&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;chmod 777 -R folder_name&lt;/code&gt; : Modifier les permissions du dossier ainsi que celles de tous les sous-dossiers et fichiers inclus&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;chwon -R root:root folder_name&lt;/code&gt; : Modifie le propriétaire d&amp;rsquo;un dossier (avec sous dossiers et fichiers inclus dans mondossier)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;passwd utilisateur&lt;/code&gt;: Changer le mot de passe de l&amp;rsquo;utilisateur&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;su -&lt;/code&gt; : Se connecter en root&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;su -utilisateur&lt;/code&gt; : Se connecter avec utilisateur&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ls&lt;/code&gt; : Lister le contenu d&amp;rsquo;un dossier&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ls -l (ou ll)&lt;/code&gt; : Liste le contenu d&amp;rsquo;un dossier avec le détail (permission, user, group)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ls -ltr&lt;/code&gt; : Afficher les fichiers du plus ancien au plus récent&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ls -a&lt;/code&gt; : Lister tout le contenu d&amp;rsquo;un dossier (dont les fichiers cachés)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ls -h&lt;/code&gt; : Lister les repertoires en affichant le volume des fichiers de manière &amp;ldquo;lisible&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ls -t | head -n 1&lt;/code&gt; : Liste le dernier le fichier édité. Ici, la commande &amp;ldquo;head&amp;rdquo; permet d&amp;rsquo;afficher le nombre de ligne voulu par rapport au résultat de la commande ls (ici une seule ligne)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ls -d */&lt;/code&gt; : Lister UNIQUEMENT les repertoires.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;~/&lt;/code&gt; : équivaut à /home/dossierUser&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ls -l &amp;gt; ls-l.txt&lt;/code&gt; : Liste le contenu du répertoire dans le fichier ls-l.txt&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ls -l &amp;gt; ls-l.txt 2&amp;gt;&amp;amp;1&lt;/code&gt; : Liste uniquement les erreurs liés à la commande ls -l dans le fichier ls-l.txt&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;scp -r /Users/john/Documents/mondossier/* user@IP:~/mondossier&lt;/code&gt; : Envoyer un fichier serveur dont le contenu des dossiers&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;scp -P 5555 /Users/john/archive.tar.gz user@IP:~/mondossier&lt;/code&gt; : Envoyer un fichier compressé en spécifiant le port. (-P)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;cp -rp /var/tmp/prestashop_1.5.2.0  /var/www/html/&lt;/code&gt; : Déplacer (=copier/coller) un répertoire d&amp;rsquo;un emplacement A à un emplacement B en gardant les permissions des fichiers.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tar -pczf nameoftarball.tar.gz directoryname/&lt;/code&gt; Compresser et conserver les permissions des fichiers(-p)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tar -xzvf nameoftarball.tar.gz&lt;/code&gt; : Décompresser une archive.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;[root@127.0.0.1 demo]#mv folder/* .&lt;/code&gt; : Déplace le contenu du dossier &amp;ldquo;folder&amp;rdquo; dans le dossier &amp;ldquo;demo&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;unzip package.zip -d /path/to/directory/to/unzip&lt;/code&gt; : Dézipper le contenu de &amp;ldquo;package.zip&amp;rdquo; en choisissant le répertoire de destination.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;gunzip -c backup.sql.gzip &amp;gt; backup.sql :&lt;/code&gt; Extraire le fichier &amp;ldquo;backup.sql.gzip&amp;rdquo; pour contourner l&amp;rsquo;erreur &amp;ldquo;Gunzip unknwon suffix&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;find / -name file.log&lt;/code&gt; : Recherche le fichier file.log à la racine&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;find . -iname file.log&lt;/code&gt; : Recherche le fichier file.log dans le répertoire où l&amp;rsquo;on se trouve.(case sensitive : sensible aux majuscules et minuscules)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;find . -iname php.ini&lt;/code&gt; : Recherche le fichier php.ini dans le répertoire où l&amp;rsquo;on se trouve.(sans prendre en compte les majuscules et minuscules)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;find . -mtime -3 | grep test&lt;/code&gt; : Recherche les fichiers qui ont été modifié dans les 3 derniers jours et contenant &amp;ldquo;test&amp;rdquo; dans leur nom.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;find . -mtime +3 | grep test&lt;/code&gt; : Recherche les fichiers qui ont été modifié il y a plus de 3 jours et contenant &amp;ldquo;test&amp;rdquo; dans leur nom.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;locate php.ini&lt;/code&gt; : Recherche le fichier php.ini sur le serveur&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;grep -lR &amp;quot;chaine de caractere&amp;quot; *&lt;/code&gt; : Rechercher une chaine de caractère dans tous les fichiers du dossier dans lequel on se trouve.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;find /search/in/this/folder/ -type d -name &amp;quot;wordpress&amp;quot;&lt;/code&gt; : Recherche le répertoire intitulé &amp;ldquo;wordpress&amp;rdquo; dans le répertoire /search/in/this/folder/&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;diff file1 file2 | more&lt;/code&gt; : Afficher les différences entre 2 fichiers;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;&amp;gt; fileToPurge.txt&lt;/code&gt; : Effacer le contenu du fichier sans supprimer le fichier lui-même.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;grep -Ri --color motarecherche /repertoire/ou/rechercher/&lt;/code&gt; : Rechercher un mot dans un repertoire sans prendre en compte la casse et en affichant le mot à rechercher en couleur.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;sed -i &#39;s/mot_a_rechercher/remplacé_par_celuici-meme/&#39; fichier_en_question.txt&lt;/code&gt; : Commande de rechercher/remplacer de &amp;ldquo;mot_a_rechercher&amp;rdquo; en &amp;ldquo;remplacé_par_celuici-meme&amp;rdquo; dans le fichier fichier_en_question.txt&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;sed -i &#39;s/mot_a_rechercher/remplacé_par_celuici-meme/g&#39; fichier_en_question.txt&lt;/code&gt; : Commande de rechercher/remplacer de &amp;ldquo;mot_a_rechercher&amp;rdquo; en &amp;ldquo;remplacé_par_celuici-meme&amp;rdquo; dans le fichier fichier_en_question.txt. Le &lt;code&gt;/g&lt;/code&gt; permet de rechercher/remplacer plusieurs occurences de &amp;ldquo;mot_a_rechercher&amp;rdquo; sur une même ligne.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;grep motarechercher/etc/php.ini&lt;/code&gt; : Rechercher motarechercher dans le fichier php.ini&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;grep -v motaexclure/etc/php.ini&lt;/code&gt; : Rechercher TOUT sauf motarechercher dans le fichier php.ini&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;history&lt;/code&gt; : affiche l&amp;rsquo;historique des commandes&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;history | grep install&lt;/code&gt; : Recherche dans l&amp;rsquo;historique des commandes celles qui contiennent le mot install&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;history -c&lt;/code&gt; : Efface l&amp;rsquo;historique&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;man command&lt;/code&gt;: Afficher les possibilités de la commande (Exemple: man ls)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;q&lt;/code&gt; : Quitter l&amp;rsquo;écran&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;exit&lt;/code&gt; : Log out le user&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;clear&lt;/code&gt; : Rafraichir l&amp;rsquo;écran&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;shutdown -r now&lt;/code&gt; : Redémarrer le serveur&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;uname -m&lt;/code&gt; : Déterminer si la version de Linux utilisée est en 32 bit ou 64 bit x86_64 &amp;raquo;&amp;gt; 64-bit kernel i686 &amp;raquo;&amp;gt; 32-bit kernel&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ps -fu $USER&lt;/code&gt; : Visualiser les USERS en activité.(&amp;ldquo;process statistics&amp;rdquo;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ps -ef | grep ftp&lt;/code&gt; : Visualiser les processus en activité contenant &amp;ldquo;ftp&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;service apache2 start &amp;amp;&lt;/code&gt; : Exécuter un script en tâche de fond.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;env&lt;/code&gt; : Affiche les variables d&amp;rsquo;environnement.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;top&lt;/code&gt; : Affiche les performances machines instantanées. Une fois dans le &amp;ldquo;top&amp;rdquo; en appuyant sur &amp;ldquo;SHIFT 1&amp;rdquo; permet d&amp;rsquo;afficher les performances de chaque CPU.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;quick-history-search-in-terminal&#34;&gt;Quick history search in terminal&lt;a class=&#34;anchor&#34; href=&#34;#quick-history-search-in-terminal&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Common search history is a combination of &lt;code&gt;history&lt;/code&gt; and &lt;code&gt;grep&lt;/code&gt; key words :&#xA;&lt;code&gt;history | grep word_to_search&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Commandes Git au quotidien</title>
      <link>https://notes.ducatillon.net/fr/docs/devops/git-commands/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://notes.ducatillon.net/fr/docs/devops/git-commands/</guid>
      <description>&lt;h1 id=&#34;every-day-git-commands&#34;&gt;Every day Git commands&lt;a class=&#34;anchor&#34; href=&#34;#every-day-git-commands&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Git-logo.svg/1280px-Git-logo.svg.png&#34; alt=&#34;git&#34; /&gt;&lt;/p&gt;&#xA;&lt;p&gt;Here are some day to day useful git commands&lt;/p&gt;&#xA;&lt;h3 id=&#34;refresh-git-repo-after-gitignore-edition&#34;&gt;Refresh git repo after .gitignore edition&lt;a class=&#34;anchor&#34; href=&#34;#refresh-git-repo-after-gitignore-edition&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;When you add a new file to the &lt;code&gt;.gitignore&lt;/code&gt; it is not immediatly ignored. It stills appears on &lt;code&gt;git status&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;To refresh the git repo&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; git rm -rf --cached .&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;or&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; git rm -rf --cached specifyOnlyTheFolderToResfreshInsteadOftheEntireRepo&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;remove-remote-branch&#34;&gt;Remove remote branch&lt;a class=&#34;anchor&#34; href=&#34;#remove-remote-branch&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git push origin --delete my-branch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;remove-locale-branch&#34;&gt;Remove locale branch&lt;a class=&#34;anchor&#34; href=&#34;#remove-locale-branch&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git branch -D my-branch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;rename-locale-branch&#34;&gt;Rename locale branch&lt;a class=&#34;anchor&#34; href=&#34;#rename-locale-branch&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Switch to branch to rename&lt;/p&gt;</description>
    </item>
    <item>
      <title>Commandes Kubernetes</title>
      <link>https://notes.ducatillon.net/fr/docs/devops/kubernetes-command/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://notes.ducatillon.net/fr/docs/devops/kubernetes-command/</guid>
      <description>&lt;h2 id=&#34;kubernetes--docker-commands-for-developers&#34;&gt;Kubernetes &amp;amp; Docker commands for developers&lt;a class=&#34;anchor&#34; href=&#34;#kubernetes--docker-commands-for-developers&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;export-pod-logs&#34;&gt;Export pod logs&lt;a class=&#34;anchor&#34; href=&#34;#export-pod-logs&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl logs pod-name -n namespace-name &amp;gt;&amp;gt; /export/path/file.txt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;deploy-a-debugutils-pod&#34;&gt;Deploy a &amp;ldquo;debug/utils&amp;rdquo; pod&lt;a class=&#34;anchor&#34; href=&#34;#deploy-a-debugutils-pod&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl run -i --tty --rm debug --image&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;busybox --restart&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;Never --sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;use-bach-inside-a-pod&#34;&gt;Use bach inside a pod&lt;a class=&#34;anchor&#34; href=&#34;#use-bach-inside-a-pod&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl exec -it myPod -n myNameSpace  -- /bin/bash&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;run-container&#34;&gt;Run container&lt;a class=&#34;anchor&#34; href=&#34;#run-container&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run -p 8080:80 --name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;nginx&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;run-specific-docker-service&#34;&gt;Run specific docker service&lt;a class=&#34;anchor&#34; href=&#34;#run-specific-docker-service&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker-compose up -d myDatabaseApp&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;pod-port-forwarding&#34;&gt;Pod Port forwarding&lt;a class=&#34;anchor&#34; href=&#34;#pod-port-forwarding&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl port-forward pod/your-pod-name-85e45234ef-e345 8080:8080 -n your-name-space&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Forwarding from 127.0.0.1:8080 -&amp;gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;8080&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Forwarding from &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;::1&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;:8080 -&amp;gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;8080&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Handling connection &lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;8080&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;get-pods-ip&#34;&gt;Get Pods ip&lt;a class=&#34;anchor&#34; href=&#34;#get-pods-ip&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Retrieve the IP of pods (pods of a deployment)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Git Submodules</title>
      <link>https://notes.ducatillon.net/fr/docs/devops/git-submodules/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://notes.ducatillon.net/fr/docs/devops/git-submodules/</guid>
      <description>&lt;h1 id=&#34;demystifying-git-submodules-a-comprehensive-guide&#34;&gt;Demystifying Git Submodules: A Comprehensive Guide&lt;a class=&#34;anchor&#34; href=&#34;#demystifying-git-submodules-a-comprehensive-guide&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;p&gt;Git submodules allow you to keep one Git repository as a subdirectory of another. This is a powerful feature for managing dependencies while keeping their histories separate.&lt;/p&gt;&#xA;&lt;p&gt;In this guide, we&amp;rsquo;ll use the terms &lt;strong&gt;Main Project (Parent)&lt;/strong&gt; and &lt;strong&gt;Submodule (Child)&lt;/strong&gt; to explain the logic.&lt;/p&gt;&#xA;&lt;h2 id=&#34;1-what-is-a-git-submodule&#34;&gt;1. What is a Git Submodule?&lt;a class=&#34;anchor&#34; href=&#34;#1-what-is-a-git-submodule&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;A submodule is &lt;strong&gt;not&lt;/strong&gt; just a copy of a folder. It is a &lt;strong&gt;pointer&lt;/strong&gt; to a specific commit in another repository.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Github Pages</title>
      <link>https://notes.ducatillon.net/fr/docs/devops/githubpages/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://notes.ducatillon.net/fr/docs/devops/githubpages/</guid>
      <description>&lt;h2 id=&#34;static-content-hosting-with-github-pages&#34;&gt;Static content hosting with GitHub Pages&lt;a class=&#34;anchor&#34; href=&#34;#static-content-hosting-with-github-pages&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s review the nuances between site types and how to automate their deployment.&lt;/p&gt;&#xA;&lt;h3 id=&#34;github-pages-site-types&#34;&gt;GitHub Pages Site Types&lt;a class=&#34;anchor&#34; href=&#34;#github-pages-site-types&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th style=&#34;text-align: left&#34;&gt;Feature&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: left&#34;&gt;User Site&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: left&#34;&gt;Organization Site&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: left&#34;&gt;Project Site&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;Primary Intent&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;Personal portfolio, resume, or central hub.&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;Brand, company, or collective identity.&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;Documentation or landing page for a specific repo.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;Repo Naming&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;username.github.io&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;orgname.github.io&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;any-repo-name&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;Default URL&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;https://username.github.io&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;https://orgname.github.io&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;https://username.github.io/repo/&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;Apex Domain&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;Supported&lt;/strong&gt; (e.g., &lt;code&gt;domain.com&lt;/code&gt;).&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;Supported&lt;/strong&gt; (e.g., &lt;code&gt;company.com&lt;/code&gt;).&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;Supported&lt;/strong&gt; (e.g., &lt;code&gt;project.com&lt;/code&gt;).&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;Subdomain&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;Supported&lt;/strong&gt; (e.g., &lt;code&gt;user.domain.com&lt;/code&gt;).&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;Supported&lt;/strong&gt; (e.g., &lt;code&gt;org.domain.com&lt;/code&gt;).&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;Supported&lt;/strong&gt; (e.g., &lt;code&gt;docs.domain.com&lt;/code&gt;).&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;Capacity&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;One (1) per account.&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;One (1) per organization.&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;Unlimited per account/org.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;Permissions&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;Individual ownership.&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;Shared team administrative access.&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;Inherited from the project repository.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h3 id=&#34;deployment-workflow-strategies&#34;&gt;Deployment Workflow Strategies&lt;a class=&#34;anchor&#34; href=&#34;#deployment-workflow-strategies&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Static site generators (SSGs) like Hugo or MkDocs require a build step to turn source files into HTML. How you handle that build defines your workflow.&lt;/p&gt;</description>
    </item>
    <item>
      <title>La variable PATH expliquée</title>
      <link>https://notes.ducatillon.net/fr/docs/devops/pathpath/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://notes.ducatillon.net/fr/docs/devops/pathpath/</guid>
      <description>&lt;h1 id=&#34;path-variable-explained&#34;&gt;PATH variable explained&lt;a class=&#34;anchor&#34; href=&#34;#path-variable-explained&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;the-path-variable&#34;&gt;The &lt;code&gt;$PATH&lt;/code&gt; variable&lt;a class=&#34;anchor&#34; href=&#34;#the-path-variable&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;lists directories to search fro executables&lt;/li&gt;&#xA;&lt;li&gt;only contains the directory paths where executables live&lt;/li&gt;&#xA;&lt;li&gt;itself never contains any executables (like &amp;ldquo;python&amp;rdquo;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;see-all-directories-in-your-path&#34;&gt;See all directories in your PATH&lt;a class=&#34;anchor&#34; href=&#34;#see-all-directories-in-your-path&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;echo $PATH | tr &#39;:&#39; &#39;\n&#39;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;We see directories like:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/usr/local/bin&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/usr/bin&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/opt/homebrew/bin&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/bin&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Executables INSIDE those directories:&#xA;ls /usr/local/bin | grep python&#xA;ls /opt/homebrew/bin | grep python&#xA;ls /usr/bin | grep python&lt;/p&gt;&#xA;&lt;h3 id=&#34;this-shows-the-first-python3-found-in-path&#34;&gt;This shows the first python3 found in PATH&lt;a class=&#34;anchor&#34; href=&#34;#this-shows-the-first-python3-found-in-path&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;code&gt;which python3&lt;/code&gt;&#xA;&amp;ndash; /usr/local/bin/python3&lt;/p&gt;</description>
    </item>
    <item>
      <title>Traitement de fichiers en lot</title>
      <link>https://notes.ducatillon.net/fr/docs/devops/batch-process-files/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://notes.ducatillon.net/fr/docs/devops/batch-process-files/</guid>
      <description>&lt;h2 id=&#34;script-that-removes-all-lines-containing-foo-in-all-md-files-into-the-current-folder-recursively&#34;&gt;Script that removes all lines containing foo in all .md files into the current folder recursively&lt;a class=&#34;anchor&#34; href=&#34;#script-that-removes-all-lines-containing-foo-in-all-md-files-into-the-current-folder-recursively&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/sh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# If a command fails then the deploy stops&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set -e&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;printf &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\033[0;32mProcessing all files in current directory...\033[0m\n&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Find all .md files in the current directory and subdirectories&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find . -type f -name &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;*.md&amp;#34;&lt;/span&gt; | &lt;span style=&#34;color:#66d9ef&#34;&gt;while&lt;/span&gt; read file; &lt;span style=&#34;color:#66d9ef&#34;&gt;do&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#75715e&#34;&gt;# Run vim on each file to remove all lines containing foo&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  vim -es -c &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;:g/foo/d&amp;#34;&lt;/span&gt; -c &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;:wq&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;$file&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
