Skip to content

Instantly share code, notes, and snippets.

View wgwoods's full-sized avatar
📦
thinking about packaging systems again

Will Woods wgwoods

📦
thinking about packaging systems again
View GitHub Profile
@wgwoods
wgwoods / Makefile
Created October 27, 2021 21:31
A crappy demo for building C to WebAssembly on macos or linux
CC=clang
CFLAGS=-Os
WASI_VERSION=12
WASI_VERSION_FULL=$(WASI_VERSION).0
ifeq ($(OS),Windows_NT)
HOST_OS=mingw
else
UNAME_S := $(shell uname -s)
@wgwoods
wgwoods / walker.py
Created July 14, 2021 22:35
A pathlib-based way to walk the filesys
#!/usr/bin/python3
from pathlib import Path
# Define an action that you can send into the generator
SKIPDIR = 1
# Path walkin' generator coroutine
def walk(topdir='.'):
for p in Path(topdir).iterdir():

Keybase proof

I hereby claim:

  • I am wgwoods on github.
  • I am willrad (https://keybase.io/willrad) on keybase.
  • I have a public key ASAHoKxQuiCHAHN_56XxWyT_6XqBP6mXWffAqVdr4N_EeAo

To claim this, I am signing this object:

@wgwoods
wgwoods / symlinks-are-weird.sh
Created November 21, 2019 20:37
A little demonstration of how symlinked directories can cause surprising behavior
@wgwoods
wgwoods / gk64-usb-notes.md
Last active July 2, 2019 19:32
Notes on the GK64 USB protocol

notes on reverse-engineering the iGK6X USB protocol

Basic info:

  • Packets are 0x40 (64) bytes long
    • Byte 0-1: Command & Subcommand
    • Byte 2-3: Offset (or Result for packets from keyboard)
    • Byte 4: padding? (always 00)
    • Byte 5: Size of payload (max 0x38)
  • Byte 6-7: checksum
@wgwoods
wgwoods / BBD8.bin.disasm
Last active May 15, 2021 04:11
nds32 disassembly of GK64 firmware update image BBD8
; vim: syn=asm:
;
; Hello and welcome to my hand-annotated disassembly of my GK64's firmware!!
;
; Please forgive the formatting and such, this is really just a bunch of my
; own notes that I wrote up while trying to RE this thing. I'm not an expert
; or an authority, I'm just trying to figure out how this thing works.
;
; If you have any questions, or better datasheets, or more info about the
; keyboard hardware itself (especially if you've got probes small enough
@wgwoods
wgwoods / 7A29.bin.disasm
Last active January 9, 2019 17:16
nds32 disassembly of GK64 firmware update image 7A29
/home/wwoods/Documents/Wireshark/iGK64/7A29.bin: file format binary
Disassembly of section .data:
00000000 <.data>:
0: 48 00 50 20 j 0xa040
4: 48 00 00 30 j 0x64
8: 48 00 00 2e j 0x64
@wgwoods
wgwoods / gk64.py
Created January 8, 2019 05:38
Some cruddy python code using pyusb to talk to a GK64 keyboard's control interface
#!/usr/bin/python3
# gk64.py - exploration stuff using pyusb to talk to a GK6x keyboard
#
# Copyright (c) 2019 Will Woods <w@wizard.zone>
#
# You shouldn't be using this, because it's horrible, but if you are,
# consider it licensed as GPLv2+. Also, I'm sorry.
#
# If you just wanna send random commands and see what happens, try:
# sudo python3 gk64.py [cmd] [subcmd]