Skip to content

Instantly share code, notes, and snippets.

//
// LargestSymbolView.swift
//
// Created by Alex Rosenberg on 1/24/24.
//
import SwiftUI
// This view modifier takes a list of SF Symbols systemImage names
// and lays out as the largest frame needed to hold any of those
//
// VolumePopupView.swift
//
// Created by Alex Rosenberg on 1/24/24.
//
import SwiftUI
import AVFoundation
import MediaPlayer
@ohmantics
ohmantics / prox_buildzectl.sh
Created September 11, 2023 20:30
Procedure for building zectl for Proxmox 7
# Make a new Proxmox 7.4 VM
# Set the processor type to 'Host'
# Add a single disk. I use a VirtIO Block device.
# Pick OVMF (UEFI)
# On first boot, enter the BIOS and disable Secure Boot
# When installing, pick ZFS RAID0
# After reboot, ssh in so you can paste
rm /etc/apt/sources.list.d/pve-enterprise.list
echo 'deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription' > /etc/apt/sources.list.d/pve-no-subscription.list
@ohmantics
ohmantics / jail_setup.sh
Last active April 4, 2023 19:20
FreeBSD jail to watch a directory and make files appear atomically for paperless-ngx
sudo iocage create -n watcher -r 13.1-RELEASE vnet=on ip4=disable ip6=disable boot=on
sudo mkdir /mnt/tank/iocage/jails/watcher/root/mnt/paperless
sudo iocage fstab watcher -a "/mnt/tank/paperless/paperless /mnt/paperless nullfs rw 0 0"
sudo pkg --chroot /mnt/tank/iocage/jails/watcher/root install inotify-tools
# install the two files below
sudo iocage start watcher
sudo iocage exec watcher sysrc watcher_enable="YES"
###########################Put in /usr/local/bin/watcher.sh
#!/bin/sh
@ohmantics
ohmantics / owntone-setup.sh
Last active August 8, 2022 01:46
Setup owntone in an iocage jail
sudo iocage create -n "owntone" -r 12.3-RELEASE dhcp=1 bpf=1 vnet=1 allow_raw_sockets="1"
sudo mkdir -p /mnt/tank/apps/owntone
sudo chown media:media /mnt/tank/apps/owntone
sudo iocage start owntone
#sudo iocage console owntone
sudo iocage exec owntone "mkdir -p /mnt/media"
sudo iocage fstab -a owntone /mnt/tank/media /mnt/media nullfs rw 0 0
sudo iocage exec owntone "mkdir -p /config"
sudo iocage fstab -a owntone /mnt/tank/apps/owntone /config nullfs rw 0 0
@ohmantics
ohmantics / hb-setup.sh
Last active March 25, 2024 15:20
Homebridge in an iocage jail
DATASET=/zroot/apps
# Create the jail
iocage create -n "homebridge" -r 13.1-RELEASE dhcp=1 bpf=1 vnet=1 allow_raw_sockets="1" boot="on"
# switch to Latest
iocage exec homebridge "mkdir -p /usr/local/etc/pkg/repos"
iocage exec homebridge "echo -e 'FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/latest\" }' > /usr/local/etc/pkg/repos/FreeBSD.conf"
# Install Homebridge and dependencies
@ohmantics
ohmantics / keybase.md
Last active August 29, 2015 13:57
keybase.md

Keybase proof

I hereby claim:

  • I am ohmantics on github.
  • I am alexr (https://keybase.io/alexr) on keybase.
  • I have a public key whose fingerprint is 9E72 5759 B44F 30CC E311 0C8F AEE0 EBB2 D258 849F

To claim this, I am signing this object: