Skip to content

Instantly share code, notes, and snippets.

View i8degrees's full-sized avatar

Jeffrey Carpenter i8degrees

View GitHub Profile
@i8degrees
i8degrees / serve_http.py
Last active May 25, 2024 22:35
Simple Python HTTP Server with multi-threading, partial-content and basic authentication support
#!/usr/bin/env python2
#
# 1. https://web.archive.org/web/20210123000445/https://gist.github.com/devgianlu/018b299f8817bf92350bf7bf70214e4d
# 2. https://github.com/devgianlu/Aria2App/wiki/Setup-HTTP-DirectDownload
#
# devgianlu/serve_http.py
# Forked from pankajp/serve_http.py
#
# Standard library imports.
@echoes341
echoes341 / 99-usbip.rules
Last active October 25, 2024 13:16
USB/IP Auto bind all usb devices (except one) and auto attach them on a windows client every 5 seconds
ACTION=="add", SUBSYSTEMS=="usb", ATTR{idProduct}!="XXXX", ATTR{idVendor}!="YYYY", RUN{program}+="/usr/sbin/usbip bind -b %k"
#!/bin/bash
set -e -o errexit -o pipefail -o nounset
###################################
# This script can be used by itself, but it's recommended that you read
# a tutorial on Proxmox forum first: https://forum.proxmox.com/threads/hey-proxmox-community-lets-talk-about-resources-isolation.124256/
###################################
# Do not modify these variables (set by Proxmox when calling the script)
vmId="$1"
@i8degrees
i8degrees / notify.py
Created May 1, 2023 08:55
Modern 'wall' command
# Sourced from https://gist.githubusercontent.com/badp/672546/raw/4c6bc7dee6d547d8a7f002ce95c9a66363108f6e/spam.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Licensed under MIT license: http://www.opensource.org/licenses/mit-license.php
import os, subprocess, sys
# thanks: Martin-Éric Racine, Roger Pate
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=433960
# http://chat.askubuntu.com/rooms/3/conversation/spam-py
#!/bin/bash
set -e -o errexit -o pipefail -o nounset
###################################
# This script can be used by itself, but it's recommended that you read
# a tutorial on Proxmox forum first: https://forum.proxmox.com/threads/hey-proxmox-community-lets-talk-about-resources-isolation.124256/
###################################
# Do not modify these variables (set by Proxmox when calling the script)
vmId="$1"
@indrekj
indrekj / truenas-kubectl.md
Last active July 18, 2024 23:59
How to acccess TrueNAS kubectl remotely?

How to acccess TrueNAS kubectl remotely from your local computer?

DISCLAIMER: This is an unofficial guide. If you mess things up then you may lock yourself out of TrueNAS or even worse, make it unusable. There's also no guarantee that this works in the future.

Through SSH

Currently the easiest way to access kubectl is through ssh and k3s tool. If you have ssh access enabled then you can ssh to your TrueNAS server and use it

@jthat
jthat / truenas-scale-kernel-upgrade.adoc
Last active July 2, 2024 03:04
Instructions to ad-hoc upgrade the TrueNAS SCALE kernel

Ad-hoc upgrade of TrueNAS SCALE kernel

Warning
This is unsupported and has the potential to corrupt your data. Proceed at your own risk.

Installation

Choose an existing stable kernel branch, e.g. SCALE-v5.15-stable.

@fakuivan
fakuivan / tplink_tlsg108e_v1_config_backup.md
Created February 20, 2022 20:07
TP-Link TL-SG108E V1 config backup format
package main
import (
"bytes"
"encoding/binary"
"fmt"
"os"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options"
@Th3Whit3Wolf
Th3Whit3Wolf / Arch Secure Laptop Install.md
Last active October 17, 2024 05:04
My install instruction for a secure Arch Linux (sway) laptop workstation

What's Cool

  • Encrypted root partition
    • AES-256 bit cipher
    • Argon2id variant for PBKDF
    • Sha3-512 bit hash
  • rEFInd bootloader
    • With dreary theme
    • Optimal Settings (optimized for aesthetics, and boot time)
  • Boot into backups thanks to refind-btrfs