Skip to content
Snippets Groups Projects
rapport.tex 8.03 KiB
\documentclass{report}

\usepackage[french]{babel}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{times}
\DeclareUnicodeCharacter{25CF}{$\bullet$}
\DeclareUnicodeCharacter{25CB}{$\circ$}

\usepackage{array}
\usepackage{graphicx}

\title{Rapport Outils Logiciels Libres\\en \rotatebox{-25}{\LaTeX !}}
\author{Yann Jaulin\texttrademark}
\date{\today}

\begin{document}
   
\maketitle

   \tableofcontents

   \part{Efficacité de l'environnement de travail}
   \chapter{La souris}
   \section{}
   \begin{tabular}{|c|c|c|}
   \hline
   \textbf{Priorité} & \textbf{Problème} & \textbf{Correctif} \\
   \hline
   \textbf{1} & Éteindre l’ordinateur & \emph{Ctrl + Alt + Suppr} \\
   \textbf{2} & Changer d’application & \emph{Windows + Tab} \\
   \textbf{3} & Impossible d’éditer des mails en ligne & Utiliser Thunderbird \\
   \textbf{4} & Impossible d’éditer des documents en ligne & Utiliser LibreOffice \\
   \textbf{5} & Déplacer les fenêtres sur le bureau & \emph{Windows + Droite / Gauche} \\
   \textbf{6} & Agrandir / Rétrécir la fenêtre & \emph{Windows + Haut / Bas} \\
   \textbf{7} & Ouvrir une nouvelle fenêtre & \emph{Ctrl + N} \\
   \textbf{8} & Fermer des onglets & \emph{Ctrl + W} \\
   \textbf{9} & Ouvrir des onglets & \emph{Ctrl + T} \\
   \textbf{10} & Insérer un tableau (LibreOffice) & \emph{Ctrl + F12} \\
   \hline
   \end{tabular}

   \chapter{Le clavier}
   \section{}
   	\begin{center}
   		J’ai choisi d’utiliser Agile Fingers, car il donne des r\'{e}sultats avec des graphiques concernant notre utilisation et notre progression.
   	\end{center}
   
   \section{}
   \begin{center}
	   \includegraphics[width=6cm]{1}
	   
	   \includegraphics[width=6cm]{2}
   \end{center}

   \chapter{Le shell}
   \section{}
   \fbox{\begin{minipage}{\textwidth}
   		nano .bashrc
   		
   		– – – – – – –
   		
   		\#vim
   		
   		set -o vi
   		\end{minipage}}
   	
   	\section{}
   	\fbox{\begin{minipage}{\textwidth}
   			sudo update-alternatives --config editor
   			
   			– – – – –
   			
   			4
   	\end{minipage}}
   
   \chapter{Bash history}
   \section{}
   \begin{center}
   		S'il y a des informations sensibles, il faut les supprimer / ne pas les enregistrer.
   \end{center}

	\section{}
	\begin{center}
		Il utilise le shell zsh et non bash.
	\end{center}

	\section{}
	\fbox{\begin{minipage}{\textwidth}
			nano .bashrc
			
			– – – – –
			
			\#HISTIGNORE
			
			export HISTIGNORE="ls:cd:pwd:history"
	\end{minipage}}

	\chapter{Bash aliases}
	\section{}
	\fbox{\begin{minipage}{\textwidth}
			\#creerundossier
			
			function mkcd() \{
			
				mkdir "\$1";
				
				cd "\$1";
				
			\}
	\end{minipage}}

	\section{}
	\fbox{\begin{minipage}{\textwidth}
			\#Giturgence
			
			function gitemergency() \{
			
				git add .;
				
				git commit -m "Commit rapide";
				
				git push -u origin;
			
			\}
	\end{minipage}}

	\chapter{Auto-complétion}
	\section{}
	\fbox{\begin{minipage}{\textwidth}
			\_backup()
			
			\{
			
				local cur prev opts
				
				cur="\$\{COMP\_WORDS[COMP\_CWORD]\}"
			
				prev="\$\{COMP\_WORDS[COMP\_CWORD-1]\}"
				
				local files=("\$\{cur\}"*)
				
				case \$COMP\_CWORD in
			
				1) opts=`getent passwd | cut -d: -f1`;;
			
				2) opts="now tonight tomorrow";;
			
				3) opts="\$\{files[@]\}";;
			
				*);;
			
				esac
				
				COMPREPLY=()
			
				COMPREPLY=( \$(compgen -W "\$opts" -- \$\{cur\}) )
			
				return 0
			
			\}
			
			complete -o nospace -F \_backup backup
	\end{minipage}}

	\chapter{Prompt customization}
	\section{}
	\fbox{\begin{minipage}{\textwidth}
			nano .zshrc
			
			– – – – –
			
			plugins=(
			
			vagrant-prompt
			
			)
	\end{minipage}}

	\section{}
	\fbox{\begin{minipage}{1.07\textwidth}
			nano dieter.zsh-theme
			
			– – – – –
			
			PROMPT='\$\{time\} \$\{user\}\$\{host\} \$\{pwd\} \$(vagrant\_prompt\_info)'
			
			ZSH\_THEME\_VAGRANT\_PROMPT\_PREFIX="\%\{\$fg\_bold[blue]\%\}["
			
			ZSH\_THEME\_VAGRANT\_PROMPT\_SUFFIX="\%\{\$fg\_bold[blue]\%\}]\%\{\$reset\_color\%\} "
			
			ZSH\_THEME\_VAGRANT\_PROMPT\_RUNNING="\%\{\$fg\_no\_bold[green]\%\}●"
			
			ZSH\_THEME\_VAGRANT\_PROMPT\_POWEROFF="\%\{\$fg\_no\_bold[red]\%\}●"
			
			ZSH\_THEME\_VAGRANT\_PROMPT\_SUSPENDED="\%\{\$fg\_no\_bold[yellow]\%\}●"
			
			ZSH\_THEME\_VAGRANT\_PROMPT\_NOT\_CREATED="\%\{\$fg\_no\_bold[white]\%\}○"
	\end{minipage}}

	\chapter{Custom shortcuts}
	\section{}
	\begin{center}
		\`{A} faire.
	\end{center}

	\chapter{Les terminaux}
	\section{}
	\begin{center}
		J'ai choisi d'utiliser Terminator, car il est basé sur GNOME terminal que j'apprécie beaucoup et il peut se diviser facilement grâce au clique droit.
		\linebreak
		\linebreak
		De plus, le système de mettre chaque terminal dans un groupe pour éviter de taper X fois la même commande est vraiment pratique.
		\linebreak
		\linebreak
		Pour finir, sa documentation est facile à prendre en main, j'ai su utiliser Terminator en une après-midi.
	\end{center}

   \part{SSH}
   \chapter{Secure SHell}
   \section{}
	\fbox{\begin{minipage}{\textwidth}
		ssh alice@10.0.0.3
		
		ssh bob@10.0.0.3
		
		ssh carol@10.0.0.3
	\end{minipage}}

	\chapter{Authentification à clé publique}
	\section{}
	\fbox{\begin{minipage}{\textwidth}
		ssh-keygen
			
		ssh-copy-id alice@10.0.0.2
	\end{minipage}}

	\chapter{Known Hosts}
	\section{}
	\fbox{\begin{minipage}{\textwidth}
		ssh-keyscan -H 10.0.0.3
		
		\vspace{5mm}
		
		nano .ssh/known\_hosts
		
		\# 10.0.0.3:22 SSH-2.0-OpenSSH\_7.4p1 Debian-10+deb9u7
		
		...
		
		\vspace{5mm}
		
		ssh-copy-id bob@10.0.0.3
	\end{minipage}}

	\section{}
	\fbox{\begin{minipage}{\textwidth}
		nano .ssh/config
		
		Host bc
		
		Hostname 10.0.0.2
		
		User bob
	\end{minipage}}

	\chapter{Transfert de fichiers}
	\section{}
	\fbox{\begin{minipage}{\textwidth}
		sftp alice@10.0.0.2
		
		put Rendu.txt
		
		get Oui.txt
	\end{minipage}}

	\section{}
	\fbox{\begin{minipage}{\textwidth}
			sshfs alice@10.0.0.2:/home /tmp/alicecli
	\end{minipage}}

	\chapter{Tunnels SSH}
	\section{}
	\fbox{\begin{minipage}{\textwidth}
		ssh -R 8000:10.0.0.3:80 alice@10.0.0.1
	\end{minipage}}

	\chapter{SOCKS proxy}
	\section{}
	\begin{center}
		\`{A} faire.
	\end{center}

	\chapter{X11 forwarding}
	\section{}
	\fbox{\begin{minipage}{\textwidth}	
		ssh -X bob@10.0.0.3 xeyes
	\end{minipage}}

	\chapter{Rebonds}
	\section{}
	\begin{center}
		\`{A} faire.
	\end{center}

   \part{Git}
   \chapter{Utilisation basique}
   \section{}
   \fbox{\begin{minipage}{\textwidth}
   		\begin{itemize}
			\item git init
			\item git config user.name "Yann"
			\item git config user.email "yann.jaulin@etu.univ-lorraine.fr"
			\item git status
			\item Le fichier .vagrant a \'{e}t\'{e} cr\'{e}\'{e}, mais on ne veux pas le commit, il faut le mettre dans un gitignore
			\item echo .vagrant/ > .gitignore
			\item git add .
			\item git commit -m "Vagrant"
			\item git show HEAD
		\end{itemize}
   \end{minipage}}

	\chapter{Les branches}
	\section{}
	\fbox{\begin{minipage}{\textwidth}
		\begin{itemize}
			\item git checkout -b new
			\item git add -p
			\item git commit -m "1"
			\item git add .
			\item git commit -m "2"
			\item git checkout main
			\item Elle est vide
		\end{itemize}
	\end{minipage}}

	\chapter{Réintégrer les changements}
	\section{}
	\fbox{\begin{minipage}{\textwidth}
		\begin{itemize}
			\item git merge new
			\item git show HEAD
			\item le commit est la m\^{e}me dans main et new
			\item git branch
			\item oui, il faut la supprimer
			\item git branch -D new
		\end{itemize}
	\end{minipage}}
	\chapter{Conflits}
	\section{}
	\fbox{\begin{minipage}{\textwidth}
		\begin{itemize}
			\item git checkout -b forward-new-port
			\item git merge forward-new-port
			\item git status
			
			<<<<<<< HEAD
			
			b.vm.network "private\_network", ip: "192.168.56.3:8080"
			
			=======
			
			b.vm.network "private\_network", ip: "192.168.56.3:8081"
			
			>>>>>>> forward-new-port
			\item git add .
			\item git status
			\item git merge --continue
		\end{itemize}
	\end{minipage}}

	\newpage
	
	\begin{center}
		\includegraphics[width=12cm]{theend}
		\textcopyright 2022 Yann \texttrademark
	\end{center}

\end{document}