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 | |
# Brings up a Linode VPS with Debian kernel with git, SSH, Docker and firewall installed | |
# <UDF name="sys_hostname" label="System hostname" default="myvps" example="Name of your server, i.e. linode1." /> | |
# <UDF name="user_name" label="User account name" example="This is the account that you will be using to log in." /> | |
# <UDF name="user_password" label="User password" /> | |
# <UDF name="user_sshkey" label="Public Key for user" default="" example="Recommended method of authentication. It is more secure than password log in." /> | |
# fail immediately if cmd fails; unset env variables will fail the script: | |
set -e | |
set -u |
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 | |
# Configure homebrew permissions to allow multiple users to call 'brew'. | |
# Any user from the staff group will be able to manage the homebrew and cask installation on the machine. | |
# in newer macOS version (>= HighSierra ?), changing perms on /usr/local itself is rejected | |
sudo chgrp -R staff /usr/local/* | |
sudo chmod -R g+w /usr/local/* |
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
# calculate IP address range from CIDR notation | |
# https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing | |
function cidrToIpRange { | |
param ( | |
[string] $cidrNotation | |
) | |
$addr, $maskLength = $cidrNotation -split '/' | |
[int]$maskLen = 0 |