Skip to content

Instantly share code, notes, and snippets.

View schmonz's full-sized avatar

Amitai Schleier schmonz

View GitHub Profile
@schmonz
schmonz / run.execline
Last active April 8, 2025 19:33
Run Minecraft server under process supervision
#!/opt/pkg/bin/execlineb -P
fdmove -c 2 1
cd /home/minecraft/sites/schmonz.com/minecraft/data
redirfd -w -nb 3 control
trap -x
{
SIGINT { fdmove 1 3 s6-echo stop }
@schmonz
schmonz / debian-grow-rootfs.md
Created January 8, 2024 15:28
Grow root filesystem on old Debian VMs
cp *.qcow2 qcow2.BACKUP

qemu-img resize *.qcow2 50G

./run

fdisk -l

swapoff -a
@schmonz
schmonz / pkgcenter-for-schmonzes.md
Last active December 13, 2023 18:43
pkgcenter intro for schmonzes and maybe other people

pkgcenter

pkgcenter is a tool for people who

  1. Rely on native Unix system packages for software dependency management
  2. Must manage dependency risks beyond the capabilities of native Unix package tools

Real-world example 1

Let's say you're on Enterprise Linux 7 and working through the EL9 upgrade.

@schmonz
schmonz / 20211031-macbook2,1-lubuntu.md
Last active December 3, 2022 21:45
64-bit Ubuntu on MacBook2,1 with 32-bit EFI

A year later, I think (but can't be sure I'm remembering correctly) that I did this with Ubuntu 21.10.

Prepare

  1. Download Ubuntu install 2. Using Rufus for Windows, write it to a USB stick
  2. Remove rEFInd from the old Mac
  3. Download bootable-CD rEFInd 2. Using Rufus for Windows, write it to a USB stick
  4. Download a special bootia32.efi
@schmonz
schmonz / conferences2021.md
Last active September 3, 2020 07:36
2021 conferences of interest

(Last year's list)

2021: Attended

Start End Place Event CFP

2021: Will Attend

| Start | End | Place | Event | CFP |

@schmonz
schmonz / conferences2020.md
Last active October 21, 2019 14:54
2020 conferences of interest

(Last year's list)

2020: Attended

Start End Place Event CFP

2020: Will Attend

| Start | End | Place | Event | CFP |

@schmonz
schmonz / conferences2019.md
Last active October 1, 2019 12:14
2019 conferences of interest
pkg_comp: I: Creating sandbox
pkg_comp: I: Bootstrapping pkg tools
pkg_comp: I: Setting up bootstrap in /opt/.pkg-20180804 from scratch
===> bootstrap command: ./bootstrap --gzip-binary-kit=/pkg_comp/packages/pkg/bootstrap.tgz --make-jobs=1 --mk-fragment=/pkg_comp/work/mk.conf.fragment --pkgdbdir=/opt/.pkg-20180804/libdata/pkgdb --prefix=/opt/.pkg-20180804 --sysconfdir=/etc --varbase=/var --workdir=/pkg_comp/work/pkg/bootstrap
===> bootstrap started: Sat Aug 4 17:00:17 UTC 2018
Working directory is: /pkg_comp/work/pkg/bootstrap
===> running: /usr/bin/sed -e 's|@DEFAULT_INSTALL_MODE@|'0755'|' /pkg_comp/pkgsrc/sysutils/install-sh/files/install-sh.in > /pkg_comp/work/pkg/bootstrap/bin/install-sh
===> running: /bin/chmod +x /pkg_comp/work/pkg/bootstrap/bin/install-sh
===> Creating default mk.conf in /pkg_comp/work/pkg/bootstrap
===> running: /bin/sh /pkg_comp/work/pkg/bootstrap/bin/install-sh -d -o root -g wheel /pkg_comp/work/pkg/bootstrap/sbin
#!/bin/sh
vbox_is_running() {
count=$(VBoxManage showvminfo "$1" | grep -c 'running (since')
[ 0 -lt $count ]
}
vbox_start_if_needed() {
vbox_is_running "$1" || VBoxManage startvm "$1" --type headless
}
#!/usr/bin/env perl
# in .qmail:
# | rewriteto [email protected] | forward [email protected]
use warnings;
use strict;
sub munge_to_header {
my ($new_to) = @_;