Skip to content

Instantly share code, notes, and snippets.

@OnkelDom
OnkelDom / satisfactory_dedicated_server_on_ubuntu_20.04.md
Last active November 16, 2021 21:29
Satisfactory Dedicated Server (v0.5.0) on Ubuntu 20.04
@OnkelDom
OnkelDom / update_prometheus.sh
Last active November 23, 2021 21:52
Script to Update Prometheus and Alertmanager straight forward
#!/bin/bash
bindir="/usr/local/bin"
binuser="root"
bingroup="root"
unamearch=$(uname -m)
case $unamearch in
(i386) arch=386;;
(x86_64) arch=amd64;;
@OnkelDom
OnkelDom / WinGet-NJPC.ps1
Created July 18, 2022 21:59 — forked from foshdafosh/WinGet-NJPC.ps1
Install WinGet PowerShell
#Install WinGet
#Based on this gist: https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901
#Which I found here: https://chrislayers.com/2021/08/01/scripting-winget/
$hasPackageManager = Get-AppPackage -name 'Microsoft.DesktopAppInstaller'
if (!$hasPackageManager -or [version]$hasPackageManager.Version -lt [version]"1.10.0.0") {
"Installing winget Dependencies"
Add-AppxPackage -Path 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx'
$releases_url = 'https://api.github.com/repos/microsoft/winget-cli/releases/latest'
@OnkelDom
OnkelDom / timesyncd.conf
Last active November 21, 2022 20:22
configure systemd-timesyncd
# Configure Systemd-Timesyncd
$ sudo apt install -y systemd-timesyncd
$ cat <<EOF | sudo tee /etc/systemd/timesyncd.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
@OnkelDom
OnkelDom / resolved.conf
Created November 21, 2022 20:21
configure systemd-resolved
# Configure Systemd-Resolved
$ sudo apt install -y systemd-resolved
$ cat <<EOF | sudo tee /etc/systemd/resolved.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
@OnkelDom
OnkelDom / ipmi_supermicro_fanspeed.md
Created January 24, 2023 12:22
Set the IPMI 2.0 fan settings to reduce noise from fans.

Set the IPMI Fan Speeds to use Server in Office.

set fan mode to "full"

ipmitool raw 0x30 0x45 0x01 0x01

set fans in "system" zone to 37,5%

ipmitool raw 0x30 0x70 0x66 0x00 0x24

set fans in "peripheral" zone to 25%

ipmitool raw 0x30 0x70 0x66 0x01 0x16

@OnkelDom
OnkelDom / ubuntu_22.04_motd.md
Created December 17, 2024 07:07 — forked from jfeilbach/ubuntu_22.04_motd.md
Make Ubuntu 22.04 less annoying. Remove ESM Ubuntu Advantage

Ubuntu 22.04 Annoyances

Here are a few collected ways I like to customize Ubuntu 22.04 servers. I used to love Ubuntu, but I hate auto updates and snaps. They also put ads and other usless ads diguised as "news" in MOTD. ESM FUD is spread throughout the OS including simple apt functions. You do not need ESM and thus Ubuntu 22.04 has become super annoying. unattended-upgrade is an automatic installation of security (and other) upgrades without user intervention. Consider the ramifications of disabling this service.

Disable unattended upgrades

The Unattended Upgrades feature is enabled by default and it runs at system boot without the user's permission. The configuration is stored in /etc/apt/apt.conf.d/20auto-upgrades

Disable: sudo dpkg-reconfigure unattended-upgrades then a TUI will come up, select "No"

This will not permantently disable the function. After an update it will be enabled. In the file /etc/apt/apt.conf.d/20auto-upgrades change these values from 1 to 0. Even doing this it will

@OnkelDom
OnkelDom / mariadb-mastermaster-rocky9.md
Last active March 30, 2025 20:58
Erstellen einer MariaDB Master/Master Replikation und Keepalived

MariaDB Master-Master Replikation auf Rocky Linux 9.5

Ziel

Einrichtung einer Master-Master Replikation mit MariaDB auf zwei Knoten (DB1 und DB2) unter Rocky Linux 9.5. Der Datenbankzugriff erfolgt bevorzugt auf DB1 via keepalived, mit einer virtuellen IP. Bei Split-Brain soll weiterhin Schreibzugriff auf beide Nodes bestehen.

Quelle: https://github.com/jomyg/MariaDB-Master-Master-Replication

Voraussetzungen

  • Zwei MariaDB-Server (DB1 und DB2) mit privaten IPs (z. B. 192.168.1.11 und 192.168.1.12)