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
| source_up | |
| dotenv | |
| source_env_if_exists .envrc.local | |
| # Sops | |
| if [[ -f .sops.yaml ]]; then | |
| export SOPS_CONFIG="$PWD/.sops.yaml" | |
| fi | |
| # Load encrypted ENVs |
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
| brew install age-plugin-yubikey age | |
| mkdir -p ~/.config/sops/age | |
| SLOT=1 | |
| age-plugin-yubikey --generate \ | |
| --slot $SLOT \ | |
| --name "age yk-xyz" \ | |
| --pin-policy once \ | |
| --touch-policy always \ |
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 . -type f -name "*.yaml" -exec grep -l "sops:" {} + | xargs -I {} sops updatekeys -y "{}" |
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 budle ca store for updates: | |
| grep -i "AUTOUPDATECERTSDIR=" /usr/syno/bin/update-ca-certificates.sh | |
| # Remove the compromised root certs | |
| rm /var/db/ca-certificates/emSign_Root_CA_-_G1.crt | |
| rm /var/db/ca-certificates/emSign_Root_CA_-_C1.crt | |
| rm /var/db/ca-certificates/emSign_ECC_Root_CA_-_G3.crt | |
| rm /var/db/ca-certificates/emSign_ECC_Root_CA_-_C3.crt | |
| rm /var/db/ca-certificates/Comodo_AAA_Services_root.crt |
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 -e | |
| # THE SIMPLE SPARTA WAY, BE CAREFULL | |
| # UPDATE stores/root as per your needs | |
| # 1. Define paths (Change these if your paths are non-default) | |
| STORE_DIR="$HOME/.local/share/gopass/stores/root" # Check ~/.password-store if not here | |
| AGE_KEY="$HOME/.config/gopass/age/identities" # Your private age identity key | |
| age -d -o $AGE_KEY.temp $AGE_KEY || exit 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
| # gopass | |
| EDITOR=vi gopass insert me/api/xyz_api_key | |
| XYZ_API_KEY="$(gopass -o me/api/xyz_api_key)" | |
| # python | |
| python -m keyring set XYZ_API_KEY <username> | |
| python -m keyring get XYZ_API_KEY <username> | |
| # MacOS | |
| get_secret() { |
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 | |
| # List the blobs in an Azure storage container. | |
| echo "usage: ${0##*/} <container-name> [blob-name]" | |
| storage_account="$AZURE_STORAGE_ACCOUNT" | |
| container_name="$1" | |
| access_key="$AZURE_STORAGE_KEY" |
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
| # for hdd | |
| device=sata4; sudo sh -c "echo 1 > /sys/block/${device}/device/delete" | |
| # for usb | |
| udisksctl power-off -b /dev/sdd |
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
| for REPO in $(gcloud alpha container images list --repository=gcr.io/volterraio --sort-by="~TIMESTAMP"|grep -Ev '^NAME'); do \ | |
| gcloud container images list-tags $REPO --format="table[no-heading](DIGEST,TIMESTAMP)"|\ | |
| grep 2024-08 | xargs -I% echo $(basename $REPO) %; done |\ | |
| clipivot count --rows=0 --val=3 |sort -g -t, -k2 -r |head -n 50 |
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 sntp -sS time.apple.com | |
| Password: | |
| +9763418.309211 +/- 0.019967 time.apple.com 17.253.14.253 |
NewerOlder