Skip to content

Instantly share code, notes, and snippets.

@NorkzYT
NorkzYT / README.md
Last active October 11, 2025 21:53
Proxmox CIFS Share Mount Wizard Script

Proxmox LXC ⇆ CIFS Mount Wizard

proxmox-lxc-cifs-share.sh is an interactive helper that mounts a network CIFS/SMB share on a Proxmox VE node and bind-mounts it into one or more unprivileged LXC containers in one pass.
It automates:

  1. Creating a host-side mountpoint under /mnt/lxc_shares/<folder>.
  2. Writing a properly-tuned /etc/fstab entry (systemd.automount, uid/gid mapping, etc.).
  3. Mounting the share immediately.
  4. Injecting the bind-mount (mpX:) into the live LXC configuration with pct set.
  5. Stopping and restarting each container to apply the mount.
@Solarflame5
Solarflame5 / cups_hplj1020_tutorial.md
Last active September 21, 2025 08:06
How to set up an HP LaserJet 1020 printer server using CUPS on Raspberry Pi OS Bullseye

How to set up an HP LaserJet 1020 printer server using CUPS on Raspberry Pi OS Bullseye

Set up the Raspberry Pi

Note: This probably also works in Raspberry Pi OS Bookworm, but I have only tested this on my Pi 1 B+ that doesn't support Bookworm. It should also probably work on most Debian based distros including Ubuntu.

  • Flash the Raspbian Bullseye Lite image to the SD card
  • Configure the user account, network and SSH settings while imaging to make setup easier.

Install the required packages

You need to install CUPS, HPLIP, and the foo2zjs printer drivers, use the following commands:

sudo apt update
sudo apt install cups hplip printer-driver-foo2zjs
@pepitooo
pepitooo / sensors2hass.py
Created May 4, 2021 10:02
Post lm-sensor to HASS
#!/usr/bin/env python3
import argparse
import subprocess
import json
import sys
from urllib import parse
from requests import post
@thrnz
thrnz / Dockerfile
Created September 15, 2020 04:18
Helper container to pass forwarded port to Deluge
FROM alpine:latest
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/community/" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/main/" >> /etc/apk/repositories && \
apk add --no-cache bash deluge
ADD pia-port.sh /scripts/pia-port.sh
RUN chmod +x /scripts/*.sh
CMD ["/scripts/pia-port.sh"]
@ericgcollyer
ericgcollyer / 192.168.1.1 Config
Created July 13, 2018 00:49
Configuration of my router with local ip 192.168.1.1
firewall {
all-ping enable
broadcast-ping disable
ipv6-name WANv6_IN {
default-action drop
description "WAN inbound traffic forwarded to LAN"
rule 10 {
action accept
description "Allow established/related"
state {
@Brainiarc7
Brainiarc7 / skylake-tuning-linux.md
Last active October 5, 2025 15:02
This gist will show you how to tune your Intel-based Skylake, Kabylake and beyond Integrated Graphics Core for performance and reliability through GuC and HuC firmware usage on Linux.

Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:

Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.

Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.

Instructions provided for both Fedora and Ubuntu (including Debian):

Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:

@Hengjie
Hengjie / tutorial.md
Last active October 13, 2025 08:06
How to passthrough SATA drives directly on VMWare ESXI 6.5 as RDMs

How to passthrough SATA drives directly on VMWare EXSI 6.5 as RDMs

There aren't many tutorials about this, the only tutorials I've found were about passing through entire PCIe cards to VMs, or refered to old ESXI versions (below 6.5) that used a more comprehensive desktop client instead of the web app. In v6.5, the web app was introduced and the desktop client was deprecated. You used to be able to setup RDMs in the desktop client, but with the introduction of the web console, this is no longer the case. This tutorial shows you how to pass SATA HDDs to the virtual machine on VMWare ESXI 6.5. This tutorial is partially based on VMWare's own KB and the now deprecated Forza IT blog post.

A word about VMWare ESXI 6.7

There is now an option while editing your VM's settings to add a New raw disk when you click `Add ha

#include <windows.h>
void SetWindowBlur(HWND hWnd)
{
const HINSTANCE hModule = LoadLibrary(TEXT("user32.dll"));
if (hModule)
{
@wassupdoc
wassupdoc / zone_instructions
Last active March 8, 2025 07:12
Zone settings for edgerouter
#based on http://www.forshee.me/2016/03/02/ubiquiti-edgerouter-lite-setup-part-2-firewall-setup.html
configure
edit firewall name allow-est-drop-inv
set default-action drop
set enable-default-log
set rule 1 action accept
set rule 1 state established enable
set rule 1 state related enable
set rule 2 action drop
@catchdave
catchdave / install_pia_vpn.sh
Last active December 28, 2022 03:21
CLI script to install Private Internet Access VPN on a ubuntu server
#!/bin/bash
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit
fi
set -o nounset
set -o errexit
error_exit()