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 | |
# Run in temrinal session, before terraform init | |
# Launch using ". tf_log.sh" | |
# If NOT running on Mac, comment out last line | |
export TF_LOG=DEBUG | |
export TF_LOG_PATH=./TF_LOG.log | |
touch $TF_LOG_PATH | |
open /Applications/Utilities/Console.app $TF_LOG_PATH |
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
#!/usr/bin/env bash | |
# shellcheck disable=SC2034 | |
# API DOCUMENTATION: https://docs.datadoghq.com/api/latest/aws-integration/ | |
# ============================================================ | |
# TO BE REMOVED AND PROVIDED VIA EXPORTS | |
DD_API_KEY="DATADOG_API_KEY" | |
DD_APPLICATION_KEY="DATADOG_APPLICATION_KEY" | |
ACCOUNTID="AWS_ACCOUNT_ID" |
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
#!/usr/bin/env bash | |
array=(pluto pippo bob) | |
echo "array: ${array[*]}" | |
echo | |
addlist=(mike john) | |
echo "add list: ${addlist[*]}" | |
array+=(${addlist[*]}) | |
echo "${array[@]}" |
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
#!/usr/bin/env bash | |
# see: https://stackoverflow.com/questions/16860877/remove-an-element-from-a-bash-array | |
array=(pluto pippo bob john 1 56) | |
echo "array: ${array[*]}" | |
echo | |
delete=(pippo 56) | |
echo "delete: ${delete[*]}" | |
for target in "${delete[@]}"; do | |
for i in "${!array[@]}"; do |
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 | |
[[ "$1" == "yes" ]] || { echo "Specify \"yes\" to nuke Helix Native"; exit 0; } | |
echo | |
echo "NUKING HELIX NATIVE!" | |
echo | |
FOLDERS=( | |
"${HOME}/Library/Application Support/Line 6" |
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
#!/usr/bin/env bash | |
# Export AWS Well-Architected Tool Workload ARNs to CSV | |
usage(){ | |
echo "EXPORT WELL-ARCHITECTED TOOL WORKLOAD ARNs TO CSV | |
ARGUMENTS: | |
-d | --days \${number of days} - number of days to include (since last update). Default 3650 | |
-u | --upload | --arns - output APN portal upload-friendly CSV of ARNs only | |
-h | --help - this output |
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 | |
# Check if AWS Config is enabled in all regions | |
for r in $(aws ec2 describe-regions --query 'Regions[].RegionName' --out text); do | |
aws configservice describe-configuration-recorder-status --region $r --out yaml --query \ | |
'ConfigurationRecordersStatus[].{name:name,recording:recording,lastStatus:lastStatus}'; | |
done |
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
#!/usr/bin/env bash | |
# REGISTER OR DEREGISTER INSTANCES WITH/FROM ELB CLASSIC | |
## SANDBOX/PLAY ACCOUNT | |
ELBNAME=23feb22 | |
INSTANCES=( | |
i-0673baad826269229 # Name: dummy1 | |
i-0a72c8136b4ee5042 # Name: dummy2 | |
) |
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
#!/usr/bin/env bash | |
# Get supported EC2 instance types in the current account and region. If you | |
# only need to check for specific types, then specify them in types.txt in | |
# the script directory, otherwise it will process all available instance types | |
# in the region. Tested on MacOS. | |
# Prereqs: awscli, jq | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
TMPTYPES=/tmp/types |
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 | |
# Generate presigned URLs for every object in a given bucket | |
# Outputs markdown. Preview in IDE and copy to email. | |
# Prereqs: awscli, jq | |
EXPIRY=604800 # in SECONDS | |
BUCKET=$1 | |
OUTFILE=$BUCKET-signed-urls.md |
OlderNewer