Node spec 4 core / 16 GB RAM 50GB OS / 50 GB ZFS
ubuntu escalation (or add sudo at the front)
| # Generic | |
| lsblk -f --json | jq '.blockdevices[] | select((.fstype == null) and (.children == null)) | {name:.name,available:.fsavail}' | |
| # Looking for VMware disks | |
| lsblk -O -J | jq '.blockdevices[] | select(.vendor == "VMware " and (.children == null)) | {name:.path,size:.size}' | |
| # I feel lucky | |
| TGTDISK=$(lsblk -O -J | jq -r '.blockdevices[] | select(.vendor == "VMware " and (.children == null)) | .path') |
| $bpath = "c:\temp\" | |
| New-Item -Type Directory $bpath -ErrorAction ignore | |
| $datestr = ("{0}" -f (Get-Date -Format "yyyyMMdd-hhmmss")) | |
| $bdatepath = join-path -Path $bpath -ChildPath ("veeambackup-{0}" -f $datestr) | |
| New-Item -Type Directory $bdatepath | |
| $props = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup and Replication\' | |
| $fpath = join-path -Path $bdatepath -childpath ("sqldump-{0}-{1}.bak" -f $props.SqlDatabaseName,$datestr) | |
| Backup-SqlDatabase -ServerInstance ("{0}\{1}" -f $props.SqlServerName,$props.SqlInstanceName) -Database $props.SqlDatabaseName -BackupFile $fpath |
| $colors = @" | |
| #333333 | |
| #222222 | |
| #FFFFFF #444433 | |
| "@ | |
| $theme = "mytheme" | |
| $lns = @("GIMP Palette","Name: $theme","#") | |
| $cregx = [Regex]::new("#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})[^a-fA-F0-9]") |
| $global:headers = @{authorization="bearer $token"} | |
| $h = $global:headers | |
| $global:recordfile = "dev\record.md" | |
| $global:replaces = @(@{m="http://sensistivehostname";r="http://[host]"},@{m="bearer .*";r="bearer [token]"}) | |
| function redact { | |
| param($text) | |
| $global:replaces | % { | |
| $text = $text -replace $_.m,$_.r |
| import bpy | |
| wallheight = 2.5 | |
| wallwidth = 0.3 | |
| def xyadd(c,n,wallwidth): | |
| dx = n[0] - c[0] | |
| dy = n[1] - c[1] | |
| #!/bin/sh | |
| ZFSDISK=/dev/nvme1n1 | |
| apt-get update -y | |
| curl -sfL https://get.k3s.io | sh - | |
| curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash | |
| git clone https://github.com/ahmetb/kubectx /opt/kubectx | |
| ln -s /opt/kubectx/kubectx /usr/local/bin/kubectx | |
| ln -s /opt/kubectx/kubens /usr/local/bin/kubens | |
| apt install zfsutils-linux jq -y |
| #!/bin/sh | |
| kubectl create ns stock-demo | |
| helm repo add bitnami https://charts.bitnami.com/bitnami | |
| helm install -n stock-demo --set global.postgresql.auth.username=root --set global.postgresql.auth.password=notsecure --set global.postgresql.auth.database=stock stockdb bitnami/postgresql | |
| curl https://raw.githubusercontent.com/tdewin/stock-demo/main/kubernetes/deployment.yaml | sed s#tdewin/stock-demo#tdewin/stock-demo:vnext# | kubectl apply -n stock-demo -f - | |
| curl https://raw.githubusercontent.com/tdewin/stock-demo/main/kubernetes/svc.yaml | sed s/^.*externalTrafficPolicy.*$//g | sed s/LoadBalancer/ClusterIP/g | kubectl apply -n stock-demo -f - | |
| kubectl get svc -n stock-demo |
| #!/bin/sh | |
| curl https://api.github.com/repos/kastenhq/external-tools/releases | jq -r '.[].assets[]."browser_download_url" | select (. | contains("linux_amd64.tar"))' |
| #!/bin/sh | |
| apt-get -y update | |
| DEBIAN_FRONTEND=noninteractive apt-get -y install podman | |
| mkdir -p /minio/data | |
| podman run -d --name minio -v /minio/data:/data -e MINIO_ROOT_USER=bert -e MINIO_ROOT_PASSWORD=changeme --restart=always -p 9000:9000 -p 9001:9001 docker.io/minio/minio server /data --console-address ":9001" |