This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Fetch 24-hour AWS STS session token and set appropriate environment variables. | |
# See http://docs.aws.amazon.com/cli/latest/reference/sts/get-session-token.html . | |
# You must have jq installed and in your PATH https://stedolan.github.io/jq/ . | |
# Add this function to your .bashrc or save it to a file and source that file from .bashrc . | |
# Usage: aws-creds MFA_TOKEN [OTHER_AWS_STS_GET-SESSION-TOKEN_OPTIONS] | |
function aws-creds () { | |
if [[ ! $1 ]]; then | |
echo "aws-creds: missing required argument: MFA_TOKEN_CODE" 1>&2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
apt-get install curl | |
curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
echo deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main 9.4 | sudo tee /etc/apt/sources.list.d/postgres.list | |
#percona mysql | |
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A | |
echo deb http://repo.percona.com/apt trusty main | sudo tee /etc/apt/sources.list.d/percona.list |