Skip to content

Instantly share code, notes, and snippets.

@vasi
vasi / mount_clonezilla.md
Last active November 29, 2025 07:56
Mounting Clonezilla images with FUSE

Mounting Clonezilla images with FUSE

I love to make backups with Clonezilla. But often, I'll back up my system, wipe my Linux partition and try another distro—only to realize that I need access to just one file from the old installation. For example, maybe I made an interesting change to my .zshrc or Samba configuration, which I want to re-use on the new system.

The obvious solutions aren't my favorites. It's easy to restore an image to a spare disk, but it takes a long time, and requires a spare disk I'm willing to wipe. I [could extract an entire image][extract_image], but that also takes lots of time and space. Wouldn't it be nice to just look inside my compressed Clonezilla image, just like I can do with a zip file or squashfs archive?

It turns out it's possible, with clever use of [user-space filesystems][fuse]!

@smx-smx
smx-smx / XZ Backdoor Analysis
Last active June 2, 2025 22:53
[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 November 20, 2025 05:46
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 },