Skip to content

Instantly share code, notes, and snippets.

View datkat21's full-sized avatar
πŸ‘»

Kat21 datkat21

πŸ‘»
View GitHub Profile
@coreh
coreh / README.md
Last active August 27, 2026 04:45
Mac OS X Server 1.0 and current macOS AppKit titlebar-button binary analysis

Mac OS X Server 1.0 titlebar-button investigation

TL;DR

Confirmed: both Mac OS X Server 1.0's PowerPC AppKit and current ARM64e AppKit create and add the titlebar controls in the same semantic order: close, zoom, then miniaturize. Because later-added sibling views are in front, the miniaturize button is above both the close and zoom buttons when they overlap. The positioning code is also in AppKit in both releases: Server 1.0 uses NSTitledFrame origin methods plus _tileTitlebar; current macOS uses

@ariankordi
ariankordi / InflateTest.fu
Last active July 30, 2026 05:37
Vibe-coded Fusion port of inflatecpp (MIT, https://github.com/artexety/inflatecpp). It's effectively a ~1200-line zlib/INFLATE decompressor that works in many languages. I believe this was ported by Claude Opus 4.7.
// InflateTest.fu β€” DEFLATE/ZLIB/GZIP decompressor unit tests
//
// Test vectors generated by tools/gen_test_vectors.py.
// Run: fut -l c -o inflate_test.c inflate.fu InflateTest.fu
// cc inflate_test.c test_main.c -fsanitize=undefined -o inflate_test && ./inflate_test
public static class InflateTest
{
// Raw DEFLATE stored block, input = b"Hi"
const byte[7] Test1Input = {
// ==UserScript==
// @name Tap Strip
// @version 1.0
// @match *://apple.com/*
// @match *://*.apple.com/*
// @run-at document-end
// @grant none
// ==/UserScript==
(function () {
@Endermanch
Endermanch / swag.py
Created August 20, 2025 15:28
Swag and unswag your IP address
def swag(ip: str) -> int:
parts = ip.strip().split('.')
if len(parts) != 4:
raise ValueError("Invalid IPv4 address: must have 4 octets")
total = 0
for i, p in enumerate(parts):
@ariankordi
ariankordi / ffl-res-parse-toy.html
Created June 28, 2025 20:16
Sample to parse FFL (Mii) resource files in JS using struct-fu. Parses entire header, including shape and texture headers. Originally made on Feb. 12.
<body>
<h1>upload an FFL resource, then open your console</h1>
<p>
if you need it, get it from archive.org: <a target="_blank" href="https://web.archive.org/web/20180502054513/http://download-cdn.miitomo.com/native/20180125111639/android/v2/asset_model_character_mii_AFLResHigh_2_3_dat.zip">https://web.archive.org/web/20180502054513/http://download-cdn.miitomo.com/native/20180125111639/android/v2/asset_model_character_mii_AFLResHigh_2_3_dat.zip</a>
<div style="font-size: 11px;">
before you try, if you paste that below it won't work since archive.org has no CORS policy :( this proxy from kaeru would work if it were https: <a target="_blank" href="http://ia-proxy.fs3d.net:8989/20180502054513id_/http://download-cdn.miitomo.com/native/20180125111639/android/v2/asset_model_character_mii_AFLResHigh_2_3_dat.zip">http://ia-proxy.fs3d.net:8989/20180502054513id_/http://download-cdn.miitomo.com/native/20180125111639/android/v2/asset_model_character_mii_AFLResHigh_2_3_dat.zip</a>
</div>
</p>
<!-- Inline HTML
#version 300 es
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
out vec4 fragColor;
uniform vec2 resolution;
uniform vec3 orientation;
@ariankordi
ariankordi / 2025-12-28 UPDATE.txt
Last active December 28, 2025 07:05
Scripts to assist in deobfuscating Miitomo/DeNA XOR + LZ4 encryption, with a mitmproxy script, Go reverse proxy, and Python decoding script. (Note: AI slop)
See this other Gist where I reimplemented the logic in Fusion which transpiles to many languages, no dependencies.
https://gist.github.com/ariankordi/b9b21343bef4f0908607f4d6c9b047c0
The only thing missing is a new mitmproxy script using it, because as of writing Kaerutomo is down so I can't exactly test it.
@ThioJoe
ThioJoe / Get_All_Shell_Folder_Shortcuts.ps1
Last active April 12, 2025 09:48
Fetches all shell folders from Windows Registry and creates a shortcut to each, while attempting to determine the proper name and icon. Also outputs CSV file with results.
# NOTE - THIS SCRIPT IS NOW OBSOLETE - SEE MY OTHER REPO FOR A MUCH MORE COMPREHENSIVE TOOL: https://github.com/ThioJoe/Windows-Super-God-Mode
# Get All Shell Folder Shortcuts Script (Updated 8/10/2024)
# Original source: https://gist.github.com/ThioJoe/16eac0ea7d586c4edba41b454b58b225
# This PowerShell script is designed to find and create shortcuts for all special shell folders in Windows.
# These folders can be identified through their unique Class Identifiers (CLSIDs) or by their names.
# The script also generates CSV files listing these folders and associated tasks/links.
# How to Use:
# 1. Open PowerShell and navigate to the path containing this script using the 'cd' command.
@ThioJoe
ThioJoe / DisableUSBPowerManagement.ps1
Last active June 26, 2026 19:00
PowerShell script to disable Windows power management on all currently connected serial ports, including most (if not all) USB devices and adapters.
# PowerShell script to disable Windows power management on all currently connected serial ports, including USB adapters
# In simpler terms, it prevents Windows from turning off connected serial devices to save power.
# Equivalent to right-clicking on a serial port device in Device Manager > Properties > "Power Management" Tab > Unchecking "Allow the computer to turn off this device to save power."
$hubs = Get-CimInstance -ClassName Win32_SerialPort | Select-Object Name, DeviceID, Description
$powerMgmt = Get-CimInstance -ClassName MSPower_DeviceEnable -Namespace root\wmi
foreach ($p in $powerMgmt) {
$IN = $p.InstanceName.ToUpper()
foreach ($h in $hubs) {
@neverUsedGithub
neverUsedGithub / graphql-parser.d.ts
Created July 25, 2023 06:38
A type-level graphql lexer & parser & ts converter.
// Utility
type GetFirstCharacter<Text extends string> = Text extends `${infer First}${infer Rest}` ? First : never;
type StringStartsWith<Source extends string, Char extends string> = Source extends `${infer First}${infer Rest}`
? First extends Char
? true
: false
: false;
type SliceStringFirst<Source extends string> = Source extends `${infer First}${infer Rest}`
? Rest
: never;