Skip to content

Instantly share code, notes, and snippets.

@khlam
khlam / gist:146a72d3fc4d549f6f767cf826c32445
Created November 23, 2024 02:21
Config: Homebridge Camera FFmpeg for bambu lab x1c lan mode camera
{
"name": "Camera FFmpeg",
"cameras": [
{
"name": "bambu",
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsps://bblp:<LAN mode access code>@<X1C IP address>:322/streaming/live/1"
}
}
]
@shamil
shamil / mount_qcow2.md
Last active December 23, 2025 16:33
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@NYKevin
NYKevin / accounting.sql
Last active December 23, 2025 17:28
Basic double-entry bookkeeping system, for PostgreSQL.
CREATE TABLE accounts(
id serial PRIMARY KEY,
name VARCHAR(256) NOT NULL
);
CREATE TABLE entries(
id serial PRIMARY KEY,
description VARCHAR(1024) NOT NULL,
amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0),
-- Every entry is a credit to one account...
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a