Skip to content

Instantly share code, notes, and snippets.

View eevee's full-sized avatar
🦊

Eevee eevee

🦊
View GitHub Profile
@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 / 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 / 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 / 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 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 / gist:55426e5856f5825317b1
Last active January 28, 2021 22:51
adblock rules to hide mentions from people who don't follow you

Pop open "filter preferences" in adblock plus, and add the following rules to hide mentions from people who don't follow you (and who you don't follow).

For the interactions/notifications page:

twitter.com##.interaction-page [data-follows-you="false"][data-you-follow="false"]:not(.my-tweet)

For the mentions page:

twitter.com##.mentions-page [data-follows-you="false"][data-you-follow="false"]:not(.my-tweet)
@eevee
eevee / query.sql
Last active November 14, 2015 17:23
egg move diff between r/s and or/as
pokemon r/s only or/as only
------- -------- ----------
bulbasaur - sludge
bulbasaur - amnesia
bulbasaur - giga-drain
bulbasaur - endure
bulbasaur - nature-power
bulbasaur - ingrain
bulbasaur - leaf-storm (new)
bulbasaur - power-whip (new)
import datetime
import urwid
top = urwid.Filler(urwid.Text("this is\nfour lines\nof text\n."))
bottom_walker = urwid.SimpleListWalker([])
bottom = urwid.ListBox(bottom_walker)
main = urwid.Pile([
(4, top),
bottom,
@eevee
eevee / index.md
Last active December 1, 2015 22:18
Super Mario Maker levels

This document is deprecated — see http://eev.ee/everything/tags/mario-maker/ instead.

Test Flight

55A7-0000-0049-50DD · ★★☆☆☆ · tricky · 🍄🍄🍄

A deceptively cheery level. Slightly less fair than intended. I'm sorry.

def find_last(haystack, needle):
last_pos = -1
while True:
next_pos = haystack.find(needle, last_pos + 1)
if next_pos < 0:
return last_pos
last_pos = next_pos