Skip to content

Instantly share code, notes, and snippets.

View icyleaf's full-sized avatar
🍺
Diving into beer

icyleaf icyleaf

🍺
Diving into beer
View GitHub Profile
@HendrikHaase
HendrikHaase / proxmox-add-thermal-stats-to-summary.md
Last active July 20, 2023 14:09
proxmox add thermal stats to summary

proxmox add thermal stats to summary

apt install lm-sensors


open file

nano /usr/share/perl5/PVE/API2/Nodes.pm

@zulhfreelancer
zulhfreelancer / kubectl-apply-stdin.md
Last active March 22, 2024 14:17
How to run "kubectl apply -f" with inline YAML as stdin?
$ kubectl apply -f - <<EOF
<-- insert YAML content here -->
EOF

OR

$ cat file.yaml | kubectl apply -f -
@smagoun
smagoun / nut_osx.txt
Last active May 25, 2023 04:27 — forked from 2b/nut_osx.txt
Network UPS Tools on OS X Catalina for Synology client
# Tested with nut 2.7.4_2 from homebrew
# Configure OSX Energy Saver UPS tab for the UPS
#install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
#install network ups tools
brew install nut
# Set permissions on state dirs to allow running as daemon
sudo mkdir -p /usr/local/var/state/ups/
@ilude
ilude / !proxmox_k3s_cluster.sh
Last active January 5, 2024 00:09
Proxmox k3s cluster creation scripts
#!/bin/bash
# curl -s https://gist.githubusercontent.com/ilude/457f2ef2e59d2bff8bb88b976464bb91/raw/cluster_create_setup.sh?$(date +%s) > ~/bin/setup_cluster.sh; chmod +x ~/bin/setup_cluster.sh; setup_cluster.sh
echo "begin cluster_create_setup.sh"
export CREATE_TEMPLATE=1 #false
while test $# -gt 0; do
case "$1" in
--template)
export CREATE_TEMPLATE=0 #true
@triangletodd
triangletodd / README.md
Last active April 23, 2024 00:51
k3s in LXC on Proxmox

On the host

Ensure these modules are loaded

cat /proc/sys/net/bridge/bridge-nf-call-iptables

Disable swap

sysctl vm.swappiness=0
swapoff -a
@qrtt1
qrtt1 / 000_2020-12th-ironman.md
Last active September 3, 2023 07:16
ITHome 第 12 屆鐵人賽 (updated UTC 2020-10-19 00:40:39.204524)

1.0 Introduction to btrfs

  • Btrfs: “ZFS lite” for Linux
  • Oracle’s Btrfs filesystem project (“B-tree file system,” officially pronounced “butter FS” or “better FS,” though it’s hard not to think “butter face”) aimed to repeat many of ZFS’s advances on the Linux platform during the long interregnum when ZFS seemed like it might be lost to Linux because of licensing issues.
  • BtrFS VS ZFS

btrfs1.png

btrfs2.png

btrfs3.png

@dsabanin
dsabanin / enable-xcode-debug-menu.sh
Last active November 7, 2022 16:17
Enable internal Xcode debug menu in Xcode 11
defaults write com.apple.dt.Xcode ShowDVTDebugMenu -bool YES
sudo mkdir -p /Applications/Xcode.app/Contents/Developer/AppleInternal/Library/Xcode
sudo touch /Applications/Xcode.app/Contents/Developer/AppleInternal/Library/Xcode/AppleInternal.plist
# Don't forget to restart Xcode
@jat001
jat001 / namebase.py
Created February 20, 2020 10:05
Sell HNS automatically
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from decimal import Decimal
from datetime import datetime
try:
import requests
import simplejson as json
@MakiseKurisu
MakiseKurisu / proxmox_btrfs_raid1.sh
Last active July 26, 2023 10:48
Convert Proxmox VE over Btrfs to RAID-1 configuration
# Please follow https://gist.github.com/MakiseKurisu/3a44918bccf3383c0b5ccf362f429c8b first to set up rootfs
# Assuming rootfs on /dev/sdb2, and adding /dev/sda to the RAID-1 configuration
# Remove existing Proxmox installation and LVM Thin storage
pvesm remove local-lvm
vgremove pve -y
# Set up partition table
(echo g; echo n; echo ''; echo ''; echo '+512M'; echo t; echo 1; echo n; echo ''; echo ''; echo ''; echo w) | fdisk /dev/sda