Skip to content

Instantly share code, notes, and snippets.

View lispstudent's full-sized avatar

Lisp student lispstudent

View GitHub Profile
@lispstudent
lispstudent / smartos-on-hetzner.doc
Created May 21, 2025 05:15 — forked from Tanhueco/smartos-on-hetzner.doc
SmartOS On Hetzner Dedicated Server and Subnet
# Licensed under CC BY 3.0 http://creativecommons.org/licenses/by/3.0/
# Derived works must attribute https://gist.github.com/4492300 at the beginning, and the date.
##################################################################
Installing and Configuring SmartOS at Hetzner (with a /29)
##################################################################
# This is another version of Jahewson's Gist here: https://gist.github.com/jahewson/4492300 that adds a gate to prevent packets
from leaking out from the main MAC address.

Install FreeBSD 14.0 on Hetzner server

Hetzner no longer offers direct install of FreeBSD, but we can do it ourselves. Here is how :)

Boot the hetzner server in Hetnzer Debain based rescue mode. ssh into it. then:

wget https://mfsbsd.vx.sk/files/iso/14/amd64/mfsbsd-14.0-RELEASE-amd64.iso

qemu-system-x86_64 \
@jperkin
jperkin / pkg_add_nfs.md
Last active November 13, 2025 06:53
pkg_add issue with macOS NFS

Problem

pkgsrc builds on macOS have historically been significantly more unreliable than all other operating systems.

In my most recent builds there were over 400 instances of the error:

pkg_add: no pkg found for '<pkgname>', sorry.
@lispstudent
lispstudent / docker-install.sh
Created February 19, 2024 10:01
Docker install on Ubuntu
#!/bin/sh
# https://docs.docker.com/engine/install/ubuntu/
# Make sure system is updated
apt -y update
apt -y upgrade
# Add Docker's official GPG key
@matthiasg
matthiasg / gist:602eb6f20e2d2a51870efb8473903c7d
Created February 15, 2024 08:24
Install SmartOS on Hetzner machine with NVMe
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "SmartOS" {
recordfail
insmod ext2
insmod gzio
@ctsrc
ctsrc / 00_install_fbsd_14_1_hetzner.md
Last active September 16, 2025 17:31
Install FreeBSD 14.1 on Hetzner

Install FreeBSD 14.1 on Hetzner server

Hetzner no longer offers direct install of FreeBSD, but we can do it ourselves. Here is how :)

Boot the server into rescue mode

Boot the Hetzner server in Hetzner Debian based rescue mode. ssh into it.

The Hetzner rescue image will tell you hardware details about the server in the login banner. For example, with one of my servers I see:

@lelanthran
lelanthran / devlog-gen.sh
Last active July 26, 2025 15:06
Generate html devlog from chap1/content.md, chap2/content.md, etc
#!/bin/bash
# Usage notes:
# 1. Make sure that pandoc is installed.
# 2. Place all your contents for each chapter of your devlog into
# `./chap1/content.md`, `./chap2/content.md`, etc.
# 3. This script will source a file in each chapter called METAINFO.inc. This
# file is optional and can contain two variable declarations:
# AUTHOR="Name Of Author"
# DATE="Date or publication"
@lispstudent
lispstudent / ddns-update.sh
Last active May 28, 2022 14:27 — forked from bomale/ddns-update
Namecheap DDNS Updater Bash Script
#!/bin/sh
# make it executable `chmod +x ddns-update`
# move it path `mv ddns-update /usr/bin/`
# setup cronjob for every 15 minutes `crontab -e`
# */15 * * * * ddns-update >/dev/null 2>&1
# dont forget to change your own domain & password
# uncomment if you want internet connection check before running
#while ! ping -c 1 -W 1 8.8.8.8; do
# echo "DDNS-UPDATE: Waiting internet connection.."
@mmarshall540
mmarshall540 / translate-modifiers.el
Last active November 23, 2022 01:50
Translating modifier keys in Emacs
;; There seems to be no built-in mechanism to swap modifier keys in
;; Emacs, but it can be accomplished (for the most part) by
;; translating a near-exhaustive list of modifiable keys. In the case
;; of 'control and 'meta, some keys must be omitted to avoid errors or
;; other undesired effects.
(defun my/make-key-string (modsymbol basic-event)
"Convert the combination of MODSYMBOL and BASIC-EVENT.
BASIC-EVENT can be a character or a function-key symbol. The
return value can be used with `define-key'."
(vector (event-convert-list `(,modsymbol ,basic-event))))
@lispstudent
lispstudent / fix-ssh-permissions.sh
Created July 10, 2021 16:31
Fix .ssh permissions
sudo chmod -R 600 .ssh
sudo chmod -R 644 .ssh/*.pub
sudo chmod -R 700 .ssh