Skip to content

Instantly share code, notes, and snippets.

Avatar
🕶️
DEAL WITH IT.

Cameron Kaiser classilla

🕶️
DEAL WITH IT.
View GitHub Profile
View 1758610.diff
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 Mar 1, 2022
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
View wordle.s
.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 Dec 20, 2021
Linux code for reading a GM1356 USB-based decibel sound monitor. See https://oldvcr.blogspot.com/2021/12/monitoring-vintage-server-room-and.html
View gm1356.c
/*
(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 Dec 20, 2021
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
View thum.c
/*
(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 Feb 15, 2021
inetb: a single-process multithreaded inetd for pre-BONE BeOS R5
View inetb.c
/* 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 Dec 13, 2020
Full anaglyph sprite demo for the C64 (assemble with xa65, LOAD and RUN). https://oldvcr.blogspot.com/2020/12/stereoscopic-computing-anaglyph-sprites.html
View d3d.s
; 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 Dec 13, 2020
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
View 3dspr.s
; 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 May 31, 2022
PGO fixes and livability improvements for LTO in Firefox on ppc64le Linux. Read web page first! -- https://www.talospace.com/2022/05/firefox-101-on-power.html
View firefox-pgo.diff
diff -r b22cb12f611c build/moz.configure/lto-pgo.configure
--- a/build/moz.configure/lto-pgo.configure Thu Oct 07 08:11:19 2021 +0000
+++ b/build/moz.configure/lto-pgo.configure Sun Oct 10 20:36:46 2021 -0700
@@ -81,17 +81,17 @@
@depends(c_compiler, pgo_profile_path, target_is_windows)
@imports("multiprocessing")
def pgo_flags(compiler, profdata, target_is_windows):
if compiler.type == "gcc":
return namespace(
@classilla
classilla / gzdoomdisplay.diff
Created Oct 5, 2020
A tweak to always force GZDoom onto a secondary display (useful for 3D monitors). See https://oldvcr.blogspot.com/2020/10/stereoscopic-computing-converting-quake.html
View gzdoomdisplay.diff
--- sdlglvideo.cpp.OLD 2020-10-04 21:23:32.751041920 -0700
+++ sdlglvideo.cpp 2020-10-04 20:54:21.740470397 -0700
@@ -163,18 +163,19 @@
win_h = bounds.h * 8 / 10;
}
FString caption;
caption.Format(GAMENAME " %s (%s)", GetVersionString(), GetGitTime());
const uint32_t windowFlags = (win_maximized ? SDL_WINDOW_MAXIMIZED : 0) | SDL_WINDOW_RESIZABLE | extraFlags;
@classilla
classilla / quakespasm3d.diff
Created Oct 5, 2020
Convert Quakespasm to use interlaced R-L video for passive 3D monitors. See https://oldvcr.blogspot.com/2020/10/stereoscopic-computing-converting-quake.html
View quakespasm3d.diff
--- gl_rmain.c.OLD 2020-08-02 16:35:29.798497930 -0700
+++ gl_rmain.c 2020-10-03 23:32:00.309704966 -0700
@@ -77,16 +77,17 @@
cvar_t gl_affinemodels = {"gl_affinemodels","0",CVAR_NONE};
cvar_t gl_polyblend = {"gl_polyblend","1",CVAR_NONE};
cvar_t gl_flashblend = {"gl_flashblend","0",CVAR_ARCHIVE};
cvar_t gl_playermip = {"gl_playermip","0",CVAR_NONE};
cvar_t gl_nocolors = {"gl_nocolors","0",CVAR_NONE};
//johnfitz -- new cvars