Skip to content

Instantly share code, notes, and snippets.

Avatar
🐳
~

James jaames

🐳
~
View GitHub Profile
@jaames
jaames / saz.py
Created Jun 25, 2020
Redownload content from a given .saz Fiddler dump
View saz.py
import zipfile
import re
import urllib.request
from pathlib import Path
from sys import argv
if len(argv) < 3:
print('usage:')
print('python3 sazrip.py < input.saz > < output dir >')
exit()
@jaames
jaames / dnslog.js
Last active Jun 25, 2020
Crappy NodeJS DNS logger for debugging (plus response overrides!)
View dnslog.js
const dnsServer = require('dnsd');
const { Resolver } = require('dns').promises;
const overrides = [
{ name: 'game-prod.indreams.me', type: 'A', addresses: [`52.213.80.7`, `54.194.121.14`, `34.251.37.65`] }
];
const resolver = new Resolver();
resolver.setServers(['1.1.1.1']);
@jaames
jaames / lbp-endpoints.md
Last active Jun 10, 2020
Useful Little Big Planet web endpoints
View lbp-endpoints.md

Level info

Returns the level title, icon, number of plays/hearts/lists and game (...kinda) for a given level ID

GET https://lbp.me/widgets/link_magician/level/{ Level ID }

Param Values
theme default (required)
@jaames
jaames / bfttf.py
Last active Mar 18, 2020
Animal Crossing New Horizons font decryptor for .bfttf or .bfotf files
View bfttf.py
# Animal Crossing New Horizons font decryptor for .bfttf or .bfotf files
# Usage: python3 bfttf.py input.bfttf output.ttf
from sys import argv
# might be other keys, who knows
key = [0x49, 0x62, 0x18, 0x06]
def xor(data, key):
offset = 0
@jaames
jaames / fancy-css-links.md
Last active Jan 18, 2021
Fancy CSS link underlines with inline SVGs (plus embedded animations!)
View fancy-css-links.md
@jaames
jaames / kwztile.py
Last active Apr 18, 2020
kwz optimisation idea
View kwztile.py
# original code:
for tile_offset_y in range(0, 240, 128):
for tile_offset_x in range(0, 320, 128):
# each large tile is made of 8 * 8 small tiles
for sub_tile_offset_y in range(0, 128, 8):
y = tile_offset_y + sub_tile_offset_y
# if the tile falls off the bottom of the frame, jump to the next large tile
if y >= 240: break
for sub_tile_offset_x in range(0, 128, 8):
View KwzParser.php
<?php
class KwzParser {
protected $data = null;
protected $offset = 0;
protected $size = 0;
public $sections = [];
public $meta = null;
public $frameMeta = null;
@jaames
jaames / screensizes.json
Last active Oct 7, 2019
list of generic screensizes pulled from https://www.screensizemap.com
View screensizes.json
[
{
"size": {
"width": 2560,
"height": 1440
},
"group": "extra-extra-large",
"devices": [
"Apple iMac 27-inch (5K)"
],
View kwpcf.php
<?php
// Project Kaeru KWPCF builder
// Written by James Daniel
// github.com/jaames / rakujira.jp
// ---- USAGE ----
// create a new kaeruPrecache instance:
//