Skip to content

Instantly share code, notes, and snippets.

View bartvdbraak's full-sized avatar
🏗️
Building clusters

Bart van der Braak bartvdbraak

🏗️
Building clusters
View GitHub Profile
@bartvdbraak
bartvdbraak / Xorg.0.log
Created October 22, 2019 22:21
/var/log/
[ 154.718] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 154.718] (II) FBDEV: driver for framebuffer: fbdev
[ 154.718] (II) VESA: driver for VESA chipsets: vesa
[ 154.723] (II) [KMS] Kernel modesetting enabled.
[ 154.723] (WW) Falling back to old probe method for modesetting
[ 154.723] (WW) Falling back to old probe method for fbdev
[ 154.723] (II) Loading sub module "fbdevhw"
[ 154.723] (II) LoadModule: "fbdevhw"
[ 154.723] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 154.723] (II) Module fbdevhw: vendor="X.Org Foundation"
@bartvdbraak
bartvdbraak / gist:03436239f3da8638e81aab47e70b1c63
Last active October 23, 2019 00:07
xrandr answer stackexchange
00ffffffffffff004c2d560f4d325530
071d0103803c22782a1375a757529b25
105054bfef80b300810081c081809500
a9c0714f0101565e00a0a0a029503020
350055502100001a000000fd00324b1b
5919000a202020202020000000fc0043
32374a4735780a2020202020000000ff
0048544f4d3230303034340a2020014d
02031bf146901f041303122309070783
01000067030c0010008032023a801871
@bartvdbraak
bartvdbraak / Xorg.* PixClocks
Created October 23, 2019 13:53
grep -iH PixClock /var/log/Xorg.*
/var/log/Xorg.0.log:[ 45.342] (II) RADEON(0): Ranges: V min: 50 V max: 75 Hz, H min: 27 H max: 89 kHz, PixClock max 255 MHz
/var/log/Xorg.0.log.old:[ 71.527] (II) RADEON(0): Ranges: V min: 50 V max: 75 Hz, H min: 27 H max: 89 kHz, PixClock max 255 MHz
/var/log/Xorg.1.log:[ 20027.891] (II) RADEON(0): Ranges: V min: 50 V max: 75 Hz, H min: 30 H max: 81 kHz, PixClock max 175 MHz
/var/log/Xorg.1.log:[ 20027.923] (II) RADEON(0): Ranges: V min: 50 V max: 75 Hz, H min: 30 H max: 82 kHz, PixClock max 145 MHz
/var/log/Xorg.1.log.old:[ 64958.883] (II) RADEON(0): Ranges: V min: 50 V max: 75 Hz, H min: 30 H max: 81 kHz, PixClock max 175 MHz
/var/log/Xorg.1.log.old:[ 64958.915] (II) RADEON(0): Ranges: V min: 50 V max: 75 Hz, H min: 30 H max: 82 kHz, PixClock max 145 MHz
mode "1920x1080"
geometry 1920 1080 1920 1080 32
timings 0 0 0 0 0 0 0
accel true
rgba 8/16,8/8,8/0,0/0
endmode
Frame buffer device information:
Name : radeondrmfb
@bartvdbraak
bartvdbraak / cluster-backup.sh
Last active May 15, 2023 19:09
A way to quickly create a backup of your Kubernetes cluster with manifests for each resource per resource type per namespace (don't use this as a serious backup strategy)
#!/bin/bash
# Check if the backup directory is provided as an argument
if [ -z "$1" ]; then
echo "Usage: $0 <backup_directory>"
exit 1
fi
# Get the backup directory from the command line argument
BACKUP_DIR="$1"
@bartvdbraak
bartvdbraak / download-acr-helm-charts.sh
Created May 15, 2023 19:11
script to download all latest helm charts on your Azure Container Registry
#!/bin/bash
# Destination directory to save YAML files
DESTINATION_DIR="${1:-.}"
# Prompt for Azure Container Registry name if not provided
read -p "Enter Azure Container Registry name: " ACR_NAME
# Add Azure Container Registry to helm repositories
echo "Enter the password for your Azure Container Registry"
@bartvdbraak
bartvdbraak / list-apiversions.sh
Created May 15, 2023 19:38
List all apiVersions for each resource type in a Kubernetes cluster
#!/bin/bash
# Get the list of resource types
resource_types=$(kubectl api-resources | tail +2 | awk '{ print $1 }')
# Iterate over each resource type
for resource_type in $resource_types; do
echo "Resource Type: $resource_type"
# Get the latest usable apiVersion
@bartvdbraak
bartvdbraak / move_images_between_acrs.sh
Created May 31, 2023 10:01
A Bash script to move all images from one Azure Container Registry to another, with prompts for repository selection and confirmation, while retaining the order or date based on creation time.
#!/bin/bash
# Function to prompt for user input with a default value
prompt_input() {
local prompt_message="$1"
local default_value="$2"
local user_input
read -p "$prompt_message [$default_value]: " user_input
echo "${user_input:-$default_value}"
}
@bartvdbraak
bartvdbraak / domain_check.sh
Created June 6, 2023 14:30
This script can be used to check a list of domains against a desired outcome by utilizing the `dig` command. It provides information on whether each domain matches or mismatches the expected outcome.
#!/bin/bash
print_help() {
echo "Usage: ./domain_check.sh DESIRED_OUTCOME DOMAIN1 [DOMAIN2 ...]"
echo "Check a list of domains against a desired outcome using the dig command."
echo ""
echo "Arguments:"
echo " DESIRED_OUTCOME The expected outcome for the domains."
echo " DOMAIN1 The first domain to check."
echo " DOMAIN2 ... Additional domains to check."