start new:
tmux
start new with session name:
tmux new -s myname
| #!/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() { |
| #!/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 |
| # 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 |
| #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 %} |
| # 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. | |
| # |
| 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 |
| #!/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 |
| 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 | |
| ;; |
| #!/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>" | |
| } |