Last active
January 7, 2026 23:46
-
-
Save darkn3rd/9e935aaf21d083ee462fdc344bdd15c9 to your computer and use it in GitHub Desktop.
Dev Tools Ubuntu 24 and Windows
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 | |
| update_homebrew_path() { | |
| # Google Style: Declare locals at the top. | |
| # Capitalized because these will hold environment-like path strings. | |
| local BREW_PREFIX | |
| local GNU_PATHS | |
| local KEG_PATHS | |
| local RAW_COMBINED | |
| local DEDUPE_LOGIC | |
| if ! command -v brew &>/dev/null; then return fi | |
| BREW_PREFIX="$(brew --prefix)" | |
| # 1. Collect GNU 'gnubin' paths | |
| # Use printf to handle glob expansion into a colon-separated string safely. | |
| GNU_PATHS=$(printf "%s:" "${BREW_PREFIX}/opt/"*"/libexec/gnubin") | |
| # 2. Collect 'keg-only' bin paths (2026 JSON method) | |
| # Style: Pipes are placed on their own lines or at start of lines. | |
| KEG_PATHS=$( | |
| brew info --installed --json=v1 \ | |
| | jq -r 'map(select(.keg_only == true)) | .[].name' \ | |
| | while read -r PKG; do | |
| if [[ -d "${BREW_PREFIX}/opt/${PKG}/bin" ]]; then | |
| printf "%s:" "${BREW_PREFIX}/opt/${PKG}/bin" | |
| fi | |
| done | |
| ) | |
| # Combine gathered paths. Note: We do not include global $PATH here | |
| # because the user will append it outside this function. | |
| RAW_COMBINED="${GNU_PATHS}${KEG_PATHS}" | |
| # 3. Deduplicate the resulting string | |
| DEDUPE_LOGIC='print join ":", grep { ! $seen{$_}++ } split /:/, shift' | |
| # Output the final string to stdout (no leading/trailing colons) | |
| perl -e "${DEDUPE_LOGIC}" "${RAW_COMBINED}" \ | |
| | sed 's/^://; s/:$//' | |
| } | |
| brew install \ | |
| autoconf \ | |
| bash \ | |
| bc \ | |
| binutils \ | |
| coreutils \ | |
| curl \ | |
| diffutils \ | |
| ed \ | |
| findutils \ | |
| flex \ | |
| gawk \ | |
| git \ | |
| gnu-indent \ | |
| gnu-sed \ | |
| gnu-tar \ | |
| gnu-which \ | |
| gpatch \ | |
| grep \ | |
| gzip \ | |
| jq \ | |
| less \ | |
| m4 \ | |
| make \ | |
| nano \ | |
| screen \ | |
| watch \ | |
| wdiff \ | |
| wget \ | |
| zip \ | |
| zsh | |
| # Update Paths | |
| NEW_PATHS="$(update_homebrew_path)" | |
| export PATH="${NEW_PATHS}:${PATH}" |
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
| # install AWS CLI | |
| choco install -y awscli | |
| choco install -y okta-aws-cli | |
| # install packages | |
| choco install -y terraform | |
| choco install -y vault | |
| choco install -y kubernetes-cli # kubectl | |
| choco install -y kubernetes-helm # helm | |
| choco install -y corretto17jdk # keytool | |
| # Helmfile and Kustomize | |
| choco install -y kustomize | |
| choco install -y kubernetes-helmfile |
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
| # install msys2 | |
| pacman -Sy | |
| pacman -S mingw-w64-ucrt-x86_64-toolchain | |
| pacman -S git | |
| # make Windows tools accessible from bash shell | |
| CHOCO_PATH=/c/ProgramData/chocolatey/bin | |
| CORRETTO_PATH=/c/Program\ Files/Amazon\ Corretto/jdk17.0.17_10/bin | |
| export PATH=$PATH:$CHOCO_PATH:$CORRETTO_PATH | |
| echo "export PATH=$PATH:$CHOCO_PATH:$CORRETTO_PATH" >> ~/.bash_profile |
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 | |
| add_hashicorp_repo() { | |
| KEY="/usr/share/keyrings/hashicorp-archive-keyring.gpg" | |
| sudo rm -rf $KEY | |
| # Install HashiCorp's GPG key to package provided keyring area | |
| wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o $KEY | |
| # Add the official HashiCorp repository to your system. | |
| ARCH=$(dpkg --print-architecture) | |
| CODE=$(grep -oP '(?<=UBUNTU_CODENAME=).*' /etc/os-release) | |
| OPTIONS="arch=$ARCH signed-by=$KEY" | |
| URI="https://apt.releases.hashicorp.com " | |
| echo "deb [$OPTIONS] $URI $CODE main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | |
| } | |
| add_kubernetes_repo() { | |
| KEY="/usr/share/keyrings/kubernetes-apt-keyring.gpg" | |
| sudo rm -rf $KEY | |
| # Install Kubernetes's GPG key to package provided keyring area | |
| wget -O - https://pkgs.k8s.io/core:/stable:/v1.35/deb/Release.key | sudo gpg --dearmor -o $KEY | |
| # Add the official Kubernetes repository to your system. | |
| OPTIONS="signed-by=$KEY" | |
| URI="https://pkgs.k8s.io/core:/stable:/v1.35/deb/" | |
| echo "deb [$OPTIONS] $URI /" | sudo tee /etc/apt/sources.list.d/kubernetes.list | |
| } | |
| add_helm_repo() { | |
| KEY="/usr/share/keyrings/helm.gpg" | |
| sudo rm -rf $KEY | |
| # Install Helms's GPG key to package provided keyring area | |
| wget -O - https://packages.buildkite.com/helm-linux/helm-debian/gpgkey | sudo gpg --dearmor -o $KEY | |
| # Add the official Helm repository to your system. | |
| OPTIONS="signed-by=$KEY" | |
| URI="https://packages.buildkite.com/helm-linux/helm-debian/any/" | |
| echo "deb [$OPTIONS] $URI any main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list | |
| } | |
| add_corretto_repo() { | |
| KEY=/usr/share/keyrings/corretto-keyring.gpg | |
| sudo rm -rf $KEY | |
| # Install Corretto's GPG key to package provided keyring area | |
| wget -O - https://apt.corretto.aws/corretto.key | sudo gpg --dearmor -o $KEY | |
| # Add the official Corretto repository to your system. | |
| OPTIONS="signed-by=$KEY" | |
| URI="https://apt.corretto.aws" | |
| echo "deb [$OPTIONS] $URI stable main" | sudo tee /etc/apt/sources.list.d/corretto.list | |
| } | |
| install_binary_kustomize() { | |
| curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash | |
| sudo mv ~/kustomize /usr/local/bin | |
| } | |
| install_binary_helmfile() { | |
| ARCH="amd64" | |
| VER="1.2.3" | |
| URL="https://github.com/helmfile/helmfile/releases/download/v$VER/helmfile_${VER}_linux_$ARCH.tar.gz" | |
| TEMP_DIR=$(mktemp -d) | |
| wget -qO- "$URL" | tar -xz -C "$TEMP_DIR" | |
| sudo mv $TEMP_DIR/helmfile /usr/local/bin | |
| rm -rf "$TEMP_DIR" | |
| } | |
| install_binary_okta_aws_cli() { | |
| ARCH="amd64" | |
| VER="2.5.1" | |
| URL="https://github.com/okta/okta-aws-cli/releases/download/v$VER/okta-aws-cli_${VER}_linux_$ARCH.tar.gz" | |
| TEMP_DIR=$(mktemp -d) | |
| wget -qO- "$URL" | tar -xz -C "$TEMP_DIR" | |
| sudo mv $TEMP_DIR/okta-aws-cli /usr/local/bin | |
| rm -rf "$TEMP_DIR" | |
| } | |
| install_binary_aws_cli() { | |
| TEMP_DIR=$(mktemp -d) | |
| wget "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -P $TEMP_DIR | |
| unzip $TEMP_DIR/awscli-exe-linux-x86_64.zip -d $TEMP_DIR | |
| sudo $TEMP_DIR/aws/install | |
| rm -rf TEMP_DIR | |
| } | |
| # Add Debian/Ubuntu Repos | |
| add_hashicorp_repo | |
| add_kubernetes_repo | |
| add_helm_repo | |
| add_corretto_repo | |
| sudo apt update | |
| # Install Common Tools | |
| sudo apt install \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| gnupg \ | |
| jq \ | |
| software-properties-common \ | |
| unzip | |
| # install AWS CLI | |
| install_binary_aws_cli | |
| install_binary_okta_aws_cli | |
| # install packages from repos | |
| sudo apt install terraform | |
| sudo apt install vault | |
| sudo apt install kubectl | |
| sudo apt install helm | |
| sudo apt install java-17-amazon-corretto-jdk | |
| # install other binaries | |
| install_binary_kustomize | |
| install_binary_helmfile | |
| # verify installations | |
| terraform --version | |
| vault --version | |
| kubectl version --client | |
| helm version | |
| kustomize version | |
| helmfile --version | |
| java --version | |
| aws --version | |
| okta-aws-cli --version | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment