Skip to content

Instantly share code, notes, and snippets.

@TobidieTopfpflanze
TobidieTopfpflanze / decompile_dtb.sh
Last active December 24, 2025 13:49
Decompile DTB
# Decompile
dtc -I dtb -O dts -o devicetree.dts /boot/dtb/<your_devicetree_file_name>.dtb
# Compile
dtc -I dts -O dtb devicetree.dts -o <your_devicetree_file_name>.dtb
# Merge with DTBO
fdtoverlay -i modified-base.dtb -o modified-full.dtb /boot/tegra194-p3668-all-p3509-0000-user-custom.dtbo
# DTS from fs
@i0annis
i0annis / GT9110_overlay.dts
Created February 23, 2021 15:48
Device Tree overlay for GT9110 touch driver on Raspberry Pi
// Device tree overlay for Goodix GT9110 touch controller
// connected to Raspberry Pi via I2C on GPIO pins.
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709";
fragment@0 {
target = <&gpio>; // Overlay for GPIO pins, using standard 'gpio' node
@abobija
abobija / esp-idf-on-wsl2.md
Last active September 14, 2025 01:42
ESP-IDF on WSL2 - Build, Flash and Monitor

ESP-IDF on WSL2 - Build, Flash and Monitor ⚡

Demo

How to setup ESP-IDF on WSL2 Ubuntu 20.04 - Config, Build and Flash

Intro

WSL2 still does not support USB devices, but with a little effort we can make possible to flash and monitor ESP device from WSL2.

@ww9
ww9 / gist_markdown_examples.md
Last active December 30, 2025 10:57
Gist markdown examples

Gist markdown examples

A collection of Markdown code and tricks that were tested to work in Gist.

This and all public gists in https://gist.github.com/ww9 are Public Domain. Do whatever you want with it including , no need to credit me.

Todo

  • Reformat this whole document and assimilate these:
@btashton
btashton / Notes.md
Last active November 18, 2025 20:00
Resize Partitions on SD card Image

I had imaged a full 8GB SD card, but I only wanted to distribute a smaller image. These are a few notes:

Image the SD card

dd if=/dev/sdb of=./backup.img

Now I wanted to use gparted to resize the partition, you can run sudo gparted ./backup.img and it will show the partitions, but it will think that the partitions are located at /dev/./backup.img1 and /dev/./backup.img2 which is not correct. The trick here is to use the loopback interface.

losetup /dev/loop0 backup.img this will make the backup.img file show up as a block device. You can then run gparted on /dev/loop0 and once again see the partition table. There still is an issue though, it will look for the partitions to be located at /dev/loop0p1 and /dev/loop0p2, these block devices do not exist. It turns out that losetup has a flag that I have not noticed anywhere before -P this causes the kernel to read the partition table of the device and create the additional block device. This lets us avoid having to manually look at the partit