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
| argocd login --username "foo" --password "bar" --insecure --port-forward --port-forward-namespace argocd --plaintext |
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 snap start amazon-ssm-agent | |
| sudo systemctl start snap.amazon-ssm-agent.amazon-ssm-agent.service |
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
| $ kubectl -n <NAMESPACE> get secret <SECRET> -o json | jq -r '.data."prometheus.yaml.gz"' | base64 -d | gunzip |
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
| aws secretsmanager list-secrets --query "SecretList[].Name" --output text |xargs |tr ' ' '\n' | xargs -I {} aws secretsmanager delete-secret --secret-id {} --force-delete-without-recovery |
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
| import requests | |
| # GitHub personal access token | |
| TOKEN = "your-token" | |
| # Source and destination repositories | |
| SOURCE_REPO = 'org1/repo1' | |
| DEST_REPO = 'org2/repo2' | |
| # Headers for authorization |
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
| certbot certonly --manual --email [email protected] --server https://acme-staging-v02.api.letsencrypt.org/directory - | |
| -test-cert --work-dir=. --config-dir=. --logs-dir=. --agree-tos -d test.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
| # make sure to update your slack hook and apply | |
| prometheusOperator: | |
| enabled: true | |
| prometheus: | |
| enabled: true | |
| server: | |
| statefulSet: | |
| enabled: true | |
| extraFlags: |
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
| CREATE DATABASE test; | |
| CREATE USER test WITH PASSWORD 'test'; | |
| GRANT ALL PRIVILEGES ON DATABASE test TO test; | |
| \c test | |
| GRANT ALL PRIVILEGES ON SCHEMA public TO test; | |
| GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO test; | |
| GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO test; | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO test; | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON SEQUENCES TO test; |
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
| pg_dump -U myuser -h localhost -d mydatabase --no-owner --no-privileges > mydatabase_backup.sql |
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 | |
| # Replace with your list of function names | |
| REGION=${1:-"us-east-1"} | |
| PROFILE=${2:-"default"} | |
| function_names=("lambda-1" "lambda-2") | |
| for function in "${function_names[@]}"; do | |
| echo "Downloading code for function: $function" |
NewerOlder