Skip to content

Instantly share code, notes, and snippets.

View MabezDev's full-sized avatar
🦀

Scott Mabin MabezDev

🦀
View GitHub Profile
@a-gavin
a-gavin / NOTES.md
Last active March 18, 2023 23:15
ESP32-C3 and ESP32-C3 Notes

Overview

Initial dev environment setup for ESP32-C3 and ESP32-C6 programming, tailored towards Rust development. Some of this will also apply to the ESP32-C2 as well as the ESP32-H2 and ESP32-P4 when they are released.

  1. General Setup
  2. Setup USB JTAG
  3. Setup GPIO JTAG

General Setup

  • Install ESP tooling:
@darkxst
darkxst / rules.txt
Last active April 17, 2024 19:29 — forked from denniskupec/rules.txt
KiCad DRC rules for JLCPCB, 2 & 4-layer PCB
(version 1)
#Kicad 7
# 2-layer, 1oz copper
(rule "Minimum Trace Width (outer layer)"
(constraint track_width (min 5mil))
(layer outer)
(condition "A.Type == 'track'"))
(rule "Minimum Trace Spacing (outer layer)"
@wadimw
wadimw / adaptMonitorBrightness-M27Q.py
Last active February 23, 2024 15:45
Python script for MacOS which changes brightness of Gigabyte M27Q KVM Monitor to match current brightness of builtin MacBook Pro display; this is instead of Lunar app, because DDC/CI commands do not work for me over USB-C DisplayPort
#!/usr/local/bin/python3
# For Gigabyte M27Q KVM connected over USB-C
#
# Reads brightness value of builtin display from system, adapts it (Lunar-style) and sends over USB command to external display
#
# You need PyUSB and PyObjC
#
# Not much testing was done so far, only on MBP A1990 15" 2019 i7 555X
#
@smoser
smoser / README.md
Last active May 2, 2024 09:23
qemu to linux mapping of smbios / dmi information

Mappings for DMI/SMBIOS to Linux and dmidecode

Information can be put into dmi tables via some qemu-system hosts (x86_64 and aarch64). That information is exposed in Linux under /sys/class/dmi/id and can be read with dmidecode. The names are very annoyingly inconsistent. The point of this doc is to map them.

Mappings

Example qemu cmdline:

qemu-system-x86_64 -smbios type=<type>,field=value[,...]

qemu-system-x86_64 -smbios type=0,vendor=superco,version=1.2.3
@colematt
colematt / .Adding-Sections-to-Elf-Binaries.md
Last active March 1, 2024 20:04
[Add a section to an ELF binary] #llvm

Adding Sections to ELF Binaries

Suppose you need to add a section to an ELF binary to contain information gathered at compile time, but to be used at link time or run time. Here's how to add a section named .okdata and either populate it with data either after or before emitting the ELF binary.

Adding a Section After Emitting

In this case, you'll add file’s contents to an already existing binary. objcopy copies and translates object files, such that adding a new section is a matter of writing that new section’s contents into the ELF file.

(Optional) Create a simple program’s object file.