Skip to content

Instantly share code, notes, and snippets.

View jaames's full-sized avatar
🐳
~

James Daniel jaames

🐳
~
View GitHub Profile
<?php
// Project Kaeru KWPCF builder
// Written by James Daniel
// github.com/jaames / rakujira.jp
// ---- USAGE ----
// create a new kaeruPrecache instance:
//
@jaames
jaames / mii-qr.py
Created July 24, 2018 21:02
Decrypt Mii QR code data from 3DS / Wii U / Miitomo
# Decrypt Mii QR codes from 3DS / Wii U / Miitomo
# Usage: python3 <input file> <output file>
# QR docs: https://www.3dbrew.org/wiki/Mii_Maker
from Crypto.Cipher import AES
from sys import argv
key = bytes([0x59, 0xFC, 0x81, 0x7E, 0x64, 0x46, 0xEA, 0x61, 0x90, 0x34, 0x7B, 0x20, 0xE9, 0xBD, 0xCE, 0x52])
with open(argv[1], "rb") as infile, open(argv[2], "wb") as outfile:
@jaames
jaames / fonts.md
Last active November 4, 2025 09:57
Cool free/cheap font foundries
@jaames
jaames / playdate-curve.lua
Last active September 23, 2025 02:46
Simple bezier curve drawing functions for the Playdate Lua SDK
-- bezier curve drawing functions for playdate lua
-- these are based on de Casteljau's algorithm
-- this site has a nice interactive demo to compare both types of curve: https://pomax.github.io/bezierinfo/#flattening
-- draws a curve starting at x1,y1, ending at x3,y3, with x2,y2 being a control point that "pulls" the curve towards it
-- steps is the number of line segments to use, lower is better for performance, higher makes your curve look smoother
-- the playdate is kinda slow, so it's recommended to find a relatively low step number that looks passable enough!
function drawQuadraticBezier(x1, y1, x2, y2, x3, y3, steps)
steps = steps or 8
local d = 1 / steps
<?php
class KwzParser {
protected $data = null;
protected $offset = 0;
protected $size = 0;
public $sections = [];
public $meta = null;
public $frameMeta = null;
@jaames
jaames / miitomo_questions.md
Last active July 26, 2025 21:23
Full set of questions dumped from Miitomo
@jaames
jaames / fancy-css-links.md
Last active June 26, 2025 11:49
Fancy CSS link underlines with inline SVGs (plus embedded animations!)
@jaames
jaames / jaames-shiki-theme.json
Created June 2, 2025 18:53
Custom Shiki.js theme that uses CSS variables for highlighting - used for my personal site (https://jaames.co.uk)
{
"colors": {},
"displayName": "jaames.co.uk",
"name": "",
"semanticHighlighting": true,
"tokenColors": [
{
"settings": {
"background": "var(--syntax-bg)",
"foreground": "var(--syntax-text)"
@jaames
jaames / dailylogochallenge.txt
Created June 17, 2019 21:07
Logo challenge list from dailylogochallenge.com -- for people like me who dislike inbox clutter
1. Rocketship Logo (Aerolite, Axis, Comet, Quasar)
2. Hot Air Balloon (Lift, Crown (the very top part of the balloon), Whoosh)
3. Panda Logo (Panda Global, Bamboo, Endangered Panda Conservation)
4. Single Letter Logo
5. Driverless Car Logo (Autonome, Vrooom, Onward)
6. Coffee Shop (Dylan's Coffee, The Roasted Bean, Tazza)
7. Fashion Brand Wordmark (OAKAO, Deities, Adams & Abigail)
8. Ski Mountain Logo (Brass Peak, Mount Blanco, Traverse, Snowdrop)
9. Streaming Music Startup (Beat, Pitch, Bass)
10. Flame Logo (Sizzle, Liight, Flint & Flame)