Skip to content

Instantly share code, notes, and snippets.

gffhcks /
Last active April 18, 2019 16:23
Get account ID from AWS profile (via role or MFA serial ARN)
#!/usr/bin/env python3
import argparse
import configparser
import os
import sys
CONFIG_PATH = os.path.expanduser("~/.aws/config")
CREDENTIALS_PATH = os.path.expanduser("~/.aws/credentials")
# Parse profile_name argument
gffhcks /
Last active June 27, 2016 15:01
Script to install a lot of common developer tools, and a few common developer distractions
# NOTE: For mas to work with free App Store apps, you MUST do this:
# Go to System Preferences/App Store, select 'Save Password' for Free Downloads.
# NOTE: The current version of 'mas' in homebrew does not prompt for passwords.
read -p "Mac App Store username: " masuser
read -s -p "Mac App Store password: " maspass
echo ""