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
| ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJO5uH6Bj+dJPOfN9iRAxq4XHnIAI+iwvXgajHIXOeJu kube@xps17 |
The set lines
- These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
- With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
set -euxo pipefailis short for:
set -e
set -u
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 | |
| #### | |
| # Split MySQL dump SQL file into one file per table | |
| # based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump | |
| # TO be tested | |
| #### | |
| if [ $# -lt 1 ] ; then | |
| echo "USAGE $0 DUMP_FILE [TABLE]" |
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
| #_preseed_V1 | |
| #### Contents of the preconfiguration file (for bullseye) | |
| ### Localization | |
| # Preseeding only locale sets language, country and locale. | |
| d-i debian-installer/locale string en_FR | |
| # The values can also be preseeded individually for greater flexibility. | |
| #d-i debian-installer/language string en | |
| #d-i debian-installer/country string NL | |
| #d-i debian-installer/locale string en_GB.UTF-8 |
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
| # Install wifi drivers | |
| ------------------------------- | |
| apt-get update && apt-get install firmware-iwlwifi | |
| # Install graphic drivers | |
| ------------------------------- |
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.7' | |
| services: | |
| traefik: | |
| image: traefik:v2.2.0 | |
| ports: | |
| - "${FRONT_HTTP_PORT:-80}:80" | |
| # - "${TRAEFIK_PORT:-8080}:8080" | |
| environment: | |
| # - TRAEFIK_LOG_LEVEL=DEBUG | |
| - TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT=false |
This is tested with Traefik 1.7
This is how to redirect the root or base path to a sub path in Traefik using Docker labels:
Goals
https://example.com->https://example.com/abc/xyz/https://example.com/->https://example.com/abc/xyz/https://example.com/something-> no redirect
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
| if [ ! -f .env ] | |
| then | |
| export $(cat .env | xargs) | |
| fi |
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 | |
| # https://cloud.google.com/compute/docs/faq#find_ip_range | |
| # nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8 | |
| myarray=() | |
| for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :` | |
| do | |
| myarray+=($LINE) | |
| for LINE2 in `dig txt $LINE +short | tr " " "\n" | grep include | cut -f 2 -d :` |
NewerOlder