Administration Système

Every day Git commands for developers

Here are some day to day useful git commands

Show all remotes (origin and upstream)

git remote -v
git remote show origin #shows branches, tags etc.
git remote show upstream #shows branches, tags etc.

Add upstream remote (vs origin remote)

git remote add upstream

Remove a file from a Git repository without deleting it from the local filesystem

For single file:

git rm --cached myremotefiletodelete.log
git commit -m "remove file from repo"
git push

For single directory:

git rm --cached -r myremotedirectortytodelete
git commit -m "remove folder from repo"
git push

Shortcut add & commit all files

Without shortcut

git add .
git commit -m "commit message"

With shortcut

git commit -am "commit message"
Administration Système

Commandes “bash” incontournables sur Linux

Commandes BASH

cd nom du dossier: entrer dans un dossier
cd .. : revenir au dossier précédant
cat nomdufichier : affiche le contenu d’un fichier
pwd : dis moi où je suis !
mkdir nomdudossier : créer un dossier


Remove characters from a string in a cell with Google spreadsheet

Goal :

Remove the first 2 characters from a string in cell D1 : =RIGHT(D1,LEN(D1)-2)


  • =RIGHT(D1,LEN(D1)-[number of characters to remove])
  • RIGHT(D1) returns the last X characters of a certain string, based on a number of characters you specify. Like: RIGHT(text,num_chars)
  • LEN(D1) returns the length of the string in a cell
Administration Système Réseau

Sauvegarder, synchroniser, accéder, restorer ses données avec rsync

Objectifs :

Sauvegarder, synchroniser, accéder, restorer ses données avec rsync

Comment :

rsync copies only the diffs of files that have actually changed, compressed and through ssh if you want to for security

Rsync transactions without SSH are insecure because the protocol and the software itself does not include any content encryption. So if there is a man in the middle he can read/copy what you are backing up. Authentication can be read also

In daemon mode, rsync listens on the default TCP port of 873, serving files in the native rsync protocol or via a remote shell such as RSH or SSH.[fusion_builder_container hundred_percent=”yes” overflow=”visible”][fusion_builder_row][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][5] In the latter case, the rsync client executable must be installed on the remote machine as well as on the local machine.

Bases :

rsync -options –otherOptions sourceDir targetDir


rsync [OPTION…] SRC… [DEST]

Access via rsync daemon:



Example 1 :

rsync -vaz ~/rep1/ ~/rep2

This example copies the contents of the ~/rep1 directory to the rep2 directory.
a : archive mode
>Recursive mode
>Preserves symbolic links
>Preserves permissions
>Preserves timestamp
>Preserves owner and group
v : verbose
z : zip files

Example 2 :

rsync -vaz ~/rep1 ~/rep2

This example creates a rep1 directory under the ~/rep2 directory and recursively copies the contents of the ~/rep1 into this new directory. This is slighly different from the first example.

Example 3 :

# rsync -av –progress –stats –delete –force hello.php
# rsync -av –progress –stats –delete –force hello.php

Links :[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]


Créer un cercle en pointillés

Un exemple de cercle en pointillés réalisé avec Photoshop


L’idée est d’utiliser le pinceau (Raccourci “b” comme Brush) en choisissant une forme dynamique (Dynamic Shapes : Menu “Fenêtre” puis “Forme”).

Pour dessiner des pointillés de couleurs différentes séléctionner 2 couleurs en arrière-plan et en premier-plan puis dans la fenêtre des formes sélectionnez “Dynamique de la couleur”

Sources :