small pixel drawing of a pufferfish dotfiles

Add sh functions
j3s j3s@c3f.net
Mon, 14 Jun 2021 10:49:40 -0500
commit

888b4099a0783548162cf197eab3af5964325a05

parent

7afbc506196164839823ada1258fe7bd0262afe9

A bin/MACC02VK5ECHTD7/berksmass

@@ -0,0 +1,5 @@

+#!/bin/sh + +for i in test stage prod; do + CHEF_ENV=browse_$i bundle exec berks upload +done
A bin/MACC02VK5ECHTD7/bua

@@ -0,0 +1,15 @@

+#!/bin/sh -e + +# purge berks +# rm -f Berksfile.lock +# bundle exec berks install + +envs="test stage prod" + +for env in $envs; do + CHEF_ENV=browse_$env bundle exec berks upload & +done + +wait + +echo "upload complete"
A bin/MACC02VK5ECHTD7/ec2e

@@ -0,0 +1,26 @@

+#!/bin/sh + +query="$1" +shift 2> /dev/null +case "$query" in + (i-*) filter="id=$query" ;; + (*) filter="name=$query" ;; +esac + +text=$( + printf "$*" | \ + sed -e 's/bpe/-p browse_prod -r us-east-1/g' | \ + sed -e 's/bpw/-p browse_prod -r us-west-2/g' | \ + sed -e 's/bse/-p browse_stage -r us-east-1/g' | \ + sed -e 's/bsw/-p browse_stage -r us-west-2/g' | \ + sed -e 's/bte/-p browse_test -r us-east-1/g' | \ + sed -e 's/btw/-p browse_test -r us-west-2/g' | \ + sed -e 's/cpe/-p cgraph_prod -r us-east-1/g' | \ + sed -e 's/cpw/-p cgraph_prod -r us-west-2/g' | \ + sed -e 's/cse/-p cgraph_stage -r us-east-1/g' | \ + sed -e 's/csw/-p cgraph_stage -r us-west-2/g' | \ + sed -e 's/cte/-p cgraph_test -r us-east-1/g' | \ + sed -e 's/ctw/-p cgraph_test -r us-west-2/g' +) + +awless list instances --columns id,zone,name,state,type,privateip --filter "${filter}" $text
A bin/MACC02VK5ECHTD7/jws-ami

@@ -0,0 +1,9 @@

+#!/bin/sh + +TOKEN=$(grep token ~/.deploy/creds.yaml | sed 's/.*token: //g') + +for account in test stage prod cgraph_test cgraph_stage cgraph_prod; do + echo $account + curl -s -w "\n" --header "Authorization: Bearer $TOKEN" --header "Content-Type:application/json" "https://imr.monitoring.bestbuy.com/api/configuration/environments/$account" | + jq ".item.configuration.shared_$account.build_ami.centos" | grep us +done
A bin/MACC02VK5ECHTD7/rvm-shell

@@ -0,0 +1,1 @@

+/bin/sh
A bin/MACC02VK5ECHTD7/terraform

@@ -0,0 +1,3 @@

+#!/bin/sh + +AWS_PROFILE=cgraph_prod /usr/local/bin/terraform $@
A bin/MACC02VK5ECHTD7/uop

@@ -0,0 +1,11 @@

+#!/bin/sh -e +# +# pushes commits, makes PR, merges PR, uploads cookbooks + +# bail if git branch is master +# bail if git status is not settled + +git push -u origin HEAD +prnumber=$(bundle exec stash pull-request master | awk -F'pull-requests/' '{print $NF}') +bundle exec rake merge "$prnumber" +brm && bua