Skip to content

Instantly share code, notes, and snippets.

View laurentsab's full-sized avatar

Laurent Sabatier laurentsab

View GitHub Profile
rsync -uvr --no-t --no-p --no-g [email protected]:/folder/to/download/* ./
@laurentsab
laurentsab / Git Tips
Last active November 8, 2016 08:32
Git Tips
// Ajouter un submodule
$ git submodule add -b [branch] [ssh gitRepo] [destination folder]
// Annuler toutes les modifs et reviens au commit demandé.
$ git reset --hard [#commit]
// Delete a locale branch
$ git branch -D bugfix
Deleted branch bugfix (was 2a14ef7).
@laurentsab
laurentsab / search_running_process_&_kill
Created June 30, 2014 12:16
Search running process and kill'em all
# search apache running process
$ ps fax | grep apache
4818 pts/0 S+ 0:00 | | | \_ grep --color=auto apache
1541 ? Ss 0:00 /usr/sbin/apache2 -k start
2817 ? S 0:03 \_ /usr/sbin/apache2 -k start
....
# kill process
$ sudo kill 1541
@laurentsab
laurentsab / symlinks_delete_all
Created May 14, 2014 10:01
Delete All Symlinks
@laurentsab
laurentsab / symlinks
Last active September 1, 2016 08:55
Symlinks foldersAndFiles: origin -> destination
@laurentsab
laurentsab / gist:11205884
Created April 23, 2014 07:43
Import SQL Dump in ddb
mysql -u username -p -h localhost DATA-BASE-NAME < data.sql