This file contains 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 chart version 2.3.41 | |
datadog: | |
logLevel: DEBUG | |
kubeStateMetricsEnabled: false | |
leaderElection: true | |
collectEvents: true | |
processAgent: | |
enabled: true | |
dogstatsd: | |
nonLocalTraffic: true |
This file contains 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 | |
# 0.23.0 terragrunt migration script | |
# behaviour of find_in_parent_folders() has changed to use absolute path | |
# https://github.com/gruntwork-io/terragrunt/releases/tag/v0.23.0 | |
# this has been test on macOS | |
# you might need to change some flags for certain distro of the commands used here | |
git stash save -u |
This file contains 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
# dump as per normal | |
# column statistics should be off by default | |
mysqldump -p -u <user> -h <host> --all-databases --comments --dump-date --column-statistics=0 > dump.sql | |
# replace rdsadmin user with your master user | |
sed -i -e 's/DEFINER=`rdsadmin`@`localhost`/DEFINER=`<masteruser>`@`%`/g' dump.sql | |
# one liner if you need to pipe to a remote host without a dump file as output | |
# this method wont work if password input is required | |
mysqldump -p -u <user> -h <host> \ |
This file contains 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
# annonymous | |
TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" \ | |
| jq -r .token) && curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest \ | |
| grep 'RateLimit' | |
# authenticated | |
# note that there should be no output | |
# https://docs.docker.com/docker-hub/download-rate-limit/#i-dont-see-any-ratelimit-headers | |
TOKEN=$(curl --user 'username:password' "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token) \ | |
&& curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest \ |
This file contains 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
# conditional expr | |
# select(.metadata.name == "abc") single test | |
# select(.metadata.name|test("abc.")) regex test | |
# final pipe expr prints in defined json shape | |
k get deploy --all-namespaces -o json | \ | |
jq '.items[] | select(.metadata.name|test("abc.") | not) | {"name":.metadata.name,"podSpec":.spec.template.spec}' |
This file contains 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
# docs are too subtle and sparing with obvious use cases | |
# search on tag | |
tag: value | |
# exclusion | |
-tag: my-value | |
# search on facet | |
@facetname: value |
This file contains 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
# update version | |
aws elasticbeanstalk update-environment --application-name <name> --environment-name <env> --version-label <version> | |
# update env var | |
aws elasticbeanstalk update-environment --environment-name my-env \ | |
--option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=PARAM1,Value=ParamValue |
This file contains 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
# rotate without restart if current connections are non SSL | |
for db in "db1" "db2"; do | |
aws rds modify-db-instance \ | |
--db-instance-identifier "$db" \ | |
--ca-certificate-identifier "rds-ca-2019" \ | |
--apply-immediately \ | |
--no-certificate-rotation-restart | |
done | |
# viewing certs |
This file contains 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 uninstall kubernetes-cli | |
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/d09d97241b17a5e02a25fc51fc56e2a5de74501c/Formula/kubernetes-cli.rb | |
brew pin kubernetes-cli |
This file contains 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
command: | |
- "/bin/sh" | |
- "-c" | |
args: | |
- | | |
echo hello | |
i=0 | |
while ((i<5)) | |
do | |
echo hello${i} |
NewerOlder