Skip to content

Instantly share code, notes, and snippets.

@tg
tg / add_healtcheck_ips_to_sg.sh
Last active August 10, 2018 16:29
Get AWS Route53 health check IPs
# This script adds aws route53 health check IPs to security group
# Requires jq to be installed (https://github.com/stedolan/jq)
# Pass security group ID as first argument and port (range) as a second
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json |
jq '.prefixes[] | select(.service == "ROUTE53_HEALTHCHECKS") | .ip_prefix' |
xargs -t -n1 aws ec2 authorize-security-group-ingress --group-id "$1" --protocol tcp --port "$2" --cidr
@tg
tg / gist:4520ff5e372cb54a15c2
Created January 5, 2015 10:21
OSX install mysql
sudo brew install mysql
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
sudo chown -R _mysql:_mysql /usr/local/var/mysql
sudo mysql.server start