This file contains hidden or 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
| head -c16 /dev/urandom | md5sum |
This file contains hidden or 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
| # Set default aws-profile | |
| AWS_PROFILE=myprofile | |
| # Run sls with an aws-profile | |
| sls_with_aws_profile() { | |
| if [ -z ${AWS_PROFILE+x} ]; | |
| then printf "\e[1;31mAWS_PROFILE is not set\e[0m\n$ export AWS_PROFILE=profile_name\n" \ | |
| && return; | |
| fi | |
| export AWS_SDK_LOAD_CONFIG=true; |
This file contains hidden or 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
| alias ducks="du -cksh .[^.]* * 2> /dev/null | sort -h -r | head" |
This file contains hidden or 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
| import os | |
| import shutil | |
| HOME = os.path.expanduser('~') | |
| FILES = [ | |
| ".bashrc", | |
| ".vimrc", | |
| ] | |
This file contains hidden or 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
| version: 0.2 | |
| phases: | |
| install: | |
| commands: | |
| # install terraform binary | |
| - curl -s -qL -o terraform_install.zip https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip | |
| - unzip terraform_install.zip -d /usr/bin/ | |
| - chmod +x /usr/bin/terraform | |
| finally: |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| """ | |
| Git pre-push hook: | |
| Prevents pushing to protected branches | |
| """ | |
| import sys | |
| PROTECTED_BRANCHES = ["develop", "master"] |
This file contains hidden or 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
| tags = "${merge( | |
| var.common_tags, | |
| map( | |
| "Environment", "${var.env}" | |
| ) | |
| )}" | |
This file contains hidden or 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
| service: splitssm | |
| provider: | |
| name: aws | |
| ssm_var: ${ssm:x} | |
| ssm_var_split: { 'Fn::Split': [ ",", "${ssm:x}" ] } | |
This file contains hidden or 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
| sls_stack () { | |
| if [ -z "$1" ]; | |
| then | |
| output=$(sls info | grep -oP 'stack: \K.*$') | |
| else | |
| output=$(sls info -s $1 | grep -oP 'stack: \K.*$') | |
| fi | |
| if [ ! -z "$output" ]; | |
| then | |
| echo $output |
This file contains hidden or 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
| POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(virtualenv custom_pyenv) | |
| POWERLEVEL9K_CUSTOM_PYENV="echo \$(python -c 'import sys; print(\".\".join(map(str, sys.version_info[:2])))')" |