Skip to content

Instantly share code, notes, and snippets.

View classilla's full-sized avatar
🕶️
DEAL WITH IT.

Cameron Kaiser classilla

🕶️
DEAL WITH IT.
View GitHub Profile
diff -r 4cb22dd449d6 third_party/libwebrtc/moz.build
--- a/third_party/libwebrtc/moz.build Mon Aug 07 08:16:50 2023 +0000
+++ b/third_party/libwebrtc/moz.build Tue Aug 08 13:57:02 2023 -0700
@@ -603,16 +603,26 @@
"/third_party/libwebrtc/modules/desktop_capture/primitives_gn",
"/third_party/libwebrtc/modules/portal/portal_gn",
"/third_party/libwebrtc/third_party/drm/drm_gn",
"/third_party/libwebrtc/third_party/gbm/gbm_gn",
"/third_party/libwebrtc/third_party/libepoxy/libepoxy_gn",
"/third_party/libwebrtc/third_party/pipewire/pipewire_gn"
@classilla
classilla / no-reg-6502-bf.pl
Last active January 4, 2023 02:07
Minimal Brainf*ck compiler that turns BF into 6502 assembly but is Turing complete without A, X or Y. http://oldvcr.blogspot.com/2023/01/the-mos-6502-is-mostly-turing-complete.html
#!/usr/bin/perl -s
#
# Takes BF, emits 6502 that only clobbers PC, S, and the N and V flags
# Requires an assembler (I recommend xa65)
#
# Cameron Kaiser
# Public domain
# http://oldvcr.blogspot.com/2023/01/the-mos-6502-is-mostly-turing-complete.html
#
diff -r 3a74cc97e160 dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp Fri Apr 01 19:35:34 2022 +0000
+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp Thu Apr 07 20:21:34 2022 -0700
@@ -809,17 +809,17 @@
if (!PrepareFrame()) {
NS_WARNING("FFmpeg decoder failed to allocate frame.");
return MediaResult(NS_ERROR_OUT_OF_MEMORY, __func__);
}
# ifdef MOZ_WAYLAND_USE_VAAPI
@classilla
classilla / wordle.s
Last active March 1, 2022 21:20
Sorta-Wordle for the MOS/Commodore KIM-1, in 100% 6502 assembly language. Just 1K! https://oldvcr.blogspot.com/2022/02/kimdle-sorta-wordle-for-kim-1.html
.word $4200
* = $0200
; kimdle version 3
; guess letters a-f and 0 = o 1 = i 5 = s
; assembles into a KIMplement-compatible binary with xa65
; (C)2022 cameron kaiser
; all rights reserved
@classilla
classilla / gm1356.c
Created December 20, 2021 05:49
Linux code for reading a GM1356 USB-based decibel sound monitor. See https://oldvcr.blogspot.com/2021/12/monitoring-vintage-server-room-and.html
/*
(C)2020-1 Cameron Kaiser, ckaiser@floodgap.com
All rights reserved.
Distributed under the Floodgap Free Software License.
Credit to https://github.com/dobra-noc/gm1356/blob/master/PROTOCOL.md for the
original protocol description.
Linux:
@classilla
classilla / thum.c
Created December 20, 2021 05:49
OS X (10.4+) and Linux code for reading a THUM USB-based temperature/humidity monitor. See https://oldvcr.blogspot.com/2021/12/monitoring-vintage-server-room-and.html
/*
(C)2020-1 Cameron Kaiser, ckaiser@floodgap.com
All rights reserved.
Distributed under the Floodgap Free Software License.
Linux:
gcc -o thum thum.c -lhid -lusb
Mac OS X:
gcc -o thum thum.c -framework CoreFoundation -framework IOKit
@classilla
classilla / inetb.c
Created February 15, 2021 05:06
inetb: a single-process multithreaded inetd for pre-BONE BeOS R5
/* inetb: a single-process multithreaded inetd for pre-BONE BeOS R5
** Intel and PowerPC compatible
** MAKE BEBOXES GREAT AGAIN
**
** with Metrowerks:
** cc -O7 -o inetb inetb.c
** (debugging to stderr: cc -DDEBUG -o inetb inetb.c )
** (debugging to socket: cc -DSDEBUG -o inetb inetb.c )
** (you can do -DDEBUG -DSDEBUG together! it's fun!)
**
@classilla
classilla / d3d.s
Created December 13, 2020 23:03
Full anaglyph sprite demo for the C64 (assemble with xa65, LOAD and RUN). https://oldvcr.blogspot.com/2020/12/stereoscopic-computing-anaglyph-sprites.html
; anaglyph sprite demo for the c64
; cameron kaiser 2020
; public domain
SPRITE = $0340
VALUE = $14
HVALUE = $fe
MODE = $15
.word $0801
@classilla
classilla / 3dspr.s
Created December 13, 2020 23:02
6502 assembly to take a value and create an interlaced square sprite of that size (assemble with xa65). https://oldvcr.blogspot.com/2020/12/stereoscopic-computing-anaglyph-sprites.html
; given 0-21, create a sprite sized x by x, skipping every other line
; cameron kaiser 2020
; public domain
SA = $c000
SPRITE = $0340
* = SA
.word SA
@classilla
classilla / firefox-pgo.diff
Last active April 8, 2024 14:33
PGO fixes and livability improvements for LTO in Firefox on ppc64le Linux. Read web page first! -- https://www.talospace.com/2024/03/firefox-124-on-power.html
diff -r ac0e1ee8218f build/moz.configure/lto-pgo.configure
--- a/build/moz.configure/lto-pgo.configure Tue Feb 20 13:51:00 2024 +0000
+++ b/build/moz.configure/lto-pgo.configure Sat Feb 24 22:47:17 2024 -0800
@@ -2,17 +2,17 @@
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# PGO