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
| docker run -it --rm --entrypoint=/bin/promtool -v "$PWD/alert.rules_hosts":/tmp/rules prom/prometheus:v1.7.1 check-rules /tmp/rules |
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
| docker run -i --rm --entrypoint=/bin/amtool prom/alertmanager:latest check-config < config.yml |
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
| NODE_OPTIONS="--max-old-space-size=4096" ./bin/kibana-plugin install https://github.com/bitsensor/elastalert-kibana-plugin/releases/download/1.0.1/elastalert-kibana-plugin-1.0.1-6.3.1.zip |
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
| #!/usr/bin/env bash | |
| ############################################################ | |
| # | |
| # cloudsend.sh | |
| # | |
| # Uses curl to send files to a shared | |
| # Nextcloud/Owncloud folder | |
| # | |
| # Usage: ./cloudsend.sh <file> <folderLink> |
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
| # Compile and install certificates for the Java trust keystore | |
| COPY certs/ /usr/local/share/ca-certificates/ | |
| RUN update-ca-certificates && \ | |
| ls -1 /usr/local/share/ca-certificates | while read cert; do \ | |
| openssl x509 -outform der -in /usr/local/share/ca-certificates/$cert -out $cert.der; \ | |
| "$JAVA_HOME/bin/keytool" -import -alias $cert -keystore "$JAVA_HOME/jre/lib/security/cacerts" -trustcacerts -file $cert.der -storepass changeit -noprompt; \ | |
| rm $cert.der; \ | |
| done |
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 --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root 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
| tar zcvf - MyBackups | ssh user@server "cat > /path/to/backup/foo.tgz" |
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
| from win32com.client import Dispatch | |
| import re | |
| outlook = Dispatch("Outlook.Application").GetNamespace("MAPI") | |
| inbox = outlook.GetDefaultFolder("6") | |
| all_inbox = inbox.Items | |
| for message in all_inbox: | |
| try: | |
| name = str(message.subject) |
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
| version: '3' | |
| services: | |
| nginx: | |
| environment: | |
| - "VIRTUAL_PORT=8080" | |
| - "VIRTUAL_HOST=bitwarden.example.com" | |
| - "LETSENCRYPT_HOST=bitwarden.example.com" | |
| - "LETSENCRYPT_EMAIL=lte@example.com" | |
| networks: | |
| - reverse-proxy |
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
| version: '3' | |
| services: | |
| nginx: | |
| environment: | |
| - "VIRTUAL_PORT=8080" | |
| - "VIRTUAL_HOST=bitwarden.example.com" | |
| - "LETSENCRYPT_HOST=bitwarden.example.com" | |
| - "LETSENCRYPT_EMAIL=lte@example.com" | |
| networks: | |
| - reverse-proxy |
OlderNewer