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 | |
| # CHANGE THESE | |
| auth_email="[email protected]" | |
| auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings | |
| zone_name="example.com" | |
| record_name="www.example.com" | |
| # MAYBE CHANGE THESE | |
| ip=$(curl -s http://ipv4.icanhazip.com) |
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 Redirections Cheat Sheet | | |
| | | | |
| +---------------------------------------------------------------------------+ | |
| | | | |
| | Created by Peteris Krumins ([email protected]) | | |
| | www.catonmat.net -- good coders code, great coders reuse | | |
| | | | |
| +-----------------------------.---------------------------------------------+ |
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
| # 'EOF' vs EOF with escaping --> https://stackoverflow.com/a/25903579/752167 and https://unix.stackexchange.com/a/405254/308152 | |
| cat <<EOF >/etc/nginx/conf.d/subsonic-proxy.conf | |
| server { | |
| listen 80; | |
| server_name $SUBSONIC_SERVER_DOMAIN; | |
| location / { | |
| proxy_pass http://127.0.0.1:4040; | |
| proxy_set_header Host \$http_host; | |
| proxy_set_header X-Real-IP \$remote_addr; | |
| proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; |
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 | |
| # login with an account in wheel group and clone this gist to run | |
| # Tested on | |
| # $[cosgrom@vps ~]$ cat /etc/redhat-release | |
| # CentOS Linux release 7.6.1810 (Core) | |
| # $ cat /etc/os-release | |
| # NAME="CentOS Linux" | |
| # VERSION="7 (Core)" |
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
| Selection of bash snippets |
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
| Covers both tools |
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
| k3os: | |
| password: rancher | |
| boot_cmd: | |
| - sed -i -r 's/^(\s*PasswordAuthentication\s*)no(\s*)$/\1yes\2/i' /etc/ssh/sshd_config | |
| ssh_authorized_keys: | |
| - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCo6Z1dGE1cNKcsG2f8nqLWehWDBu2zo/3RBRKeMU60uJ1E4CokzKk5uH15Zjbsj/d97WlP0YQ20nFiWPhvDYK7gydAWQl/HuA+k3bG2+/YCnmx8IRuNrDAX3PR4iYyCo30BVjn4qHadO2JMQDSp7UeYs5JziOpQKqxTxuQAubbrMwnm7j+ckhIDSc0c9faKvhUiuyZny4gWtCTP/R3Z6k/1qW4MH2QE0oeVFQ2CUpkn/5ffyVDKo9S2rFamv5hwuktM5jVHW1L+mbB0kFOF1X5Iwq+KOihRcBNhNFubPXzhq/BEshBnDRqqMtjKFp0fcnEXlu8XAr7LTm8eKdU0P1L ubuntu@mgmt-tools |
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
| # an opinionated Tools VM set up based on using an OpsMan VM from pivnet | |
| # Intended to be used with BUCC, specifically https://github.com/matthewcosgrove/lab-ops | |
| # Intructions for pivnet | |
| # set env var | |
| export PIVNET_TOKEN="grab a token from the GUI" # Deprecated approach but works for now | |
| # Install | |
| wget https://github.com/pivotal-cf/pivnet-cli/releases/download/v1.0.4/pivnet-linux-amd64-1.0.4 | |
| sudo chmod +x pivnet-linux-amd64-1.0.4 |
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
| https://docs.microsoft.com/en-us/windows/wsl/install-manual | |
| https://github.com/FRC2539/pybot/wiki/Windows-WSL-Install | |
| https://github.com/FRC2539/pybot/wiki/WSL-Offline-Install | |
| https://stackoverflow.com/questions/52512026/is-it-possible-install-ubuntu-in-windows-10-wsl-without-microsoft-store | |
| https://docs.microsoft.com/en-us/windows/wsl/install-on-server | |
| # Stuck with 14.04 as Windows 10 is old and useless |