Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/bash
#
# If an EC2 Instance tag Name matches a record in DNS (Route53) and the EC2 Instance is removed without Tidying Route53 Zone,
# This script will find the "orphaned" Zone records, and remove them.
#
rm -f /tmp/delete-r53.json
ZONEID=$(aws route53 list-hosted-zones-by-name |jq -r '.HostedZones[]|select (.Config.PrivateZone)|select (.Name|contains("example.com"))|.Id')
#
# Get a list of all DNS Records which don't have a running instance
#
@blofeldthefish
blofeldthefish / #running docker in docker on a Mac
Last active April 1, 2024 01:11
Running Docker in Docker (dind) on a Mac
# execute on Mac to create services:
docker-compose up -d
# "login" to client container:
docker exec -it my-docker-client sh
# within client container:
/ # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES