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 | |
# | |
# Assume the given role, and print out a set of environment variables | |
# for use with aws cli. | |
# | |
# To use: | |
# | |
# $ eval $(./iam-assume-role.sh) | |
# |
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
# The following is a ~/.zshrc function that exports an aws cli profile from ~/.aws/credentials to environment variables. | |
aws_env() { | |
export AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id --profile "$1"); | |
export AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key --profile "$1"); | |
export AWS_SESSION_TOKEN=$(aws configure get aws_session_token --profile "$1"); | |
export AWS_SECURITY_TOKEN=$(aws configure get aws_security_token --profile "$1"); | |
export AWS_DEFAULT_REGION=$(aws configure get region --profile "$1"); | |
echo "$1 environment variables exported"; | |
} |
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
Show hidden characters
// This is the settings file for git commit messages in Sublime Text inspired by http://chris.beams.io/posts/git-commit/. | |
// These settings will help assist in formatting git commit messages with the following - | |
// * Subject lines should be no more than 50 characters. | |
// * Other lines should wrap at 72 characters. | |
// | |
// It makes use of the AutoWrap package (https://github.com/randy3k/AutoWrap) to hard wrap lines. | |
// | |
// These settings put vertical rulers ar 50 chars and 72 chars and will hard wrap at 72 chars. | |
// These settings will only affect git commit messages because it is a syntax specific settings file. | |
// |
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
git config --global alias.lg "log --graph --pretty=format:'%C(bold blue)%h%C(reset) -%C(auto)%d%Creset %C(white)%s%C(reset) %Cgreen(%cr) %C(dim white)%an%Creset' --abbrev-commit --date=relative" | |
# this one sets Notepad++ as the git editor on Windows. Requires the npp.sh file from https://gist.github.com/3735365#file_npp.sh | |
git config --global core.editor ~/npp.sh |
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
# This will setup the colour and format of the Cygwin prompt and include git branch info. | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
COLOR_NONE="\[\e[0m\]" |