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 | |
set -e | |
# See: | |
# - https://docs.commonfate.io/granted/getting-started/ | |
# - https://docs.commonfate.io/granted/usage/automatic-config-generation | |
# Remember to update MY_ORG_NAME! | |
SSO_URL=https://MY_ORG_NAME.awsapps.com/start/ | |
SSO_ORG=$(echo $SSO_URL | awk -F. '{print $1}' | awk -F/ '{print $NF}') |
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 | |
# CONVERT ALL MP3 FILES IN CURRENT DIRECTORY TO MP4 FILES WITH IMAGE AS BACKGROUND. | |
# See https://www.bannerbear.com/blog/how-to-convert-audio-to-video-for-youtube-upload-using-ffmpeg/#convert-mp3-to-mp4-with-an-image | |
# (Tested on MacOS) | |
ext=mp3 | |
image=image.jpg | |
mkdir -p mp4 log |
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
AWS_ARGS:=--profile $(AWS_PROFILE) --region $(AWS_REGION) | |
STACK_NAME:=some-infra | |
TEMPLATE_FILE:=some-infra.yaml | |
OWNER:="My Team" | |
CFN_TAGS:=--tags \ | |
Key=Owner,Value='$(OWNER)' \ | |
Key=DeployedBy,Value=CloudFormation |
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=SC2086 | |
ssm_sm(){ | |
[[ -n $DEBUG ]] && set -x | |
ARG1="$1" | |
get_name(){ | |
INSTANCENAME=$(aws ec2 describe-tags \ | |
--filters \ |
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
# Source: https://missionimpossiblecode.io/building-a-best-practice-cloudformation-custom-resource-pattern | |
Parameters: | |
SpecifyVPCToUse: | |
Description: > | |
DefaultVPC - finds the VPC and configures all of its subnets for you. Otherwise type | |
in the VPC id of a VPC in the same region where you run the template. | |
All subnets and azs of the chosen vpc will be used. | |
The VPC and chosen subnets must be setup in a way that allows the runner instances | |
to resolve the DNS name and connect to port 443 on the GitLab instance URL you provide. | |
Default: DefaultVPC |
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 | |
for r in `aws ec2 describe-regions --query 'Regions[].RegionName' --out text`; do | |
echo $r; | |
aws securityhub disable-security-hub --region $r; | |
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
# BASE | |
tap "homebrew/bundle" | |
tap "homebrew/cask" | |
tap "homebrew/core" | |
# BASE Apps | |
cask "joplin" | |
cask "bettertouchtool" | |
cask "visual-studio-code" | |
cask "bitwarden" |
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=1091,2068,2086,2162,2016 | |
STRING=pipeline | |
if command -v colours &> /dev/null; then source colours; fi | |
unset COUNT | |
[[ $* == *"--force"* ]] && FORCE=yes | |
[[ $* == *"--check"* ]] && CHECK=yes |
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=1091,2068,2162 | |
SSMSTRING=backend | |
BUCKSTRING=state | |
DDBSTRING=locks | |
if command -v colours &> /dev/null; then source colours; fi | |
unset COUNT | |
[[ $* == *"--force"* ]] && FORCE=yes |