Skip to content

Instantly share code, notes, and snippets.

View FlorianHeigl's full-sized avatar

Florian Heigl FlorianHeigl

View GitHub Profile
@FlorianHeigl
FlorianHeigl / check_mk_agent.busybox
Created March 26, 2025 23:35
mehr cavium files (non final)
upload fehlt
braucht eh ewig viele auffrischungen
@FlorianHeigl
FlorianHeigl / hwmon0.md
Last active March 24, 2025 18:17
Cavium CN7322 / Marvell LiquidIO II CN2360 Thermal Sensors
cn7322:/usr/lib/check_mk_agent/plugins# ls -l /sys/class/hwmon/hwmon0/
total 0
-r--r--r-- 1 root root 4096 Mar 21 15:07 alarms
lrwxrwxrwx 1 root root    0 Mar 21 15:07 device -> ../../../0-004c
-r--r--r-- 1 root root 4096 Mar 21 15:07 name
lrwxrwxrwx 1 root root    0 Mar 21 15:07 of_node -> ../../../../../../../../firmware/devicetree/base/soc@0/i2c@1180000001000/tmp@4c
drwxr-xr-x 2 root root    0 Mar 21 15:07 power
lrwxrwxrwx 1 root root    0 Mar 21 15:07 subsystem -> ../../../../../../../../class/hwmon
-rw-r--r-- 1 root root 4096 Mar 21 15:07 temp1_crit
@FlorianHeigl
FlorianHeigl / backup-netbox-docker-db.sh
Last active March 9, 2025 17:40
mediocre netbox docker backup favorable over the undecided nothing that is in place
#! /usr/bin/env bash
set -eu
. ../netbox-docker/env/postgres.env
_date=$(date +%Y%m%d%H%M)
backupdir=/backup/netbox
umask 177
# iirc this should be done by a sidecar container or something
@FlorianHeigl
FlorianHeigl / dac-10gtek-oem.txt
Last active February 27, 2025 19:00
fuer linux sfp monitoring
Identifier : 0x03 (SFP)
Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector : 0x21 (Copper pigtail)
Transceiver codes : 0x00 0x00 0x00 0x00 0x00 0x04 0x00 0x00 0x00
Transceiver type : Passive Cable
Encoding : 0x00 (unspecified)
BR, Nominal : 10300MBd
Rate identifier : 0x00 (unspecified)
Length (SMF,km) : 0km
Length (SMF) : 0m
@FlorianHeigl
FlorianHeigl / i-am-so-angry.sh
Last active February 23, 2025 01:51
opennebula startscript context fix state machine thing
#!/usr/bin/env bash
# one-context hat hier bugs und bringt das netzwerk nie online
set -u
test_network(){
#good case
ip addr list dev eth0 |
grep -qE "inet.*((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)" && return 100
@FlorianHeigl
FlorianHeigl / _etc_dhclient-exit-hooks
Last active November 28, 2024 22:16
bavarian wifi
# dont execute hook if dhcp req failed
if [ $1 != 0 ]; then
return 0
fi
# get bayernwlan interface name
interface=$( ifconfig | grep -B1 "BAYERNWLAN" | grep -v description: | awk -F: '{print $1}' )
# some validation might be [a-z]+[0-9]
1476 mkdir /mnt/imgback
1477 mount -t cifs -o domain=xxxx,vers=3.1.1,multichannel,user=xxxxx,password=xxxx,max_channels=2 //
nas84/imgback /mnt/imgback
1515 dd if=/dev/sda bs=1024k | mbuffer -m2G --direct -d -o /mnt/imgback/file1 | pigz -1 /mnt/foo/file2.img.gz
1579 echo 2048 > /sys/block/sde/queue/read_ahead_kb
modules=loop,squashfs,sd-mod,usb-storage quiet console=tty1
@FlorianHeigl
FlorianHeigl / agent_pjlink.py
Last active August 8, 2024 18:58
PJ-Link special agent

VEP 4600 Infos