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
function prompt { | |
$lastCmdFailed = !$?; | |
$asciiSymbols = $true # If your terminal doesn't display unicode properly | |
# Cause $IsWindows and shit doesn't exist on current Windows Powershell version | |
$windows = $IsWindows -or $env:OS -eq 'Windows_NT' | |
if ($windows) { | |
$admin = [bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match 'S-1-5-32-544') | |
$name = $env:UserName |
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
set -g symb '▲' | |
set -g leading_brace 0 | |
set -g has_launched 0 | |
function git_info | |
set -l branch (git rev-parse --abbrev-ref HEAD 2> /dev/null) | |
printf "%s(%s%s%s)" $c0 $c1 $branch $c0 | |
set -l changes (git status --porcelain --ignore-submodules 2> /dev/null) |
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
#!/bin/bash | |
set -o errexit | |
clear | |
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n" | |
### HOW TO USE | |
### Pre-req: | |
### - run on a Proxmox 6 server | |
### - a dhcp server should be active on vmbr1 |
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
#!/bin/bash | |
set +x | |
version="${VERSION:-1.6.1}" | |
arch="${ARCH:-linux-amd64}" | |
bin_dir="${BIN_DIR:-/usr/local/bin}" | |
wget "https://github.com/prometheus/node_exporter/releases/download/v$version/node_exporter-$version.$arch.tar.gz" \ | |
-O /tmp/node_exporter.tar.gz |