Skip to content

Instantly share code, notes, and snippets.

View eevee's full-sized avatar
🦊

Eevee eevee

🦊
View GitHub Profile
@eevee
eevee / pokemon.yaml
Last active April 14, 2020 18:27
actual for realsies yaml dump of pokémon red
%TAG !dex! tag:veekun.com,2005:pokedex/
--- !!omap
- bulbasaur: !dex!pokemon
name: BULBASAUR
types:
- grass
- poison
base-stats:
attack: 49
defense: 49
@eevee
eevee / argh.md
Last active March 9, 2016 17:00
Please solve my mysterious web problem

Symptoms

  • Certain pages will stop loading at a certain point and sit idle for anywhere from 3s to a full minute. The time is often suspiciously close to a multiple of 10s.

  • This is largely a problem because a bunch of JS that actually makes the damn page work doesn't fire until after the delay.

  • While idle, Firefox is responsive, but the throbber (swirly loading animation on the tab) is active, and the "status bar" says "Waiting for" the name of some CDN. Sometimes it says "Read" or "Reading data from". I suspect this might be a red herring, and Firefox is just showing the last relevant network message for some reason.

  • It looks like something is delaying script execution, which delays DOMContentLoaded, which delays a bunch of stuff from running. In the case of GitHub, some profiling revealed that the only script on the page doesn't actually run (sometimes!) until 20 seconds have passed. The script downloads almost instantly, but it doesn't actually execute.

@eevee
eevee / pokemon.yaml
Last active March 9, 2016 20:25
actual for realsies yaml dump of pokémon red, in french
%TAG !dex! tag:veekun.com,2005:pokedex/
--- !!omap
- bulbasaur: !dex!pokemon
name: BULBIZARRE
types:
- grass
- poison
base-stats:
attack: 49
defense: 49
@eevee
eevee / pokemon.yaml
Created March 8, 2016 08:05
actual for realsies yaml dump of pokémon red, in spanish
%TAG !dex! tag:veekun.com,2005:pokedex/
--- !!omap
- bulbasaur: !dex!pokemon
name: BULBASAUR
types:
- grass
- poison
base-stats:
attack: 49
defense: 49
@eevee
eevee / hex.cpp
Last active June 12, 2019 07:33
Hex: a two-player video game I wrote when I was sixteen (requires Allegro 4.2)
// Hex!
// By Eevee
// Started Feb 10, 2003
/* THINGS TO DO:
* - make it check for a win DONE!
* - add an option for changing board size NO
* - player stats/color DONE!
* - make menu less crappy DONE!
* - save options somewhere NO
@eevee
eevee / change.bas
Last active April 5, 2016 21:55
I was a dick
DECLARE SUB Change (C AS INTEGER, D AS INTEGER, R AS INTEGER)
DECLARE FUNCTION Round$ (N!, D AS INTEGER)
DIM SHARED A AS SINGLE, A2 AS INTEGER
SCREEN 12
DO
CLS
COLOR 15
PRINT "How much did you spend ($0 - 100)? ";
COLOR 14: INPUT "", A
DO WHILE A < 0 OR A > 100
@eevee
eevee / 1-computer-talk.bas
Created April 6, 2016 16:25
VTech PreComputer 1000 example programs
10 B$="PRE-COMPUTER"
20 PRINT "I AM "; B$
30 INPUT "WHAT IS YOUR NAME"; N$
40 PRINT "HELLO "; N$
50 INPUT "HOW OLD ARE YOU"; A
60 PRINT "SO "; N$; " YOU ARE"
70 PRINTA; "YEARS OLD"
80 PRINT "I HOPE" : PRINT "WE HAVE FUN!!"
90 END
Lua 5.3.2 Copyright (C) 1994-2015 Lua.org, PUC-Rio
> mt = {__index = function(t, k) print("[" .. k .. "]") end}
> x = 3
> debug.setmetatable(x, mt)
3
> x.hello
[hello]
nil
@eevee
eevee / perlin.py
Last active February 25, 2025 13:47
Perlin noise in Python
"""Perlin noise implementation."""
# Licensed under ISC
from itertools import product
import math
import random
def smoothstep(t):
"""Smooth curve with a zero derivative at 0 and 1, making it useful for
interpolating.
@eevee
eevee / extract-music.py
Created May 31, 2016 06:49
Python script to reconstitute music from a PICO-8 cartridge
# script to extract music from a pico-8
# requires exporting sounds from the pico-8 first!
# run as: python extract-music.py mygame.p8 sound%d.wav music%d.wav
# by eevee, do what you like with this code
from __future__ import print_function
import argparse
import struct
import wave