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
# export | |
# cd /usr/local/bin/ | |
mysqldump -username -password databasename > /home/user/directory/databasename.sql | |
# import | |
mysqladmin -u username -p create databasename | |
# cd /usr/bin | |
mysql -u username -p databasename < /home/user/directory/databasename.sql |
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
rsync -aWHvz --delete -e "ssh -i /home/user/.ssh/mykey" /path/to/source /path/to/destination |
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
<?php | |
class ConvertError2Exception | |
{ | |
/** | |
* Error string. | |
* Is null if there was no error | |
* | |
* @var string | |
*/ |
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 | |
# configs | |
SSH_USR='myuser' | |
DIR_SRC='/update/directory' | |
# destinations | |
SERVER1[0]='custom-app1' | |
SERVER1[1]='custom-app2' | |
SERVER1[2]='custom-app3' |
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
# Remove row duplicates | |
SELECT DISTINCTROW * INTO doublettesTable FROM uniqueTable; | |
# Count column duplicates | |
SELECT col, count(*) AS cnt | |
FROM table | |
GROUP BY col | |
HAVING cnt > 1; | |
# Count duplicates with two cols |
NewerOlder