Skip to content

Instantly share code, notes, and snippets.

@ammgws
ammgws / create-iso.sh
Created August 29, 2023 13:42 — forked from julianxhokaxhiu/create-iso.sh
Simple bash script to create a Bootable ISO from macOS Catalina Install Image from Mac App Store
#!/usr/bin/env bash
#===========================================================================
# Works only with the official image available in the Mac App Store.
# Make sure you download the official installer before running this script.
#===========================================================================
hdiutil create -o /tmp/Catalina.cdr -size 9000m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Catalina.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build --nointeraction
hdiutil detach "/Volumes/Install macOS Catalina"
pkgname=google-chrome79-for-webos
pkgver=79.0.3945.130
pkgrel=2
pkgdesc="Used for remote inspection of Chrome 79 running on older versions of WebOS on LG TVs"
arch=('x86_64')
url="https://www.google.com/chrome"
license=('custom:chrome')
depends=('alsa-lib' 'gtk3' 'libcups' 'libxss' 'libxtst' 'nss')
optdepends=('kdialog: for file dialogs in KDE'
'gnome-keyring: for storing passwords in GNOME keyring'
set filename /tmp/swaybg_kernelupdate_"$WAYLAND_DISPLAY"
printf 'text 0,0 "Kernel was updated, restart!!!\n\nRunning: %s\nInstalled: %s"' "$running_version" "$installed_version" > "$filename".txt
convert \
-size 1920x1080 xc:black \
-pointsize 85 \
-fill red \
-gravity center \
-draw @"$filename".txt "$filename".png
swaymsg output '*' bg "$filename".png stretch
@ammgws
ammgws / proxmox_frigate_coral_passthrough_new_method.md
Last active March 12, 2025 15:57
Proxmox 8.1 ~ 8.2 introduced an improved way to passthrough devices to LXC without having to do the whole idmap dance

Goal: to pass device to LXC (in this case a Coral PCI device at /dev/apex_0)

Old method:

  1. Add root:44:1 to /etc/subgid on Proxmox host
  2. Add the following to LXC conf file on Proxmox host:
lxc.cgroup2.devices.allow: c 120:0 rwm
lxc.mount.entry: /dev/apex_0 dev/apex_0 none bind,optional,create=file
lxc.idmap: u 0 100000 65536
lxc.idmap: g 0 100000 44