Skip to content

Instantly share code, notes, and snippets.

View mon's full-sized avatar

Will mon

View GitHub Profile
@mon
mon / jubeat1_log_enabler.py
Created June 20, 2023 13:58
IDAPython script to re-enable stubbed logs from jubeat (2008)
# Jubeat 1 has logging functions implemented using a #define such as:
# #define LOG_MISC(fmt, ...) while(LOGS_ENABLED) { log_body_misc(fmt, __VA_ARGS__); }
#
# However, because barely any optimisations were applied to the code, these are
# still present in the final binary, even when LOGS_ENABLED was 0. This script
# re-enables these logs.
#
# An example assembly snippet:
# start:
# xor eax, eax
@mon
mon / SDVX.ino
Created July 22, 2016 10:12
Super simple SDVX controller with fading lights
// You will need the SoftPWM and Encoder libraries, available from
// the teensy website. Google!
// Edit the fade time to your liking.
// Edit the pins and keys if you use different ones.
// ENCODER PINS MUST BE 0, 1, 2, 3 FOR BEST PERFORMANCE
// Everything else can go wherever.
#include <Keyboard.h>
#include <Mouse.h>
@mon
mon / floodfill.py
Created January 12, 2020 11:42
Very slow and very messy floodfill animation
import os
from statistics import mean
from PIL import Image
from tqdm import tqdm
# render frames with
# ffmpeg -framerate 60 -pattern_type glob -i '*.png' -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -pix_fmt yuv420p out.mp4
source_img = 'tfoust10.jpg'