This file contains 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
#!/bin/bash | |
check() | |
{ | |
if [ "$1" = "" ]; then | |
echo "Need a docker ID in argument"; | |
exit; | |
fi | |
} | |
check $1 |
This file contains 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
#!/bin/bash | |
# update package repo | |
apt_install () { | |
echo "Europe/Paris" > /etc/timezone | |
dpkg-reconfigure -f noninteractive tzdata | |
# sytem upgrade | |
apt-get update; apt-get upgrade -y |
This file contains 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
ps aux | grep node | |
# Find the process ID (second from the left): | |
kill -9 PRCOCESS_ID |
This file contains 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
# Run mongo with local config | |
alias mf="mongod -f /usr/local/etc/mongod.conf" |
This file contains 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
npm install --registry http://registry.npmjs.eu |
This file contains 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
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2 | tr ' ' '\n')" scp sftp ssh |
This file contains 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
#!/bin/bash | |
# | |
# CRM .bash_profile Time-stamp: "2008-12-07 19:42" | |
# | |
# echo "Loading ${HOME}/.bash_profile" | |
source ~/.profile # Get the paths | |
source ~/.bashrc # get aliases | |
# | |
#- end |
This file contains 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
ALTER TABLE `[[_TABLE_]]` ADD `date_insert` DATETIME NOT NULL , ADD INDEX ( `date_insert` ) ; | |
ALTER TABLE `[[_TABLE_]]` ADD `date_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP , ADD INDEX ( `date_update` ) ; | |
DROP TRIGGER IF EXISTS `Trigger_DateInsert_[[_TABLE_]]`; | |
DELIMITER // | |
CREATE TRIGGER `Trigger_DateInsert_[[_TABLE_]]` BEFORE INSERT ON `[[_TABLE_]]` | |
FOR EACH ROW BEGIN | |
SET NEW.`date_insert` = NOW(); |