Skip to content

Instantly share code, notes, and snippets.

View jaames's full-sized avatar
🐳
~

James jaames

🐳
~
  • UK, '97
  • 11:43 (UTC +01:00)
View GitHub Profile
@jaames
jaames / miitomo-asset.py
Last active June 19, 2018 10:03
crappy miitomo asset scraper (v2)
# crappy miitomo asset downloader
# usage: python3 miitomo-asset.py < url for manifest.json >
from pathlib import Path
from io import BytesIO
from sys import argv
import zipfile
import urllib.request
import json
@jaames
jaames / manifest.json
Last active December 18, 2018 20:18
Webarchive asset manifest for Miitomo
{
"remoteVersionUrl": "https://download-cdn.miitomo.com/native/20180125111639/manifests/v2_20180405_3_android/version.json",
"remoteManifestUrl": "https://download-cdn.miitomo.com/native/20180125111639/manifests/v2_20180405_3_android/manifest.json",
"packageUrl": "https://web.archive.org/web/0id_",
"version": "v2.0.1481",
"engineVersion": "2",
"assets": {
"20150101afesgaeukgwebp.zip": {
"md5": "",
"path": "http://download-cdn.miitomo.com/native/20180125111639/android/v2/20150101afesgaeukgwebp.zip",
@jaames
jaames / pegaswitch.html
Last active December 18, 2018 20:20
Original landing page for the PegaSwitch exploit by ReSwitched team (built in one evening :P)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PegaSwitch</title>
<meta name="description" content="PegaSwitch -- an exploit toolkit for the Nintendo Switch">
<meta name="twitter:card" content="summary">
<meta property="og:site_name" content="PegaSwitch">
@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,
@jaames
jaames / sudoplayer.html
Created May 5, 2017 17:31
sudomemo video player component, for Svelte (https://svelte.technology/guide)
<div class="player">
<div class="player__stage" ref:player on:click="togglePlay()">
<video
class="player__video"
src="{{src}}"
loop="{{meta.loop}}"
ref:video
on:play="_video_play()"
on:pause="_video_pause()"
on:timeupdate="_video_timeupdate()"
@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 -----
@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)"
],
@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 / 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):
@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)