Skip to content

Instantly share code, notes, and snippets.

View jrmuizel's full-sized avatar

Jeff Muizelaar jrmuizel

View GitHub Profile
Enabling transport-cc for audio codecs (the previous commit on this
branch) added the transport-sequence-number RTP header extension and
transport-cc RTCP feedback to audio. As a side effect, libwebrtc's
bandwidth-estimation (BWE) and probing paths are now active for the
audio send stream. This in turn exposes a long-standing accounting gap
in Firefox's libwebrtc glue that causes BWE probing to spray
padding-only RTP packets on the audio media SSRC. Those packets reach
the encoded-receive frame transformer as audio frames with empty
payloads and no audio-level extension, breaking
webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-audiolevel.html
<!DOCTYPE html>
<title>navigator.keyboard.lock polyfill</title>
<body>
<button onclick="navigator.keyboard.lock();">lock</button>
<button onclick="navigator.keyboard.unlock()">unlock</button>
<button onclick="document.body.requestFullscreen({keyboardLock: 'browser'})">fullscreen/ w lock</button>
<button onclick="document.body.requestFullscreen();">fullscreen</button>
<button onclick="document.exitFullscreen();">exit fullscreen</button>
</body>
@jrmuizel
jrmuizel / app.js
Created February 10, 2026 21:04
Rewritten todomvc-jquery
/*global jQuery, Router */
jQuery(function ($) {
'use strict';
var util = {
uuid: function () {
/*jshint bitwise:false */
var i, random;
var uuid = '';
@jrmuizel
jrmuizel / mallocwrap.c
Created October 17, 2025 15:03
Hook malloc
// profiling_zone.c
#include <malloc/malloc.h>
#include <dlfcn.h>
#include <stdlib.h>
#include <unistd.h>
// Profiling callback function pointers
static void (*profiling_alloc_callback)(void* ptr, size_t reserved_size, size_t used_size) = NULL;
static void (*profiling_free_callback)(void* ptr, size_t reserved_size, size_t used_size) = NULL;
commit d38a61ab87acab9c1e379cfe952082c22da08d55
Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
Date: Fri Nov 15 09:57:49 2024 +0100
trr channel annotation
diff --git a/netwerk/protocol/http/TRRServiceChannel.cpp b/netwerk/protocol/http/TRRServiceChannel.cpp
index 85e6d299e869f..dd4335149aa2e 100644
--- a/netwerk/protocol/http/TRRServiceChannel.cpp
+++ b/netwerk/protocol/http/TRRServiceChannel.cpp
commit fbaacca0ea987d5e231f5dc05fd11d222bfdf2b0
Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
Date: Wed Nov 6 23:19:11 2024 -0500
Socket markers
diff --git a/netwerk/base/nsSocketTransport2.cpp b/netwerk/base/nsSocketTransport2.cpp
index 8952bbebd9f9a..e800018820091 100644
--- a/netwerk/base/nsSocketTransport2.cpp
+++ b/netwerk/base/nsSocketTransport2.cpp
@jrmuizel
jrmuizel / gist:cc9d8d48fb79893f39b86f1488afdff2
Last active May 23, 2025 12:40
iOS browser market share
{
"success": true,
"errors": [],
"result": {
"main": {
"timestamps": [
"2025-03-10T00:00:00Z",
"2025-03-17T00:00:00Z",
"2025-03-24T00:00:00Z",
"2025-03-31T00:00:00Z",
commit 815f5a4bd71cdd73dad134125dde89c8e6ec45bd
Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
Date: Fri Nov 15 10:38:17 2024 +0100
Rust flow
diff --git a/netwerk/protocol/http/nsHttpTransaction.cpp b/netwerk/protocol/http/nsHttpTransaction.cpp
index e6bba66b6fff9..ee6fc53401720 100644
--- a/netwerk/protocol/http/nsHttpTransaction.cpp
+++ b/netwerk/protocol/http/nsHttpTransaction.cpp
@jrmuizel
jrmuizel / JsonWriter.java
Created May 3, 2025 01:31
Stream string values
class StringWriter extends Writer {
public StringWriter(Writer out) {
this.out = out;
}
@Override
public void write(char[] cbuf, int off, int len) throws IOException {
for (int i = 0; i < len; i++) {
char c = cbuf[i + off];
/*
import subprocess
import os
tests_with_workers = ["Air", "Basic", "ML", "Babylon", "cdjs",
"first-inspector-code-load", "multi-inspector-code-load",
"Box2D", "octane-code-load", "crypto", "delta-blue",
"earley-boyer", "gbemu", "mandreel", "navier-stokes",
"pdfjs", "raytrace", "regexp", "richards", "splay",
"typescript", "octane-zlib", "FlightPlanner", "OfflineAssembler",
"UniPoker", "async-fs", "float-mm.c", "hash-map",