Skip to content

Instantly share code, notes, and snippets.

@smx-smx
smx-smx / XZ Backdoor Analysis
Last active February 26, 2025 01:17
[WIP] XZ Backdoor Analysis and symbol mapping
XZ Backdoor symbol deobfuscation. Updated as i make progress
@CTXz
CTXz / gowin-ide-fix-theme.sh
Last active January 26, 2025 01:17
Patches the libQtGui.so.4 library to ignore system themes and thus fixes akward theme issues with the Gowin FPGA IDE on Linux.
#!/usr/bin/env bash
#
# Copyright (C) 2023 Patrick Pedersen
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@mrWinston
mrWinston / how-to.md
Last active March 11, 2024 08:25
Midi over Bluetooth setup in Bitwig

How to set up Midi over Bluetooth with Bitwig under Ubuntu 22.04

Getting Midi over Bluetooth (MoB) to work together with Bitwig under Ubuntu 22.04 requires you to jump through a few hoops. Two main issues need to be navigated around:

  1. The ubuntu userspace bluetooth driver does not have midi enabled
  2. Bitwig only accepts hardware Midi devices, while MoB creates a software midi device

Fixing the first requires us to build bluez from scratch and enable the midi functionality as a compiler flag: https://tttapa.github.io/Pages/Ubuntu/Software-Installation/BlueZ.html

@aphyr
aphyr / minikanren.pl
Created October 12, 2020 22:10
Minikanren in Lisp in Prolog
:- use_module(library(pairs)).
:- use_module(library(reif)).
not_in_list(K, L) :-
if_((L = []),
true,
([X | More] = L,
dif(K, X),
not_in_list(K, More))).
@newmanbrad
newmanbrad / deepFreezeObject.js
Created December 1, 2016 13:20
Deep Freeze Object Javascript
// Object.freeze() will not freeze nested objects. The function below
// will freeze all nested objects for immutability.
let isObject = (val) => val && typeof val === 'object';
function deepFreezeObject(obj) {
if(isObject(obj) && !Object.isFrozen(obj)){
// Recusively call until all child objects are frozen
Object.keys(obj).forEach(name => deepFreezeObject(obj[name]));
Object.freeze(obj);
}
@DanDiplo
DanDiplo / JS-LINQ.js
Last active May 2, 2025 14:43
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },