import logging
# create a new logger
logger = logging.getLogger('main')
# set logger level
logger.setLevel(logging.DEBUG)
# stream log into console by creating a handler
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
creation_rules: | |
- filename_regex: '.*/secrets\.y(a)?ml$' # looking for all `secrets.yaml` files and encrypt | |
kms: 'arn:aws:kms:AWS_REGION:12345678912:alias/KMS_ALIAS' | |
aws_profile: PROFILE |
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
## checkout to all branches in remote | |
``` | |
#!/bin/bash | |
#Whenever you clone a repo, you do not clone all of its branches by default. | |
#If you wish to do so, use the following script: | |
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v main `; do | |
git branch --track ${branch#remotes/origin/} $branch | |
done |
- fetch public certificate to a website
openssl s_client -connect example.com:443 -showcerts </dev/null 2>/dev/null | openssl x509 -outform PEM > ca.crt
- generate self-signed certificate
openssl req -newkey rsa:2048 -nodes -keyout client.key -x509 -days 365 -out client.crt
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
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa | |
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa | |
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa |