Skip to content

Instantly share code, notes, and snippets.

View mike-pisman's full-sized avatar

Mikhail Pisman mike-pisman

View GitHub Profile
@mike-pisman
mike-pisman / microk8s_in_lxc.md
Last active June 11, 2023 09:07 — forked from acj/microk8s_in_lxc.md
Installing microk8s in an LXC container

Installing microk8s in an LXC container

I wanted to run Microk8s on a Proxmox 6 host inside of an LXC container. These are my notes from the journey.

  1. Create a privileged LXC container through the Proxmox web interface
  • Enable nesting and FUSE
    • In Proxmox UI, select container, then Options > Features > Check nesting and FUSE boxes
  1. SSH into the Proxmox host and edit the container's config in /etc/pve/lxc/.conf
    • Add the following lines
  • lxc.apparmor.profile: unconfined
@mike-pisman
mike-pisman / debian_migrate_pkglist.sh
Last active October 20, 2022 10:41
A few command to help migrate from old Ubuntu/Debian machine to a new one and reinstall all of the aptitude packages.
# On the old machine, create a list of all installed packages
apt list --installed 2>/dev/null | sed 's/\/.*//g > pkglist'
# On the new machine, Filter packages for those available
while read package; do apt show "$package" 2>/dev/null | grep -qvz 'State:.*(virtual)' && echo "$package" >>packages-valid && echo -ne "\r\033[K$package"; done <packages
# Install the available packages all at once
sudo apt install $(tr '\n' ' ' <packages-valid)
/* ==UserStyle==
@name 9/7/2022, 4:55:08 PM
@namespace github.com/openstyles/stylus
@version 1.0.0
@description Dracula theme for Debian Kernel Handbook.
@author mpisman
==/UserStyle== */
@-moz-document url-prefix("https://kernel-team.pages.debian.net/kernel-handbook/") {
/* Dracula Colors */
firewall {
all-ping enable
name LAN-LOCAL {
default-action accept
}
name LAN-WAN {
default-action accept
}
name LOCAL-LAN {
default-action accept
@mike-pisman
mike-pisman / pulseaudio_volume.py
Last active May 23, 2022 04:47
A Qtile widget to control volume of the default pulseaudio sink
#!/usr/bin/python3
from os import system
from os import path
import sys, subprocess
from libqtile.widget import base
from pulsectl import Pulse, PulseVolumeInfo
# Path to config file
DEFAULT_DEVICE = '/home/mpisman/.screenlayout/'
@mike-pisman
mike-pisman / xrandr_brightness.py
Last active May 23, 2022 03:38
A simple Qtile widget for controling display brightness with Xrandr
#!/usr/bin/python3
from os import system
from os import path
import sys
from libqtile.widget import base
# Path to config file
DEFAULT_PATH = '/home/mpisman/.screenlayout/'