Skip to content

Instantly share code, notes, and snippets.

View maatthc's full-sized avatar
🍄

MaaT maatthc

🍄
  • MaaT Tech
  • Melbourne
  • 23:04 (UTC -12:00)
View GitHub Profile
@maatthc
maatthc / karabiner_Mac_Intel.json
Last active February 3, 2022 00:49
Keyboard Ajazz K680T configuration via Karabiner-Elements on MacOS
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@maatthc
maatthc / eachine-ex4-bond-ip.py
Last active June 16, 2025 23:14
To connect to Eachine EX4 using Qgroundcontrol/MAVlink running on a computer, first run this script.
import socket
from time import sleep
DRONE_IP = '172.50.10.1'
DRONE_BOND_PORT = 4646
RESET_CMD=b'{"CMD":0,"PARAM":-1}\n'
BOND_CMD=b'{"CMD":89,"PARAM":1}\n'
EXPECTED_SERVER_RESPONSE = '{ "CMD": 89, "PARAM": -1, "RESULT": 1 }'
version: "3.7"
x-vars:
- &TZ
TZ=Australia/Melbourne
- &DnsRestart
restart: always
extra_hosts:
- "tv.home:192.168.0.99"
@maatthc
maatthc / add_usb_drive_to_retroarch_media_folder_install.sh
Last active August 14, 2026 17:36
LG WebOStv - Play games on RetroArch from USB drive
#!/bin/bash
# === For rooted LG TVs with WebOsBrew installed only ===
#
# On LG WebOStv, RetroArch only have access to a few jailed folders so to run games on a usb drive,
# we need to 'merge' the USB mounting point with one of those jailed folders using OverlayFS.
# The scripts on folder '/var/lib/webosbrew/init.d/' will run after every tv boot.
# Remove the $STARTUP_FOLDER/$SCRIPT_TO_RUN_AFTER_BOOT and reboot to revert the change.
#
# Tested on 7.3.0-03.30.72
#
@maatthc
maatthc / build.zig
Created March 19, 2026 11:46
Compiling C with Zig 0.15.2 build system - with support to compile_commands.json for ClangD LSP
// A simple zig module to generate compile_commands.json, used by clangd LSP server
// https://github.com/the-argus/zig-compile-commands
const zcc = @import("compile_commands");
const std = @import("std");
pub fn build(b: *std.Build) !void {
const optimize = b.standardOptimizeOption(.{});
const target = b.standardTargetOptions(.{});
var clangd = try std.ArrayList(*std.Build.Step.Compile).initCapacity(b.allocator, 5);