Skip to content

Instantly share code, notes, and snippets.

View JJL772's full-sized avatar
:shipit:

Jeremy L. JJL772

:shipit:
View GitHub Profile
@JJL772
JJL772 / mod-config.kv3
Last active April 24, 2023 09:36
Generic mod config
addonsystem:
- handle mounting/unmounting of addons
- download/upload of UGC files
- mounting/unmounting of games too?
@JJL772
JJL772 / migration-and-lfs-setup.md
Created March 5, 2023 09:19
git repo migration notes

Steps for migrating Git repos (including LFS objects) to GitHub

Documents the steps taken to migrate P2CE's internal git repos to github with self-hosted LFS storage (literally just a gitlab instance lol).

Step 1: Mirror LFS Contents (Do this first!)

This is done first because LFS is entirely separate from the git repo itself. Relying on .lfsconfig makes it a bit tricky to mirror using "standard" procedures since there's typically no working tree available.

  1. Clone your repo
  2. Run git lfs fetch --all. We'll need all LFS objects here!
@JJL772
JJL772 / build.md
Last active May 27, 2023 06:41
Building EPICS base and modules with clang

EPICS Base

Clang

make CC=clang CCC=clang++ CMPLR_CLASS=clang

Linux mingw32 x86_64

make -j12 CROSS_COMPILER_TARGET_ARCHS+=windows-x64-mingw

Skipping bhc-tst-ek9000, not online

Skipping bhc-las-ek9000-01, not online

Skipping bhc-mec-ek9000-01, not online

Skipping bhc-las-crixs-inj-01, not online

bhc-tmo-usr-01

Hardware version: 1027

Software version: 1.3.0

@JJL772
JJL772 / 10-base.md
Last active December 14, 2023 05:54
Building EPICS Base + Extensions
@JJL772
JJL772 / kernel-warnings.cpp
Created December 5, 2024 02:27
Code to reproduce the write-back/uncache-minus memory mismatch in aes-stream-drivers
#include "getopt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "DmaDriver.h"
#define AXI_VERSION_OFFSET 0x20000
@JJL772
JJL772 / analyze.py
Created May 9, 2025 18:51
Tiny exception analyzer thing using libclang
#!/usr/bin/env python3
from clang.cindex import Index, Cursor, CursorKind, TranslationUnitLoadError, TranslationUnit
import argparse
import json
import os
from dataclasses import dataclass
import clang.cindex
@JJL772
JJL772 / fix-clangdb.py
Created May 17, 2025 02:03
Fixup compile_commands.json
#!/usr/bin/env python3
# vim: et sw=4 ts=4
# Preprocess a compile_commands.json so that it plays nice with clangd
# Does the following:
# - removes arguments that clangd cannot understand (i.e. -qrtems)
# - Adds -I for each -B search path
# - Adds built-in compiler include paths to the command line
# This script is public domain