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
| curl 'https://lkqonline.com/b2cportal/api/Part/GetParts' -H 'Origin: https://lkqonline.com' -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json, text/plain, */*' --data-binary '{"Years":[2018,2019],"Makes":["HONDA"],"Models":["ACCORD"],"Categories":["B2CPortal|Suspension|Steering Parts|Power Steering Pump/Motor"],"AftermarketExcludedPLines":[],"LinesOfBusinessIds":[2],"Take":12,"Skip":0,"IsNationalSearch":true,"Sort":[{"SortProperty":"salvagegeo","SortDirection":"asc"},{"SortProperty":"aftermarketsequence","SortDirection":"asc"}],"IsPartSearch":true,"DoPricingAndAvailability":true,"IsFacetOnly":false,"isPartSearch":true,"ObjectSizeType":0}' |
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
| pssh -h </path/to/file> -l root -t 0 -i 'echo hello world!' |
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 base64 import b64decode | |
| from kubernetes import client, config | |
| config.load_kube_config() | |
| v1 = client.CoreV1Api() | |
| secret = v1.read_namespaced_secret('<secret-name>', 'default') | |
| value = b64decode(secret.data["<property-name>"]) | |
| print(value) |
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) |
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
| # 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
| # 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
| $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
| git pull --depth=1 | |
| git gc --prune=all |