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
locals { | |
redis-viewer = [ | |
ibm_database.team1-redis-us-south-uat.id, | |
ibm_database.team3-redis-uat.id, | |
ibm_database.team1-redis-us-south-prod.id | |
] | |
# Processes out the resource_instance_id | |
redis-viewer-processed = [for infra in local.redis-viewer : element(split(":", infra), 7)] | |
rabbitmq-viewer = [ |
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 | |
# finds every file in the directory specified starting with '#!' and ending with 'bash' on the same line | |
# i.e. #!/bin/bash this allows us to only shellcheck shell files, but this would | |
# have been a lot simpler if the shell files all had .sh extensions | |
# added --serverity option due to egregious output in CICD, valid values in order of severity are | |
# error, warning, info and style. The default is style. | |
for file in $(find source/legacy -type f -exec awk '/^#!.*bash/{r=1};{exit} END {exit(1-r)}' {} \; -print) | |
do |
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 | |
# fancy regex will parse 0.8.39, can be used to parse semver | |
VERSION_FROM_SETUP=$(sed -n 's/^ *version="\([^"]*\).*/\1/p' setup.py) | |
# example setup.py file, start multi-line comment | |
: ' | |
import setuptools | |
import os | |
setuptools.setup( |
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 | |
# this script will run in Travis CICD, identify changed files | |
# and save the directories of the files if a condition is met, | |
# it will then print the array of matching directories | |
if [[ "$TRAVIS_EVENT_TYPE" == "push" ]]; then | |
# collect only changed files from commit | |
files=($(git diff-tree --no-commit-id --name-only -r "$TRAVIS_COMMIT")) | |
elif [[ "$TRAVIS_EVENT_TYPE" == "pull_request" ]]; then | |
# collect all changed files from commit range |
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 | |
# Michelle L. Gill | |
# 2014/10/25 | |
# For use with Today Scripts | |
# http://www.reddit.com/r/osx/comments/2k24ps/today_scripts_widget_update_colorized_output | |
# Inspired by: https://gist.github.com/anonymous/470bb40b05173fdb6348 | |
# Set this to "cpu" or "mem" | |
procname="cpu" |
NewerOlder