Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rendu Outils libres
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RIEHM Clement
Rendu Outils libres
Commits
8e6723a4
Commit
8e6723a4
authored
3 years ago
by
RIEHM Clement
Browse files
Options
Downloads
Plain Diff
Debut ssh
parents
7d8715f6
66d1b67b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rendu.tex
+145
-2
145 additions, 2 deletions
rendu.tex
with
145 additions
and
2 deletions
rendu.tex
+
145
−
2
View file @
8e6723a4
...
...
@@ -26,6 +26,7 @@
showtabs=false,
tabsize=2
}
\lstset
{
style=mystyle
}
% Info titre
\title
{
Outils libre coté client
}
...
...
@@ -37,8 +38,82 @@
\maketitle
\tableofcontents
\section
{
Efficacité de l'environnement de travail
}
\subsection*
{
\#
1
}
\subsection*
{
\#
2
}
\subsection*
{
\#
3
}
vi en mode par défaut:
\begin{lstlisting}
[language=bash]
echo "set editing-mode vi" > ~/.inputrc
\end{lstlisting}
Parametrer nvim en éditeur par défaut sur archlinux :
\begin{lstlisting}
[language=bash]
echo "export EDITOR='nvim'" >> ~/.bashrc
\end{lstlisting}
\subsection*
{
\#
4
}
Il y avait un mot de passe dans mon history.
D'après son history l’employé a sans doute changer de shell. Il a installé zsh avant que l’history s’arrete.
Les commandes listées dans la variable HISTIGNORE sont désactivées.
\begin{lstlisting}
[language=bash]
export HISTIGNORE="
&
:ls:exit:pwd:clear:history"
\end{lstlisting}
\subsection*
{
\#
5
}
\begin{lstlisting}
[language=bash]
function mkcd()
{
mkdir
$
1
cd
$
1
}
function gitemergency()
{
git add *
git commit -m "emergency commit"
git push origin main
}
\end{lstlisting}
\subsection*
{
\#
6
}
\begin{lstlisting}
[language=bash]
_
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{lstlisting}
\subsection*
{
\#
7
}
Ajouter vagrant-prompt dans la liste de plugins de ~/.zshrc
plugins=(git vagrant-prompt)
Ajouter
\verb
|
$(vagrant_prompt_info)
|
au PROMPT dans le themes
\subsection*
{
\#
8
}
\subsection*
{
\#
9
}
\subsection*
{
\#
10
}
\section
{
SSH
}
\subsection
{
#1
}
\subsection
*
{
#1
}
\begin{lstlisting}
ssh alice@192.168.56.2
...
...
@@ -46,5 +121,73 @@ ssh alice@192.168.56.2
L'history des utilisateurs sont vides.
\subsection
{
#
}
\section
{
Git
}
\subsection*
{
\#
1
}
\begin{lstlisting}
[language=bash]
~/git/vagrantssh
$
git init
git status
vagrant up
vagrant halt
git status
\end
{
lstlisting
}
Un dossier .vagrant est créé. L’ajouter dans le fichier gitignore pour l’ignorer.
\begin
{
lstlisting
}
[
language
=
bash
]
echo .vagrant
/
>> .gitignore
git add README.md Vagrantfile srv
/
git commit
-
m "Ajout initial"
git log
git show cdc
5
df
9
f
5
ec
0
abe
55
cc
6
d
825
c
5
c
6008560199688
\end
{
lstlisting
}
\subsection
*
{
\#
2
.
1
}
\begin
{
lstlisting
}
[
language
=
bash
]
git checkout
-
b new
-
branche
-
2000
nvim Vagrantfile
git add
-
p
\end
{
lstlisting
}
Les modification ne sont pas dans le working directory.
\subsection
*
{
\#
2
.
2
}
\begin
{
lstlisting
}
[
language
=
bash
]
git checkout master
git merge new
-
branche
-
2000
git log
git show
8
fa
8008
b
2
c
7
eeb
6
e
55115
f
019
b
6
e
7
ca
3
e
439
a
4
dd
\end
{
lstlisting
}
Spécificité : Le HEAD
-
> master
\begin
{
lstlisting
}
[
language
=
bash
]
commit
8
fa
8008
b
2
c
7
eeb
6
e
55115
f
019
b
6
e
7
ca
3
e
439
a
4
dd
(
HEAD
-
> master, new
-
branche
-
2000
)
\end
{
lstlisting
}
\begin
{
lstlisting
}
[
language
=
bash
]
git branch
*
master
new
-
branche
-
2000
\end
{
lstlisting
}
La branche existe toujours. On peut supprimer la branche.
\subsection
*
{
\#
3
}
\begin
{
lstlisting
}
[
language
=
bash
]
git checkout master
git merge new
-
branche
-
2000
git log
git show
8
fa
8008
b
2
c
7
eeb
6
e
55115
f
019
b
6
e
7
ca
3
e
439
a
4
dd
\end
{
lstlisting
}
\subsection
*
{
\#
4
}
\begin
{
lstlisting
}
[
language
=
bash
]
git checkout
-
b forward
-
new
-
port
\end
{
lstlisting
}
\begin
{
lstlisting
}
[
language
=
bash
]
nvim Vagrantfile
git add Vagrantfile
git commit
-
m "Forward port
80
"
\end
{
lstlisting
}
\begin
{
lstlisting
}
[
language
=
bash
]
git checkout master
nvim Vagrantfile
git add Vagrantfile
git commit
-
m "Forward port
80
"
\end
{
lstlisting
}
\begin
{
lstlisting
}
[
language
=
bash
]
git merge forward
-
new
-
port
\end
{
lstlisting
}
Git demande de corriger le conflit.
>>>>>>>
66
d
1
b
67
b
0
bc
81
a
0
cb
42237
dfeb
5
ada
3
eb
4
f
3
cd
8
d
\end
{
document
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment