This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -u username -p -h localhost DATA-BASE-NAME < data.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# origin: dossier des fichiers originaux | |
# destination: dossier sur lequel on veut ajouter des Symlinks | |
ln -s /nom/du/dossier/origin -t /nom/du/dossier/destination |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -maxdepth 1 -type l -exec rm -f {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rsync -uvr --no-t --no-p --no-g [email protected]:/folder/to/download/* ./ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Afficher une image */ | |
<img src="{$node.object.data_map.my_image.content[image_size].full_path}" ... /> | |
/* Afficher le contenu d'un bloc XML */ | |
{$node.object.data_map.my_xml.content.output.output_text} | |
/* Afficher un timestamp au format souhaité */ | |
{$node.data_map.date_from.data_int|datetime(custom, '%l %d %F %Y')} | |
custom, '%d/%m/%y' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Update/Add a new field | |
Rooms.update({_id: 'XDhybphgkdC7Z4dsn'}, {$set: {user: 'Laurent'}}); | |
// Add array | |
Rooms.update({_id: 'XDhybphgkdC7Z4dsn'}, {$set: {objects: ['TV', 'Radio', 'Draps'] } } ); | |
// Push a field in an array | |
Rooms.update({_id: 'XDhybphgkdC7Z4dsn'}, {$push: {objects: ['Lights'] } } ); | |
// Push an array in an array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show size of each folder | |
$ du -sch * | sort -h | |
# Count number of files in a folder | |
$ find . -name \* | wc -l | |
# Search a file (or pattern) and execute a command (rm here) | |
$ find . -name ’*.yml’ -exec rm {} ; | |
# Add a line at the end of a file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// config file | |
# vi /storage/.config/hyperion.config.json | |
// restart service | |
# /bin/sh /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json |
OlderNewer