Skip to content

Instantly share code, notes, and snippets.

@desaster
desaster / Makefile
Created August 6, 2023 23:21
Makefile for building a bunch of .asm files into bootable DOS floppies
#
# Builds all .asm files in src/ into .com files in build/
#
# For each built .com file in build/, a floppy image is generated in build/
# containing the program, as well as an autoexec.bat to run the program and
# shut down the computer on exit
#
# Requires a bootable DOS floppy image as a base (BASEFLOPPY)
#
# To have the autoexec.bat run the program under debug, use:
@desaster
desaster / wrb.asm
Last active July 5, 2023 14:42
simple 8088 assembly program for creating binary files from keyboard input
;
; Read hex values from input and write them to a file as bytes
;
; Intended to help with bootstrapping vintage computers, when the only access
; is via keyboard or serial console.
;
; Goal is to remain small as possible, so the program could be transferred via
; DEBUG.COM by hand.
;
; To compile:
@desaster
desaster / alacritty-disable-urgency-hints.diff
Created February 1, 2023 11:29
Disable urgency hints in alacritty
In gnome, urgency hint will cause the window to pop-up in front and steal focus, which is super annoying.
On my busy tmux sessions with all kinds of software, urgency hints are triggering from seemingly random stuff.
This patch just completely disables the urgency hints in alacritty.
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs
index 37d28bb9..babeb30f 100644
--- a/alacritty/src/event.rs
+++ b/alacritty/src/event.rs
@desaster
desaster / keychron-q3-customizations.diff
Created October 12, 2022 17:53
My personal customizations to the Keychron Q3 VIAL firmware
My personal customizations to the Keychron Q3 VIAL firmware.
* Add some custom backlight to certain keys if "mac" layer is enabled. This is
done because I use the "mac" layer to remap some keys to F-keys for quick
access, so this modification lights them up for clarity
* new custom keycode KC_BRCYCLE will cycle through three different backlight
brightnesses. I map this to Fn-Space, so it behaves a bit like the backlight
settings on my Lenovo laptop
@desaster
desaster / wayland-touchpad-scroll-fix.md
Created September 11, 2022 20:14
Fix touchpad scroll speed in Wayland
@desaster
desaster / remap-capslock-ctrl.md
Last active August 27, 2023 21:04
remapping capslock to ctrl at low level in Linux

do the following in console, not X11

Prepare

# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event4:      AT Translated Set 2 keyboard

CDE/NetBSD 9.2 Installation Notes

I was able to compile and install CDE on NetBSD 9.2 using the latest git checkout (2021-08-04, g93e280b0). Here are my notes for it.

Fresh NetBSD 9.2, full installation with X11.

Prepare git

pkgin install mozilla-rootcerts
@desaster
desaster / smiley.irc
Created March 26, 2020 19:53
smiley.irc
# Copyright (c) 1999-2001 Upi Tamminen <desaster@dragonlight.fi>
# See the COPYRIGHT file for more information
package smiley
alias h.smiley {
while (1) {
@ :smiley = randread(~/.hienoa/smileys)
if (strlen($h.last_smiley) && smiley == h.last_smiley) {
continue
@desaster
desaster / sasl-freenode.patch
Created December 31, 2019 10:22
>>> Odd server stuff: "CAP * ACK sasl " (moon.freenode.net)
diff --git a/script/sasl_auth b/script/sasl_auth
index 49894bb..d5288e9 100644
--- a/script/sasl_auth
+++ b/script/sasl_auth
@@ -124,7 +124,7 @@ on #-server_established 100 '\\\\[$$sasl_auth.servers\\\\] %' {
};
};
-on ^odd_server_stuff '\\\\[$$sasl_auth.servers\\\\] CAP % ACK :*sasl*' {
+on ^odd_server_stuff '\\\\[$$sasl_auth.servers\\\\] CAP % ACK *sasl*' {