Skip to content

Instantly share code, notes, and snippets.

View AstroTom's full-sized avatar

Tom Rosenfeld AstroTom

View GitHub Profile
@AstroTom
AstroTom / ami-clean.sh
Last active May 10, 2021 11:26 — forked from jdowning/ami-clean.sh
Script to clean up Ubuntu EC2 instance before packaging as an AMI
#!/bin/bash
# This script cleans up your EC2 instance before baking a new AMI.
# this works on Ubuntu (18+)
# Run the following command in a root shell:
#
# bash <(curl -s https://gist.githubusercontent.com/AstroTom/fb0f54d125d38574eae76f57c188c4f0/raw/ami-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
@AstroTom
AstroTom / add-dns-record.sh
Last active May 10, 2018 05:54 — forked from justinclayton/add-dns-record.sh
CLI to add DNS Records in Route53
#!/bin/bash
set -eo pipefail
## Allows for creation of "Basic" DNS records in a Route53 hosted zone
# Make sure all output is in json
export AWS_DEFAULT_OUTPUT=json
function main() {