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
| 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
| 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
| mysql -h <hostname> -u <username> -p -sN -e "select json_object('key1', 1, 'key2', 2);" <database> > <filename> |
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
| find /<path>/<to>/<base> -type d -empty -print | xargs -I '{}' rmdir '{}' |
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
| openssl rand -base64 30 | |
| date +%s | sha256sum | base64 | head -c 32 ; echo |
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
| dstat -v --disk-util -rn |
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 | |
| set -e | |
| # log to file if not running interactively | |
| if [[ ! -t 1 ]]; then | |
| exec >> >(tee /var/log/$(basename ${0%.*}).log) 2>&1 | |
| fi | |
| 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
| docker rm $(docker ps -q --filter "status=exited") |
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
| HOSTS=( | |
| host1 | |
| host2 | |
| host3 | |
| ) | |
| for HOST in "${HOSTS[@]}"; do ssh-keyscan $HOST >> $HOME/.ssh/known_hosts; done |