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
| delete_vpc_components() { | |
| echo aws ec2 "describe-${7}" --filters "Name=$4,Values=$3" --output text --query "*[*].$5" --region $1 | |
| for id in $(aws ec2 "describe-${7}" --filters "Name=$4,Values=$3" --output text --query "*[*].$5" --region $1) | |
| do | |
| echo "Deleting $2: $id" | |
| if [ "$2" == "internet-gateway" ] ; then | |
| aws ec2 detach-internet-gateway $6 $id --vpc-id $3 --region $1 | |
| fi | |
| aws ec2 "delete-${2}" $6 $id --region $1 | |
| done |
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
| #!/usr/bin/python | |
| # | |
| # Convert a Row-Based-Replication binary log to Statement-Based-Replication format, cheating a little. | |
| # | |
| # Additional added some code to transfer INSERT clauses to proper column names. | |
| # | |
| # Usage: mysqlbinlog -v --base64-output=DECODE-ROWS $log | python binlog-rbr-to-sbr.py -hHOST -uUSERNAME -pPASSWORD - | grep -B 1 '^INSERT ' | |
| # Based on: https://gist.github.com/shlomi-noach/cc243fd690403e7617e3 | |
| # |
NewerOlder