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 / dhttp.c
Last active April 14, 2025 02:46
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-2024 Emil Mikulic <[email protected]>
*
* 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 August 20, 2024 01:46
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:

@alexjsteffen
alexjsteffen / MatterThread.md
Created June 28, 2024 02:52
Matter and thread devices

Matter-Compatible Smart Home Products: A Comprehensive Overview

This table showcases a wide array of Matter-compatible smart home products from various brands. The products span different categories, including lighting, locks, thermostats, switches, sensors, and more. The table also indicates the product's network type (T for Thread), whether it's targeted towards consumers (C) or businesses (B2B), and its current state (ready, announced, or stopped).

Brand Product Network Type State
Coulisse Motionblinds T B2B ready
Eve Systems Eve MotionBlinds T B2B ready
Eve Systems Eve ShutterSwitch T C announced
Eve Systems Eve MotionBlinds Upgrade Kit T C announced
@alexjsteffen
alexjsteffen / tweaks.md
Created February 12, 2024 16:22
Common Linux Tweaks

Common Linux Tweaks

This gist will consolodate various tweaks I use on my various linux distributions, primarily on Arch Linux. It will be updated from time to time.

Gnome Shell Tweaks

Always on Top

dconf write /org/gnome/desktop/wm/keybindings/always-on-top "['a']"

@alexjsteffen
alexjsteffen / cr.md
Created February 10, 2024 23:47
List of Common Monitor Aspect Ratios

Common Aspect Ratios

16:9 Aspect Ratio

  1. 640×360
  2. 854×480
  3. 960×540
  4. 1280×720 (also known as HD)
  5. 1600×900
  6. 1920×1080 (also known as Full HD)