Skip to content

Instantly share code, notes, and snippets.

View alexjsteffen's full-sized avatar
🎯
Focusing

Alexander Jonathan Hardy Steffen alexjsteffen

🎯
Focusing
View GitHub Profile
@alexjsteffen
alexjsteffen / convert_openrouter.py
Last active April 19, 2026 00:01
A vibecoded python script to convert OpenRouter json output into pdf, odt, and a html file
import json
import subprocess
import os
import glob
import html
def clean_text_for_markdown(text):
"""Cleans up literal escape characters so LaTeX doesn't crash."""
if isinstance(text, str):
return text.replace('\\n', '\n')
@alexjsteffen
alexjsteffen / vm-export.zsh
Created April 11, 2026 16:41
Simple vibecoded VM export script.
#!/usr/bin/env zsh
set -euo pipefail
autoload -Uz colors && colors
echo "${fg[cyan]}[*] Available libvirt domains:${reset_color}"
sudo virsh list --all
echo
read "VM_NAME?Enter VM name to export: "
@alexjsteffen
alexjsteffen / PKGBUILD
Created July 25, 2025 18:27
Openbubbles custom PKGBUILD
# Maintainer: Alexander Jonathan Hardy Steffen <alex@ajhs.io>
pkgname=openbubbles-bin
pkgver=161
pkgrel=1
pkgdesc="A cross-platform messaging app."
arch=('x86_64')
url="https://github.com/OpenBubbles/openbubbles-app"
license=('MIT')
depends=() # Add runtime dependencies here if you discover any
@alexjsteffen
alexjsteffen / dhttp.c
Last active October 13, 2025 05:30
Modernize directory listing HTML and print all local IP addresses at startup of darkhttpd.c for personal use
/* darkhttpd - a simple, single-threaded, static content webserver.
* https://unix4lyfe.org/darkhttpd/
* Copyright (c) 2003-2025 Emil Mikulic <emikulic@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
@alexjsteffen
alexjsteffen / Telus.Mikrotik.ipv6.SFP.rsc
Created February 27, 2025 02:01
Mikrotik Script to activate ipv6 properly on Telus PureFiber with a SFP+ adapter or similar
:log info "Configuring SLAAC for IPv6"
/ipv6 address add interface=local from-pool=delegation advertise=yes
/ipv6 nd add interface=local dns=2606:4700:4700::1111 hop-limit=64 mtu=1500 ra-interval=10s-20s ra-preference=low
:log info "SLAAC configuration complete"

Adding SSH Public Keys to a Remote Server

To add your SSH public keys to the authorized_keys file on a remote Linux server, follow these steps:

Prerequisites

  • Ensure OpenSSH is installed on your Windows machine.
  • Locate your SSH public key files.

Commands

Ghostty Configuration

This document describes the configuration options for Ghostty, a terminal emulator. The following sections detail the various settings, grouped by category, with explanations and configuration options formatted for clarity and suitable for PDF export via Pandoc.


Font Settings

Font Families

AIC8800 Setup Guide

This guide will walk you through the process of setting up the aic8800 device on your Arch Linux system. We'll cover the installation of necessary dependencies, cloning and installing from the GitHub repository, and configuring usb_modeswitch to enable WiFi mode permanently.

Prerequisites

Ensure you have dkms installed on your system. If not, you can install it using the following command:

sudo pacman -S dkms
@alexjsteffen
alexjsteffen / rsync-mv.md
Created October 10, 2024 02:50
This document provides instructions for using the rsync command to move a folder on a PC while displaying progress and removing the source files after copying.

To move a folder within the same PC using rsync, while showing progress and verbose output, you can use the following command:

rsync -a --info=progress2 --remove-source-files /path/to/source/folder/ /path/to/destination/folder/

Breakdown of Options Used:

  • -a: This stands for "archive mode", which preserves permissions, timestamps, symbolic links, and other attributes while copying.
  • --info=progress2: This option provides detailed progress information for each file.
@alexjsteffen
alexjsteffen / samba.macos-colours.md
Last active September 19, 2025 20:05
Updated with raw list

Mac Computers

Using the fruit:model Parameter in Samba for macOS Compatibility

Overview

The fruit:model parameter in Samba's vfs_fruit module allows you to specify the Apple device model to improve compatibility with macOS clients.

Configuration

When configuring your Samba share, you can use model codes to set the fruit:model parameter. For example, to emulate a MacBook Pro from 2019, use the following in your smb.conf file: