Skip to content

Instantly share code, notes, and snippets.

View magical's full-sized avatar
🙀
🐛

Andrew Ekstedt magical

🙀
🐛
View GitHub Profile
@magical
magical / url_scraper.py
Last active July 12, 2021 19:05
Scrapes urls from your mastodon account and adds them to shiori
#!/usr/bin/env python3
# Copyright (C) 2021 Andrew Ekstedt (magical)
#
# Borrows a small amount of code from mastodon-backup,
# Copyright (C) 2017-2018 Alex Schroeder <[email protected]>
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
01 (1) = Floor Tile
02 (2) = Wall
03 (3) = Ice
04 (4) = Ice Corner
05 (5) = Ice Corner
06 (6) = Ice Corner
07 (7) = Ice Corner
08 (8) = Water
09 (9) = Fire
0a (10) = Force floor
01 (1) = Floor Tile
02 (2) = Wall
03 (3) = Ice
04 (4) = Ice Corner
05 (5) = Ice Corner
06 (6) = Ice Corner
07 (7) = Ice Corner
08 (8) = Water
09 (9) = Fire
0a (10) = Force floor
@magical
magical / makemasked44.go
Created May 30, 2021 22:52
convert TW small format to MSCC (44x44)
package main
import (
"bytes"
"flag"
"fmt"
"image"
"image/color"
"io"
"os"
# http://bjoern.spruck.net/lynx/blog/chips.xhtml
# UnpackgenerateCode_L1D08:
# LDX #$00
# STZ $44
# STZ $45
# LoopGenerateCode_L1D0E:
# JSR GenerateCodeFunk1_L1D3C
# STA $1280,X
# JSR GenerateCodeFunk1_L1D3C
@magical
magical / form_differences_2021.txt
Last active March 31, 2021 05:16
Form differences (Gen 8)
Venusaur: ability, exp, height, pokeathlon, stats, weight
Charizard: ability, exp, pokeathlon, stats, type, weight
Blastoise: ability, exp, pokeathlon, stats, weight
Beedrill: ability, exp, height, items, pokeathlon, stats, weight
Pidgeot: ability, exp, height, pokeathlon, stats, weight
Rattata: ability, items, pokeathlon, type, weight, moves (egg, machine, tutor)
Raticate: ability, height, items, pokeathlon, stats, type, weight, moves (machine, tutor)
Pichu: pokeathlon
Pikachu: exp, items, pokeathlon, stats, moves (egg, form-change, tutor)
Raichu: ability, height, items, pokeathlon, stats, type, weight, moves (level-up, machine, tutor)
pokemon │ version_group │ pokemon_id │ version_group_id │ level │ order
────────────────┼───────────────────┼────────────┼──────────────────┼───────┼──────────────
ivysaur │ gold-silver │ 2 │ 3 │ 15 │ {4,NULL}
venusaur │ gold-silver │ 3 │ 3 │ 15 │ {5,NULL}
muk │ gold-silver │ 89 │ 3 │ 45 │ {NULL,NULL}
ledian │ gold-silver │ 166 │ 3 │ 24 │ {3,4,NULL}
wooper │ gold-silver │ 194 │ 3 │ 51 │ {3,NULL}
quagsire │ gold-silver │ 195 │ 3 │ 59 │ {3,NULL}
qwilfish │ gold-silver │ 211 │ 3 │ 10 │ {3,NULL}
ivysaur │ crystal │ 2 │ 4 │ 15 │ {4,NULL}
@magical
magical / flakes.png
Last active December 13, 2020 07:15
snowflakes
flakes.png
@magical
magical / 0_cc2key.txt
Last active October 18, 2020 08:44
Notes on CC2's checksum scheme
Notes on CC2's checksum scheme
==============================
Background
----------
The "KEY " chunk in C2M files stores a 128-bit hash. This
was originally part of a scheme to prevent users from playing
levels not made with the official editor, but was ripped out
before the public release.[1]
// Usage: extractgarc garcfile outdir
// Extract and decompress all files in garcfile to outdir.
package main
import (
"fmt"
"io"
"log"
"os"
"path/filepath"