Skip to content

Instantly share code, notes, and snippets.

@AntaeusNar
AntaeusNar / gist:47577502b7dd560d5ba1d52f558d8473
Created January 24, 2023 03:29
Proxmox USB to LXC Passthrough
Based off of a lot of mess and reading:
https://asokolsky.github.io/proxmox/octoprint.html
https://medium.com/@konpat/usb-passthrough-to-an-lxc-proxmox-15482674f11d
https://linuxcontainers.org/lxc/manpages/man5/lxc.container.conf.5.html
However, I think that some of the general confusion is due to not understand what all of the different steps, commands, and files are doing.
I managed to get it all to work reliably, and simply in 2 basic steps.
@AntaeusNar
AntaeusNar / 1-Proxmox-LXC-NFS-READ.md
Last active October 19, 2021 16:39 — forked from mturley/1-plexbox-setup-README.md
Proxmox LXC Seedbox PlexBox *arrBox

Privilaged LXC with NFS and Nesting options enabled

  • Start by creating a new LXC using Ubuntu LTS 20.04 Focal
  • Uncheck the Unprilivlaged option
  • All other settings as desired
  • DO NOT start on task completion
  • Under LXC>Options
    • Nesting = 1
    • NFS = 1
  • Start LXC
  • update and install depedancies
2021-10-18 07:15:40.0|Trace|ConfigService|Using default config value for 'autounmonitorpreviouslydownloadedmovies' defaultValue:'False'
2021-10-18 07:15:40.0|Trace|HttpClient|Req: [GET] https://radarr.servarr.com/v1/update/master?version=3.2.2.5080&os=linux&arch=X64&runtime=netcore&runtimeVer=5.0.5&active=false
2021-10-18 07:15:40.0|Trace|EventAggregator|ConfigFileSavedEvent <~ ReconfigureLogging
2021-10-18 07:15:40.0|Trace|ConfigService|Using default config value for 'retention' defaultValue:'0'
2021-10-18 07:15:40.0|Trace|ConfigService|Using default config value for 'proxyenabled' defaultValue:'False'
2021-10-18 07:15:40.0|Trace|ConfigService|Using default config value for 'recyclebin' defaultValue:''
2021-10-18 07:15:40.0|Trace|ConfigService|Using default config value for 'recyclebincleanupdays' defaultValue:'7'
2021-10-18 07:15:40.0|Trace|ConfigService|Using default config value for 'rsssyncinterval' defaultValue:'60'
2021-10-18 07:15:40.0|Trace|ConfigService|Using default config value for 'availabilityde
@AntaeusNar
AntaeusNar / DClaunch.ks
Last active January 24, 2020 18:46
KSP KOS
// Original by: Devon Connor
// On: 4/6/2015
// https://www.reddit.com/r/Kos/comments/31x3o8/kos_launch_script_works_with_any_staging_to_any/
// This file will launch a rocket to the desired altitude
// please turn down thrust before beginning script so that when
// it is finished the engines remain shutdown
// to run the file type "run launch(OrbitHeight)."
@AntaeusNar
AntaeusNar / power-control.lua
Last active January 20, 2020 22:12
The Start of a lua script for Opencomputers to control power flow through the base.
--AntaeusNar, 2020
--Based on power-monitor.lua by SuPeRMiNoR2, 2015 https://github.com/OpenPrograms/SuPeRMiNoR2-Programs/tree/master/power-monitor
local version = "0.1.0"
-- Requires
local component = require("component")
local sides = require("sides")
local term = require("term")
local gpu = component.gpu
@AntaeusNar
AntaeusNar / tests.py
Created October 14, 2019 20:44 — forked from magopian/tests.py
Unit test to validate django templates
class TemplatesTest(TestCase):
def test_templates(self):
"""Templates can compile properly and there's no mismatched tags"""
# get app template dirs
template_dirs = []
apps = [app for app in settings.INSTALLED_APPS
if app.startswith('rh2')]
for app in apps:
mod = import_module(app)
@AntaeusNar
AntaeusNar / SSH2FA.MD
Last active June 19, 2023 21:10
Enabling SSH Key authentication with 2 Factor Authentication via Google Authenticator and Fail2Ban on Ubuntu 18.04

SSH Key with 2FA

  1. Add the client users's ssh-rsa pubilic key to the server user's ~/.ssh/authorized_keys file.

The rest of the this will be done on the server as the user that will be logged in with the key and 2fa.

  1. Install the Google Authenticator PAM helper

sudo apt update && sudo apt upgrade -y - Always a good idea to update everything before starting

sudo apt install libpam-google-authenticator - This is the module for PAM which allows for 2fa via google

@AntaeusNar
AntaeusNar / .gitignore
Created July 10, 2019 15:14
One Stop Shop .gitignore for Pycharm Python Dev
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
@AntaeusNar
AntaeusNar / scripts.js
Last active May 7, 2019 18:16 — forked from sarvar/index.html
Sticky Bootstrap navbar on scroll for Bootstrap 4
$(document).ready(function() {
// Custom
var stickyToggle = function(sticky, stickyWrapper, scrollElement) {
var stickyHeight = sticky.outerHeight();
var stickyTop = stickyWrapper.offset().top;
if (scrollElement.scrollTop() >= stickyTop){
stickyWrapper.height(stickyHeight);
sticky.addClass("is-sticky");
}
else{
@AntaeusNar
AntaeusNar / extendJSON.py
Created January 4, 2019 17:02
JSON file saving and reading
import json
def file_path_name_w_ext(file_name, path=None):
if path is None:
file_path = './'
else:
file_path = './' + path + '/'
if file_name.endswith(".json"):