Skip to content

Instantly share code, notes, and snippets.

View jaames's full-sized avatar
🐳
~

James jaames

🐳
~
  • UK, '97
  • 20:13 (UTC +01:00)
View GitHub Profile
@jaames
jaames / lbp-endpoints.md
Last active June 10, 2020 20:26
Useful Little Big Planet web endpoints

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 March 18, 2020 21:52
Animal Crossing New Horizons font decryptor for .bfttf or .bfotf files
# 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 April 13, 2022 09:20
Fancy CSS link underlines with inline SVGs (plus embedded animations!)
@jaames
jaames / kwztile.py
Last active April 18, 2020 09:03
kwz optimisation idea
# 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):
<?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 October 7, 2019 17:19
list of generic screensizes pulled from https://www.screensizemap.com
[
{
"size": {
"width": 2560,
"height": 1440
},
"group": "extra-extra-large",
"devices": [
"Apple iMac 27-inch (5K)"
],
<?php
// Project Kaeru KWPCF builder
// Written by James Daniel
// github.com/jaames / rakujira.jp
// ---- USAGE ----
// create a new kaeruPrecache instance:
//
@jaames
jaames / ppm.php
Last active January 14, 2021 22:17
new php PPM metadata parser
<?php
namespace App\Formats;
class PPMParser {
protected $data = null;
protected $offset = 0;
public $header = [];
public $meta = null;
public $animationHeader = null;
@jaames
jaames / kwz.php
Created September 26, 2019 19:06
php kwz metadata parser
<?php
// Project Kaeru KWZ / KWC parser
// ver 1.0
//
// Written by James Daniel
// github.com/jaames | rakujira.jp
// ----- USAGE -----