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
#!/usr/bin/env bash | |
set -euo pipefail | |
# A script to place in .git/hooks/ to perform | |
# some quick preliminary checks before committing | |
# code to the AzureRM Terraform Provider repo | |
# It assumes the repo dir is in $HOME | |
# To temporarily disable, you can do this: `USE_HOOK=false git commit` | |
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
const options = ["Lapis", "Papyrus", "Scalpellus"]; | |
const name = { | |
player: "Player", | |
computer: "J. Scripticus" | |
}; | |
const choice = { | |
player: null, | |
computer: null | |
}; |
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
# This TF config can be used in a root module to automatically | |
# structure Env0 after your Terraform repo. That is: | |
# - root modules (i.e. directories with .tf files, whose parent directories lack .tf | |
# files) become Env0 Templates | |
# - directories without .tf files become Env0 Projects (supports | |
# arbitrarily deep directories / sub-projects) | |
# - .tfvars files in root modules become Env0 Environments | |
# Example: if your repo looked like this: | |
# | |
# backends/ |
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
" taken from https://www.krenger.ch/blog/vim-settings-for-yaml-files/ | |
set ts=2 | |
set sts=2 | |
set sw=2 | |
set expandtab | |
syntax on | |
filetype indent plugin on | |
set ruler |
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
#!/usr/bin/env bash | |
set -e | |
usage() { | |
>&2 echo \ | |
"$0 - Import missing Azure service bus resources into Terraform state | |
Usage: $0 [h] TF_DIR | |
-v verbose | |
-h print this help message |
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
#!/usr/bin/env bash | |
# Generates a kebab case string of random words, defaults to 5 | |
# Expects a text file of new line delimited words at /usr/share/dict/words | |
# If you're on Ubuntu, try running e.g. sudo apt install wamerican | |
set -e | |
get_word() { | |
lines=$(cat /usr/share/dict/words | wc -l) | |
i=$(( ($lines + $RANDOM) % $lines )) | |
head -$i /usr/share/dict/words | tail -1 | tr -d '\n' | tr -d "'"; |