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 | |
SCRIPT_NAME='create-azure-service-principal-contrib.sh' | |
SCRIPT_DESCRIPTION='Creates an Azure AD service principal with Contributor rights' | |
SCRIPT_VERSION='1.2.2' | |
# Related documentation: | |
# - https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli | |
function display_usage() { |
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/sh | |
# Show date and time in other time zones | |
# Source: python - command-line world clock? - Stack Overflow | |
# https://stackoverflow.com/questions/370075/command-line-world-clock | |
function world_date(){ | |
if [ "$1"x != 'x' ]; then | |
search=$1 | |
else |
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
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
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
#jinja2:trim_blocks: True, lstrip_blocks: True | |
targets: | |
{% for privnet in all_private_subnets %} | |
- subnet_id: "{{ privnet }}" | |
security_groups: [ "{{ sg.group_id }}" ] | |
{% endfor %} | |
{% for pubnet in all_public_subnets %} | |
- subnet_id: "{{ pubnet }}" | |
security_groups: [ "{{ sg.group_id }}" ] | |
{% endfor %} |
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
# Bash Terraform completion | |
# Originally adapted from: https://gist.github.com/cornfeedhobo/8bc08747ec3add1fc5adb2edb7cd68d3 | |
# | |
# Author: Jeremy Melanson | |
# | |
# Features of this update: | |
# - Use built-in bash routines for text processing, instead of external tools (awk, sed, grep, ...). | |
# - fixes the retrieval of options from the Terraform executble. | |
# - Optional _init_terraform_completion function, which can enable command-completion for multiple Terraform executables. | |
# |
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
bind-key C-b send-prefix | |
bind-key C-o rotate-window | |
bind-key C-z suspend-client | |
bind-key Space next-layout | |
bind-key ! break-pane | |
bind-key " split-window | |
bind-key # list-buffers | |
bind-key $ command-prompt -I #S "rename-session '%%'" | |
bind-key % split-window -h | |
bind-key & confirm-before -p "kill-window #W? (y/n)" kill-window |
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 | |
# Installs or upgrades kubectl on Linux | |
# Chuck for root privileges | |
if [[ "$EUID" != "0" ]] ; then | |
echo "Please execute script with sudo or as root." | |
exit 1 | |
fi | |
# Check Dependencies |
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
function findr() { | |
# Find recently modified files in the current directory tree | |
SEARCH_PATH='./*' | |
NUMBER_OF_RESULTS=20 | |
while [[ $# -gt 0 ]]; do | |
case "$1" in | |
-h|--help) | |
DISPLAY_USAGE=TRUE | |
shift | |
;; |
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 | |
# An set of disks to ignore from partitioning and formatting | |
BLACKLIST="/dev/sda|/dev/sdb" | |
# Base directory to hold the data* files | |
DATA_BASE="/media" | |
usage() { | |
echo "Usage: $(basename $0) <new disk>" | |
} |
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
{ | |
"globals" : | |
{ | |
"alwaysShowTabs" : true, | |
"defaultProfile" : "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", | |
"initialCols" : 120, | |
"initialRows" : 30, | |
"keybindings" : | |
[ | |
{ |
NewerOlder