I hereby claim:
- I am dazza-codes on github.
- I am dweberconsulting (https://keybase.io/dweberconsulting) on keybase.
- I have a public key ASCpAAiwOwamDMGKlH2RIq30UzV1NpecET3EChmdtkeAZwo
To claim this, I am signing this object:
#!/bin/bash | |
# check modified (M) ruby (.rb) files with rubocop | |
git status --porcelain | grep '^ M.*.rb' | cut -c4- | xargs -r rubocop |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env bash | |
mkdir -p iam_roles | |
if [ ! -f roles.json ]; then | |
aws iam list-roles --output json > iam_roles/roles.json | |
fi | |
roles=$(jq '.Roles[].RoleName' iam_roles/roles.json | sed -n 's/"//gp') |
#!/usr/bin/env bash | |
# shellcheck disable=SC1090 | |
source ~/bin/aws_profile.sh | |
aws-profile org-main-e1 | |
aws elbv2 describe-load-balancers | jq -r '.LoadBalancers[].DNSName' | |
# shellcheck disable=SC2086 | |
aws apigateway get-rest-apis | jq -r '.items[] | "https://\(.id).execute-api.'${AWS_DEFAULT_REGION}'.amazonaws.com/\(.tags.STAGE)"' |
AWS documentation
A python script to parse a policy from a policy document:
#!/usr/bin/env python | |
import pandas as pd | |
from sqlalchemy import create_engine | |
engine = create_engine('sqlite://', echo=True) | |
df = pd.read_csv("/tmp/input.csv") | |
df.to_sql('input', con=engine) |
#!/usr/bin/env bash | |
#=============================================================================== | |
# | |
# FILE: docker_clean.sh | |
# | |
# USAGE: ./docker_clean.sh | |
# | |
# DESCRIPTION: | |
# |
#!/usr/bin/env bash | |
hour_trunc12 () { | |
hr=$1 | |
echo "12 * ($hr / 12)" | bc | |
} | |
# # 00 hours | |
# echo $(hour_trunc12 0) #> 0 | |
# echo $(hour_trunc12 11) #> 0 |
#!/usr/bin/env bash | |
vpc="$VPC_ID" | |
region="$AWS_DEFAULT_REGION" | |
aws ec2 describe-vpc-peering-connections --region $region --filters 'Name=requester-vpc-info.vpc-id,Values='$vpc | grep VpcPeeringConnectionId | |
aws ec2 describe-nat-gateways --region $region --filter 'Name=vpc-id,Values='$vpc | grep NatGatewayId | |
aws ec2 describe-instances --region $region --filters 'Name=vpc-id,Values='$vpc | grep InstanceId | |
aws ec2 describe-vpn-gateways --region $region --filters 'Name=attachment.vpc-id,Values='$vpc | grep VpnGatewayId | |
aws ec2 describe-network-interfaces --region $region --filters 'Name=vpc-id,Values='$vpc | grep NetworkInterfaceId |