Skip to content

Instantly share code, notes, and snippets.

#! /bin/bash
set -x # enable trace
set -e # enable exit on first error
KUBESPRAY_VERSION=2.18.0
YQ_VERSION=4.15.1
# validate that all needed variables were passed from orch script
while read -r env_var; do
@leblocks
leblocks / Watch-Files.ps1
Last active November 14, 2025 10:39
multi file tail for powershell core
<#
.SYNOPSIS
Watches text files for changes and prints the specified number of lines from the end of the file.
.DESCRIPTION
This function monitors a set of text files for changes and prints the content to the console.
Each line printed is prefixed by the filename.
.PARAMETER Paths
An array of paths to text files to monitor. This parameter is mandatory.
@leblocks
leblocks / powershell-bootstrap.sh
Last active June 18, 2026 13:11
Bootstraps PowerShell into "$HOME/pwsh", requires curl, mkdir, tar
#!/usr/bin/env bash
# Bootstraps PowerShell into "$HOME/pwsh", resolves "latest" to the newest
# release tag, installs the selected tarball, and rewrites the launcher shell.
#
# after shell is downloaded use `chsh -s $HOME/pwsh/pwsh` to configure it as
# a default one
#
# you may need to add `$HOME/pwsh/pwsh` to /etc/shells
#
# Prereqs: curl, mkdir, tar