Skip to content

Instantly share code, notes, and snippets.

View marfeljoergsen's full-sized avatar

Martin Felix Jørgensen marfeljoergsen

  • Copenhagen/Denmark/Europe
View GitHub Profile
@marfeljoergsen
marfeljoergsen / proxmox.md
Created August 5, 2024 15:03 — forked from scyto/proxmox.md
proxmox cluster proof of concept

ProxMox Cluster - Soup-to-Nutz

aka what i did to get from nothing to done.

note: these are designed to be primarily a re-install guide for myself (writing things down helps me memorize the knowledge), as such don't take any of this on blind faith - some areas are well tested and the docs are very robust, some items, less so). YMMV

Purpose of Proxmox cluster project

Required Outomces of cluster project

@marfeljoergsen
marfeljoergsen / gist:2c7e61450058b9e78ed2129a25bfd782
Created November 17, 2022 22:46
BLIKVM - access point errors
# bash ./hotspot.sh
+ '[' '!' -e /etc/kvmd/custom.dns ']'
++ sed 's/,$//'
+++ grep '^nameserver' /etc/resolv.conf
+++ awk '{print $2}'
+++ sort -r -u
++ for i in `grep ^nameserver /etc/resolv.conf | awk '{print $2}' | sort -r -u`
++ echo -n 192.168.40.1,
+ NAMESERVERS=192.168.40.1
+ [[ 192.168.40.1 == \1\2\7\.\0\.\0\.\1 ]]
@marfeljoergsen
marfeljoergsen / gist:9f9616e933186c0096bb7fa390a6ba30
Created February 14, 2022 00:42
install.log - proxmox on HP t730 thin client - fails installing with ZFS
DC TRACEROUTE: traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packetsignoring detected country '', invalid or unknown
# setxkbmap dk nodeadkeys
# setxkbmap us
# modprobe zfs
# vgchange -an
# pvremove -ff -y /dev/sda1
Labels on physical volume "/dev/sda1" successfully wiped.
# zpool labelclear -f /dev/sda1
failed to clear label for /dev/sda1
# dd if=/dev/zero of=/dev/sda1 bs=1M count=16
@marfeljoergsen
marfeljoergsen / pycurses.py
Created October 6, 2020 16:09 — forked from claymcleod/pycurses.py
Python curses example
import sys,os
import curses
def draw_menu(stdscr):
k = 0
cursor_x = 0
cursor_y = 0
# Clear and refresh the screen for a blank canvas
stdscr.clear()
@marfeljoergsen
marfeljoergsen / luks_backup.txt
Created January 2, 2020 06:01 — forked from andyrbell/luks_backup.txt
clonezilla luks backup
backup luks partition
1. Boot clonezilla
2. Drop into the command line
3. open the encrypted external drive partition
cryptsetup luksOpen /dev/sda3 backup
@marfeljoergsen
marfeljoergsen / C-states.md
Created December 22, 2019 01:52 — forked from wmealing/C-states.md
What are CPU "C-states" and how to disable them if needed?

To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.

Here we limit the system to only C-State 1:

    kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1

On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:

@marfeljoergsen
marfeljoergsen / config_vwifi.sh
Created September 20, 2019 22:53 — forked from Tydus/config_vwifi.sh
config virtual wi-fi APs
#!/bin/sh
#=======================================
# config_vwifi.sh
# Config virtual wi-fi (bridge to vlans)
#=======================================
# show which port you have by `robocfg show'
PORT_LIST="0t 1t 2t 3t 4t 8t"

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories