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
| #!/bin/bash | |
| # Configuration | |
| DOMAINE="https://exemple.com/" # /!\ N'oublie pas le / à la fin | |
| FICHIER_LISTE="liste.txt" | |
| # Vérifier si le fichier liste existe | |
| if [ ! -f "$FICHIER_LISTE" ]; then | |
| echo "Erreur : $FICHIER_LISTE introuvable." | |
| exit 1 |
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
| #!/bin/bash | |
| MHOST="$1" | |
| MUSER="$2" | |
| MPASS="$3" | |
| MDB="$4" | |
| # Detect paths | |
| MYSQL=$(which mysql) | |
| AWK=$(which awk) | |
| GREP=$(which grep) |
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
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE > backup.sql | |
| docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE | gzip > backup.sql.gz | |
| docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE | bzip2 > backup.sql.bz2 | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE | |
| gunzip < backup.sql.gz | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE | |
| bunzip2 < backup.sql.bz2 | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE |
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
| # A heavily customized VCL to support WordPress | |
| # Some items of note: | |
| # Supports https | |
| # Supports admin cookies for wp-admin | |
| # Caches everything | |
| # Support for custom error html page | |
| vcl 4.0; | |
| import directors; | |
| import std; |
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
| #!/bin/bash | |
| USER="root" | |
| PASSWORD="" | |
| #OUTPUT="/Users/rabino/DBs" | |
| #rm "$OUTPUTDIR/*gz" > /dev/null 2>&1 | |
| databases=`mysql -e "SHOW DATABASES;" | tr -d "| " | grep -v Database` |
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
| * Bash and scripting : | |
| Text to ASCII Art Generator : http://patorjk.com/software/taag/#p=display&f=Graffiti&t=Type%20Something%20 |
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
| parameters: | |
| # source: https://developers.google.com/public-data/docs/canonical/countries_csv | |
| matching.country.isocode.location: | |
| # Andorra | |
| AD: | |
| lat: 42.546245 | |
| lng: 1.601554 | |
| # United Arab Emirates | |
| AE: | |
| lat: 23.424076 |