Skip to content

Instantly share code, notes, and snippets.

@ajmassi
ajmassi / LXCBindMount.md
Last active September 26, 2024 19:00
Create a bind mount from a Proxmox host on an unprivileged lxc container

Proxmox Assign Bind Mount To Unprivileged Container

In order for the LXC container to have full access the proxmox host directory, a subgid is set as owner of a host directory, and an ACL is used to ensure permissions.

Bind Mount dataset to LXC

Add the following line to /etc/pve/lxc/<CT_ID>.conf

mp0:/mount/point/on/host,mp=/mount/point/on/lxc

Create group on host

In the default Proxmox configuration, unpriviliged container subgids will have the prefix "10" followed by the expected 4-digit gid.

@chriswayg
chriswayg / create-cloud-template.sh
Last active May 1, 2024 20:47
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@chriswayg
chriswayg / Ubuntu_Debian_Cloud_images_in_Proxmox.md
Last active October 22, 2024 17:54
Ubuntu and Debian Cloud images in Proxmox
--- wsjtx-2.1.0-rc5/src/wsjtx/widgets/logqso.cpp 2019-04-29 11:25:43.000000000 -0400
+++ wsjtx/widgets/logqso.cpp 2019-02-26 09:41:31.736728126 -0500
@@ -1,12 +1,9 @@
#include "logqso.h"
-#include <random>
-#include <limits>
#include <QString>
#include <QSettings>
#include <QStandardPaths>
@KrustyHack
KrustyHack / doc.adoc
Last active September 19, 2024 16:37
proxmox-ubuntu-cloud-howto

Cloud-Init Support

Cloud-Init is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, one can configure network

#!/bin/bash
cd /home/dylan/radio/fireoc
while [ -f run.me ]
do
#/usr/bin/sox -t alsa default audio/recording.wav silence 1 0.1 5% 1 1.0 5%
/usr/bin/sox -t alsa default audio/recording.wav silence 1 0.2 1% 1 3.0 1%
#/usr/bin/sox -t alsa default audio/recording.wav silence 1 00:00:00.5 -45d -1 00:00:00.5 -45d
if [ -s audio/recording.wav ]
then
DATE=$(date +%s)
@jay3sh
jay3sh / guard-my-mabook-when-i-am-away.sh
Created March 30, 2016 16:46
Guard My Macbook When I'm Away
#!/bin/bash
#
# When you are working on your macbook sitting in cafe and you have to go pee,
# you need some way to guard you machine.
#
# Start this script, remove any earphones, and go do the job.
# The assumption is the thief will close the lid of the laptop before taking it away.
# This script detects the closing of the lid and plays some loud audio that will
# likely distract the thief and/or grab attention of nearby people, making the
@alirobe
alirobe / reclaimWindows10.ps1
Last active October 19, 2024 05:31
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active February 24, 2024 12:19
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@kimus
kimus / ufw.md
Created March 2, 2014 22:46
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.