A simple script to run an iperf3 test between two nodes in a kubernetes cluster.
Helpful to debug pod2pod communication issues in hybrid cloud clusters.
| apiVersion: v1 | |
| automountServiceAccountToken: true | |
| kind: ServiceAccount | |
| metadata: | |
| name: mig-config-enforcer | |
| namespace: gpu-operator | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: ClusterRole |
(driver is outdated)
Note: the better solution would be to use the NVIDIA gpu-operator.
They are exclusive -- either install the driver via gpu-operator with driver: {enabled: true} in the helm values -- or manually on your nodes like below:
# This worked on a VM with a RTX 50xx GPU attached (in proxmox, with PCIe Passthrough)
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu$(grep DISTRIB_RELEASE /etc/lsb-release | cut -d'=' -f2 | tr -d '.')/x86_64/cuda-keyring_1.1-1_all.deb| #!/bin/bash | |
| set -euo pipefail | |
| if [[ "$UID" -ne 0 ]]; then | |
| echo "This script needs to be executed as root" | |
| exit 1 | |
| fi | |
| vendor_id="0x3000" # Valve |
tar -cv --zstd --options zstd:compression-level=22 --options zstd:threads=0 -f archive.tar.zstd files_to_compress/Tested with bsdtar 3.5.3 (macOS 15.7.1)
| #!/bin/bash | |
| set -euo pipefail | |
| backup() { | |
| terraform state pull > state-$(gdate -Iseconds) | |
| } | |
| plan() { | |
| backup | |
| terraform plan -out=tfplan && terraform show -json tfplan | jq . > tfplan.json |
| #!/bin/bash -euo pipefail | |
| ## Gives you a nice overview over the total timeseries cardinality of a prometheus endpoint. | |
| curl -fsSL http://localhost:9100/metrics | grep -v '^#' | cut -d'{' -f 1 | cut -d' ' -f 1 | sort | uniq -c | sort -gr |
| public class DateTimeInsanityTests | |
| { | |
| [Fact] | |
| public void YourDateTimeIsInsane() | |
| { | |
| var t = new DateTime(); | |
| // Does not throw | |
| Console.WriteLine(new DateTimeOffset(t.ToUniversalTime())); |
| #!/usr/bin/env sh | |
| # Special shebang: almost the same as just `uv run`, but always use the script directory to search for pyproject.toml. | |
| # The following lines are ignored by python, and executed by bash | |
| # Use `set -x` if you want to see what's happening | |
| """:" | |
| set -eu | |
| exec uv run --project=$(dirname "$0") "$0" "$@" | |
| """ | |
| ### |