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
VERSION=7.3.2; | |
for REPO_NAME in `aws --region us-east-1 ecr-public describe-repositories | jq -r .repositories[].repositoryName | grep confluentinc`; do | |
docker pull $REPO_NAME:$VERSION; | |
docker tag $REPO_NAME:$VERSION public.ecr.aws/ews-network/$REPO_NAME:$VERSION; | |
docker push public.ecr.aws/ews-network/$REPO_NAME:$VERSION; | |
done | |
for REPO_NAME in `aws --region us-east-1 ecr-public describe-repositories | jq -r .repositories[].repositoryName | grep confluentinc`; do | |
docker rmi public.ecr.aws/ews-network/$REPO_NAME:$VERSION; | |
docker rmi $REPO_NAME:$VERSION; |
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
ARG BASE_IMAGE=public.ecr.aws/amazoncorretto/amazoncorretto:11 | |
ARG CONNECT_IMAGE=public.ecr.aws/ews-network/confluentinc/cp-server-connect:7.2.1 | |
FROM $BASE_IMAGE as certbuild | |
ADD https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem /etc/ssl/certs/rds-combined-ca-bundle.pem | |
ADD https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem /etc/ssl/certs/aws-global.pem | |
RUN yum install perl openssl gawk -y | |
RUN awk 'split_after == 1 {n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1}{print > "rds-ca-" n ".pem"}' < /etc/ssl/certs/rds-combined-ca-bundle.pem; \ | |
for CERT in rds-ca-*; do alias=$(openssl x509 -noout -text -in $CERT | perl -ne 'next unless /Subject:/; s/.*(CN=|CN = )//; print') ; echo "Importing $alias" ; keytool -import -file ${CERT} -alias "${alias}" -storepass changeit -keystore /var/opt/aws-rds.jks -noprompt ; done; \ | |
awk 'split_after == 1 {n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1}{print > "rds-ca-" n ".pem"}' < /etc/ssl/certs/aws-global.pem |
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 | |
git log --format="* %h %s (%aN)" |
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
{ | |
"after":"1481a2de7b2a7d02428ad93446ab166be7793fbb", | |
"before":"17c497ccc7cca9c2f735aa07e9e3813060ce9a6a", | |
"commits":[ | |
{ | |
"added":[ | |
], | |
"author":{ | |
"email":"lolwut@noway.biz", |
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
ipv4_ip = r'((((((([0-9]{1}\.))|([0-9]{2}\.)|(1[0-9]{2}\.)|(2[0-5]{2}\.)))){3})(((((([0-9]{1}))|([0-9]{2})|(1[0-9]{2})|(2[0-5]{2}))))){1,3})' | |
ipv4_ip_link = 'https://regex101.com/r/vIL3oX/3' | |
ipv4_cidr = r'((((((([0-9]{1}\.))|([0-9]{2}\.)|(1[0-9]{2}\.)|(2[0-5]{2}\.)))){3})(((((([0-9]{1}))|([0-9]{2})|(1[0-9]{2})|(2[0-5]{2}))))){1,3})\/(([0-9])|([1-2][0-9])|((3[0-2])))$' | |
ipv4_cidr_link = 'https://regex101.com/r/vIL3oX/4' |
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 specific file extension | |
(^(s3:\/\/)([a-z0-9.-]+)(\/+)?(\/[a-zA-Z0-9.-_\/]+(\/)?)?(\/)([\w-_.]+.sql)) | |
#For specific file extension or no extension at all | |
(^(s3:\/\/)([a-z0-9.-]+)(\/+)?(\/[a-zA-Z0-9.-_\/]+(\/)?)?(\/)([\w-_.]+)(.zip)?) |
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 | |
# creates a new TMUX session and opens windows in predefined folders, and for python, activates virtual environment | |
session=v2 | |
tmux new-session -s $session\; \ | |
send-keys 'cd /home/john/work/pe_v2_common' C-m \; \ | |
send-keys 'source .venv/bin/activate' C-m \; \ | |
new-window -t $session:1 \; \ | |
send-keys 'cd /home/john/work/pe_v2_core' C-m\; \ | |
send-keys 'source .venv/bin/activate' C-m \; \ |
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 | |
for region in $(aws ec2 describe-regions --region eu-west-1 | jq -r .Regions[].RegionName); do | |
echo "* Region ${region}" | |
# get default vpc | |
vpc=$(aws ec2 --region ${region} describe-vpcs --filter Name=isDefault,Values=true | jq -r .Vpcs[0].VpcId) | |
if [ "${vpc}" = "null" ]; then | |
echo "No default vpc found" |
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
lambda_layer_pattern = r'(^arn:aws:lambda:[a-z]{2}-[a-z]{1,12}-[0-9]{1}:[0-9]{12}:layer/[a-z]+:[0-9]+$) or (^[a-z]+:[0-9]+$)' |
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 images in `docker images |grep ecr | awk '{print $3}'`; do docker ps -a |grep $images | awk '{print $1}' | xargs -i -P10 docker rm {} ; docker rmi $images ; done |
NewerOlder