Skip to content

Instantly share code, notes, and snippets.

@2600box
2600box / zfs_health.sh
Created January 7, 2024 09:40 — forked from petervanderdoes/zfs_health.sh
ZFS Health Check Script
#! /usr/local/bin/bash
#
# Calomel.org
# https://calomel.org/zfs_health_check_script.html
# FreeBSD 9.1 ZFS Health Check script
# zfs_health.sh @ Version 0.15
# Check health of ZFS volumes and drives. On any faults send email. In FreeBSD
# 10 there is supposed to be a ZFSd daemon to monitor the health of the ZFS
# pools. For now, in FreeBSD 9, we will make our own checks and run this script
@2600box
2600box / HDSentinelScript.md
Last active January 7, 2024 09:39
hdsentinel script for use with proxmox

Step 1: download the free Linux 64-bit console version of HDSentinel; extract the single binary file, save it as /root/HDSentinel and make it executable Step 2: Add the following script: /root/hdsentinel.sh

#!/bin/bash
# cron script to warn on HDD health status changes

MinHealth=60
MaxTemp=55
StatusCmd="/root/HDSentinel -solid"
@2600box
2600box / ProxmoxGMail.md
Last active January 7, 2024 09:36 — forked from tomdaley92/README.md
Proxmox - Email Alerts Setup (gmail)

Proxmox - Email Alerts Setup (gmail)

  1. SSH into proxmox node and become root user. Run the following commands to download extra software dependencies we'll need.

    apt update
    apt install -y libsasl2-modules mailutils
  2. Enable 2FA for the gmail account that will be used by going to security settings

import os
import shutil
source_folder = r"E:\demos\files\reports\\"
destination_folder = r"E:\demos\files\account\\"
# fetch all files
for file_name in os.listdir(source_folder):
# construct full file path
source = source_folder + file_name
@2600box
2600box / data.yaml
Created July 31, 2022 15:21
data.yaml
aboutTheBook: <p><em>On War </em>(1832) is widely considered to be a landmark book
on the subject of war. In its serious and thoughtful consideration of why and how
states engage in warfare, it continues to be an influential piece of writing centuries
later.</p>
audioUrl: https://hls.blinkist.io/bibs/62c43ea26cee07000842ea1e/62c43ea26cee07000842ea20-T1657263821.m4a?Expires=1659190024&Signature=Y290xig-HD64Uiop5EtW8dpmywPCR6mSSqxDWC-x4mQbUCwzfqFmybVMrOFiO93NS01aBSQfPvR~rBfFN4A7nVubHyaQc34ssNDBw5~nvy~S0NUatZyLQSqJyHbUIqSbD4QlPkK-v0f43Sijj67Oh2ALTdwfhqzJSFSPml06eDNKhZ95buLzEAnHZU3q5OeZwUFSjkcv7ffyDH8CC4AmENzyH551j8Xh1RKaDlNGX3rfrAuCmSKycC~QNeIDherEMMIELLdkiK0qAU34LPx23-y-n0uVw4IPu4fPu58~e1TCRXyeUtGKTbjqmPH52eTnFywsRumreh9W024ceDFkHg__&Key-Pair-Id=APKAJXJM6BB7FFZXUB4A
author: Carl von Clausewitz
averageRating: 4.2
browseUrl: /en/nc/browse/books/on-war-en
buyOnAmazonUrl: /en/books/on-war-en/purchase
categories:
@2600box
2600box / migrate_debian.txt
Created June 13, 2022 12:34 — forked from deviousway/migrate_debian.txt
migrate debian to debian
rsync -rtvzplogDH --numeric-ids --exclude=/etc/fstab --exclude=/etc/network/* --exclude=/proc/* --exclude=/tmp/* --exclude=/sys/* --exclude=/dev/* --exclude=/mnt/* --exclude=/boot/* /* root@$DESTINATION_HOST:/
@2600box
2600box / disable-fb.sh
Created November 15, 2021 08:45 — forked from null-dev/disable-fb.sh
Disable efifb at runtime
#!/usr/bin/env bash
# 1. Download and install the QEMU hook helper from here: https://github.com/PassthroughPOST/VFIO-Tools
# 2. Place this file in /etc/libvirt/hooks/qemu.d/NAME OF YOUR VM/prepare/begin/disable-fb.sh
# 3. Make disable-fb.sh executable.
VM_NAME="$1"
echo "libvirt-qemu disable-fb: Disabling efi-framebuffer to prepare to pass GPU to VM $VM_NAME" > /dev/kmsg 2>&1
echo "efi-framebuffer.0" > /sys/bus/platform/devices/efi-framebuffer.0/driver/unbind
@2600box
2600box / ufw_plex.md
Created December 23, 2019 22:55 — forked from nmaggioni/ufw_plex.md
Plex Media Server UFW rule

/etc/ufw/applications.d/plexmediaserver

[plexmediaserver]
title=Plex Media Server (Standard)
description=The Plex Media Server
ports=32400/tcp|3005/tcp|5353/udp|8324/tcp|32410:32414/udp

[plexmediaserver-dlna]
title=Plex Media Server (DLNA)
description=The Plex Media Server (additional DLNA capability only)
@2600box
2600box / wgcf.sh
Created October 9, 2019 10:05 — forked from oskar456/wgcf.py
Cloudflare WARP linux client (using wg-quick for actual tunnel setup)
#!/usr/bin/env bash
set -euo pipefail
shopt -s inherit_errexit 2>/dev/null || true
# this script will generate wg-quick(8) config file
# in order to connect to Cloudflare Warp using Wireguard on Linux
# note: this is *absolutely not* an official client from Cloudflare
# Copyright (C) 2019 Ondrej Caletka
# based heavily on macOC client by Jay Freeman (saurik)
@2600box
2600box / 1pass_dups.py
Created September 21, 2019 10:14 — forked from thehesiod/1pass_dups.py
1password duplicate remover (alpha, only run in debugger with breakpoints everywhere *g*)
#!/usr/bin/env python3
import json
import subprocess
import sys
from concurrent.futures import ThreadPoolExecutor
import html
import dictdiffer
import iso8601