Skip to content

Instantly share code, notes, and snippets.

View jaames's full-sized avatar
🐳
~

James Daniel jaames

🐳
~
View GitHub Profile
@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 / flipnoteThumbnailServer.js
Last active September 6, 2024 19:14
Node mini-server that extracts thumbnail images from Flipnote Studio PPM or KWZ animation files
// requires promise-fs, gm and flipnote.js and imagemagick
// npm i promise-fs gm flipnote.js
// https://imagemagick.org/index.php
const http = require('http');
const path = require('path');
const url = require('url');
const fs = require('promise-fs');
const flipnote = require('flipnote.js/dist/node');
const gm = require('gm').subClass({imageMagick: true});
@jaames
jaames / ffmpeg.js_makefile
Last active September 8, 2020 08:25
custom ffmpeg.js makefile
# Compile FFmpeg and all its dependencies to JavaScript.
# You need emsdk environment installed and activated, see:
# <https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html>.
# Modified by Jaames:
# - disable WASM output in the latest version of emscripten (1.38.31)
# - add the pad videofilter
# - add wav and pcm_s16le decoder
PRE_JS = build/pre.js
@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)

Requirements

You will need a 3DS running Luma CFW, as well as a computer that is capable of creating an access point or running a proxy.

SSL Module Patch

It is necessary to disable Root CA Verification in order to capture all 3DS traffic. We recommend doing this with SciresM's 3DS-SSL-Patch.

For ease of use, you can download this premade code.ips patch and place it at /luma/titles/0004013000002F02/code.ips on your 3DS' SD card. Make sure that you've enabled Luma's game patching feature by holding down the select button while powering on your 3DS.

@jaames
jaames / ptcl.py
Created April 2, 2019 21:23
unfinished nintendo particle format (.ptcl) parser
# .ptcl parser for miitomo
# heavily unfinished, i couldn't work out how to find subtexture sizes
import struct
import numpy as np
from PIL import Image
class PTCLSection:
def __init__(self, magic=b'', offset=0, size=0, data_offset=0):
self.magic = magic
@jaames
jaames / kwz_adpcm_decoder.py
Last active May 28, 2019 20:12
kwz adpcm decoder
import numpy as np
import wave
import audioop
from sys import argv
step_table = np.array([
7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
50, 55, 60, 66, 73, 80, 88, 97, 107, 118,
130, 143, 157, 173, 190, 209, 230, 253, 279, 307,