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
| # Shell prompt based on the Solarized Dark theme. | |
| # Screenshot: http://i.imgur.com/EkEtphC.png | |
| # Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles | |
| # iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing. | |
| if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then | |
| export TERM='gnome-256color'; | |
| elif infocmp xterm-256color >/dev/null 2>&1; then | |
| export TERM='xterm-256color'; | |
| fi; |
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
| #env variables | |
| export COMMAND_MODE=unix2003 | |
| export HISTTIMEFORMAT='%Y-%m-%d %H:%M:%S - ' | |
| export HISTSIZE=10000000 | |
| export HISTFILESIZE=20000000 | |
| export HISTCONTROL=ignoredups:ignorespace | |
| export EDITOR='subl -w' | |
| STARTCOLOR='\e[0;32m'; | |
| ENDCOLOR='\e[0m' | |
| export PS1="$STARTCOLOR\u@\h \w> $ENDCOLOR" |
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
| #!/bin/bash | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| brew install caskroom/cask/brew-cask | |
| brew cask install google-chrome | |
| brew cask install sublime-text | |
| brew cask install iterm3 | |
| brew cask install caffeine |
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
| $ cat statefile-generator.tf | |
| data "template_file" "state_tf" { | |
| template = <<EOF | |
| terraform { | |
| backend "s3" { | |
| bucket = "${var.state_bucket}" | |
| encrypt = "true" | |
| key = "${var.region}/${var.resource}/terraform-remote-state-${var.resource}-${var.region}.tfstate" | |
| region = "${var.state_bucket_region}" | |
| } |
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
| cat gen_statefile.sh | |
| #!/bin/bash -x | |
| TYPE=$1 | |
| REGION=$2 | |
| if [ -n "${REGION}" ] || [ -n "${TYPE}" ] | |
| then | |
| rm -rf /tmp/tmpstate | |
| git clone ssh://git@github.com/ringdna/tfmodule_statefile-generator.git .statefile |
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
| pipeline { | |
| agent any | |
| environment { | |
| DB_CURRENT = sh(returnStdout: true, script: '''mysql -ss -e 'select max(version) from schema_version' ringdna''') | |
| DB_DEPLOYS = sh(returnStdout: true, script: '''ls /home/ubuntu/ringdna/server/app/db/deploy | cut -d '_' -f1 | cut -c2-''') | |
| DID = "${JOB_NAME}-${BUILD_ID}" | |
| ENV = "${JOB_NAME}" | |
| IMAGE_ID = 'ami-04b45e6b88ad390ad' |
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
| #!/bin/bash | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| brew install caskroom/cask/brew-cask | |
| brew cask install google-chrome | |
| brew cask install sublime-text | |
| brew install coreutils | |
| brew install findutils |
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
| terraform { | |
| required_version = "~> 0.12.0" | |
| } | |
| data "terraform_remote_state" "vpc-subnet" { | |
| backend = "s3" | |
| config = { | |
| bucket = "mgmt-us-east1-js-tf-state" | |
| region = "us-east-1" | |
| key = "mgmt_vpc.tfstate" |
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
| joesindel at joes-MBP in ~/Documents/repos/ringdna/packer on master [!] | |
| $ tree | |
| . | |
| ├── Jenkinsfile | |
| ├── README.md | |
| ├── ubuntu-api | |
| │ ├── scripts | |
| │ │ ├── api-envvars.sh | |
| │ │ ├── api.service | |
| │ │ ├── application.conf.tmpl |
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
| #!/bin/bash | |
| MAC=$(curl -s http://169.254.169.254/latest/meta-data/mac/) | |
| VPCID=$(curl -s http://169.254.169.254/latest/meta-data/network/interfaces/macs/${MAC}/vpc-id/) | |
| if [[ $VPCID == vpc-fd264e9b ]] | |
| then | |
| export ENV=prod |
NewerOlder