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
| hostnamectl set-hostname NEW_NAME_HERE |
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
| sudo ethtool eth0 | grep Speed |
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
| sudo python -m pip install pip==18.0 --upgrade |
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
| git pull --depth=1 | |
| git gc --prune=all |
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
| $TAG_NAME=??? | |
| curl -s -H 'Metadata:true' 'http://169.254.169.254/metadata/instance?api-version=2017-08-01' | jq '.compute.tags' | sed -e 's/"/;/g' | sed -e "s/.*;${TAG_NAME}:\(.*\);.*/\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
| # preserves source directory structure on target | |
| tar cf - /<path>/<to>/<dir> | ssh <target-server> tar xf - |
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
| # preserves source directory structure on target | |
| sudo xfsdump -l0 -s <relative>/<path> - /<device> | ssh <target-server> xfsrestore - /<device> |
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
| rsync -aHAXz --checksum --partial --delete --progress /<path>/<to>/<dir> <target-server>:/<path>/<to>/<dir>/ |
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 azure.common.credentials import get_azure_cli_credentials | |
| credentials, subscription_id = get_azure_cli_credentials(resource="https://vault.azure.net") | |
| kv_client = KeyVaultClient(credentials=credentials) | |
| kv_secret = kv_client.get_secret("https://<vault-name>.vault.azure.net/", "<secret-name>", "") | |
| print(kv_secret.value) |