Skip to content

Instantly share code, notes, and snippets.

Jodie Cunningham jodiecunningham

Block or report user

Report or block jodiecunningham

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jodiecunningham /
Created Aug 9, 2015
Shut down idle AWS plex instance
#set -x
# Runs via cron to shut down the instance if it's not in use for 5 minutes
# Starts checks after it's been up more than 500secs
# Won't kick you out if you're ssh'ed in and it's idle.
# crontab -l|grep idle
# */6 * * * * /root/bin/ >/dev/null 2>&1
until $(awk '$1>500{exit 1}' /proc/uptime)
jodiecunningham /
Created Aug 9, 2015
AWS Startup on-demand script
# Install the AWS CLI, set up an IAM user for the instance(s) you want to control.
# Pull the AWS keys for the IAM user and run aws configure to add them.
# I run this on Sophos UTM and have Sophos run a reverse proxy from the \
# $ROUTERIP:32400 to $PLEXHOST:32400
# set -x
# started with screen -Sdm a '/root/bin/'een -Sdm a '/root/bin/'screen -Sdm a '/root/bin/'screen -Sdm a '/root/bin/'n -Sdm a '/root/bin/'
You can’t perform that action at this time.