Skip to content

Instantly share code, notes, and snippets.

View philpem's full-sized avatar

Phil philpem

View GitHub Profile
@philpem
philpem / README.md
Last active October 26, 2026 10:25
De-enshittify Gitlab (remove Gitlab Duo sidebar and slop features)

De-enshittify Gitlab (CE/EE self-hosted)

I'm stuck with Gitlab because I need project/repo hierarchies to deal with the RISC OS source code, and Forgejo currently doesn't support them (I haven't tried Gitea). Unfortunately on the free tier, there's a very invasive sidebar which pimps the Gitlab Duo AI slop features, and doesn't seem to have an "off" switch in the admin panel.

This is how you de-enshittify Gitlab a little by removing the Duo panel. (tested on 19.5.1 self-hosted in Docker).

cURL method

From https://gitlab.com/gitlab-org/gitlab/-/merge_requests/257551

@philpem
philpem / SKILL.md
Last active November 5, 2026 09:51
LLM skills for writing and reviewing technical documents
name tech-doc-style
description Write or edit technical documentation and findings, including READMEs, guides, manuals, help text, documentation comments, and technical reports. Improve clarity, structure, attribution, tone, and consistency while preserving technical meaning. Applies to documentation prose, not code.

Technical documentation style guide

Use this guide to help readers understand a subject and complete their task. It draws on the Acorn Technical Publications Style Guide (Issue 2, July 1991), with modern defaults for technical documentation. Historical conventions are

#!/usr/bin/env python3
#
# Deinterleave BSB font ROM from Maskromtool output
#
import os, sys
def die(x):
print(x)
sys.exit(1)
@philpem
philpem / mptcheck.c
Created March 28, 2025 21:43
MPT1327/MPT1343 Check Byte calculation
// This code takes the Electronic Serial Number (ESN) of an MPT1327 radio and calculates the 8-bit Check Byte
// as defined in MPT1343 section 7.
// This algorithm was formerly secret - one would have to ask the Radiocommunications Agency for a copy.
//
// The original intent was to stop radios from being illicitly cloned using only tha information on the label.
// Unfortunately the radio transmits the check byte (the whole thing) as part of the network registration sequence,
// so it does precisely nothing if you can sniff a radio registraion request on the control uplink channel.
//
// These days it's of historical interest, or of interest to people who are curious about MPT1327/MPT1343 (or whether
// their fellow hams have figured out how to change their radios' ESNs... if you know any hams using MPT/Taitnet kit)
@philpem
philpem / rp2040_sdlc.pio
Last active September 16, 2024 16:55
SDLC in Pi 2040 PIO
; This is a first pass attempt at making a Pi Zero PIO module handle zero-bit stuffing and flag transmission
; It will need cycle delays adding, etc. to turn it into usable code.
; I got half-way through it, then realised it wasn't going to work for my use case (NABU Adaptor packet generation) because
; the NABU Adaptor has a LFSR-based bitstream randomizer (scrambler) after the SDLC block.
;
; Set up autopull, and a bit length of 9 (if such a thing is possible, I haven't checked).
; The first bit shifted is a 0 for normal data, or a 1 for 'raw' sending, which is used to send flags (0x17E).
.program sdlc
.side_set 1
@philpem
philpem / hyperbolic.ipynb
Last active December 4, 2018 12:19
Hyperbolic radio navigation proofs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philpem
philpem / rrcfilter.ipynb
Created October 19, 2018 14:36
Root raised cosine filter using SciPy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philpem
philpem / si44xxClE.ipynb
Created October 19, 2018 13:15
Si44xx Class E matching (Jupyter notebook)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am philpem on github.
  • I am philpem (https://keybase.io/philpem) on keybase.
  • I have a public key ASBkTwASXx0xo0kS4P1bKk8l5bz7sZGLHDr6hUxO87ytWwo

To claim this, I am signing this object: