Skip to content

Instantly share code, notes, and snippets.

@smx-smx
smx-smx / XZ Backdoor Analysis
Last active October 12, 2024 07:23
[WIP] XZ Backdoor Analysis and symbol mapping
XZ Backdoor symbol deobfuscation. Updated as i make progress
@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 October 31, 2024 12:33
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 },