Skip to content

Instantly share code, notes, and snippets.

View eevee's full-sized avatar
🦊

Eevee eevee

🦊
View GitHub Profile
@eevee
eevee / gist:10335903
Last active December 6, 2018 10:38
fontconfig for comic neue
<alias>
<family>cursive</family>
<prefer>
<family>Comic Neue</family>
</prefer>
</alias>
<!-- comic neue is missing a few glyphs and fontconfig thinkgs it's -->
<!-- unsuitable for english text, oops! fix this forcibly. -->
<!-- once the font is fixed, the above rule is good enough -->
<match>
@eevee
eevee / deferred_attr.py
Created March 20, 2014 18:28
sqlalchemy declarative deferred attributes
class DeferredAttribute(object):
"""Minor hackery used with `deferred_attr_factory`."""
# Hopefully, more or less, self-explanatory. The __call__ is triggered at
# class creation time by declared_attr, which passes in the class itself,
# and then we do the "post" setup by listening for mapper_configured.
def __init__(self, generator):
self.generator = generator
self.done = False
def __call__(self, mapped_class):
@eevee
eevee / system--functions.php
Created December 12, 2013 01:21
selected FA code quotes
function dispatch_submission_notifications($from_uid, $submission_id, $skip_notification_if_user_banned=FALSE)
{
global $sql;
// Fetch the information for the submission.
// Do not rely on session information.
//
$query = 'SELECT adultsubmission '.
'FROM submissions '.
'WHERE rowid='.$sql->qstr($submission_id);
=================================================== test session starts ===================================================
platform linux2 -- Python 2.7.5 -- pytest-2.3.4
plugins: cov
collected 1 items
whatever.py F
======================================================== FAILURES =========================================================
________________________________________________________ test_foo _________________________________________________________
@eevee
eevee / tcup-notes.md
Created November 14, 2013 00:44
tcup notes
  • a git remote can have its default fetches customized, which can quietly lead to really weird behavior if you don't realize that happened (or if you have an empty fetch configured, say...)
  • git fetch and git remote update look very similar
@eevee
eevee / QUESTIONS
Created October 15, 2013 04:12
Figuring out a new document-like Pokédex schema from scratch.
- how does this format interact with side games?
- where do names and flavor text go: inline in this file, or in separate files? should there be a separate file per language?
- once and for all, WHAT ABOUT FORMS?

I took all the commented-out unmapped glyphs from the list above and pored over them. A couple were overlooked:

'f111' => '25cf',  # ● BLACK CIRCLE (icon-circle)
'f10c' => '25cb',  # ○ WHITE CIRCLE (icon-circle-blank)

# NOTE: REQUIRES CHANGING icon-refresh TO 🗘 U+1F5D8 CLOCKWISE RIGHT AND LEFT SEMICIRCLE ARROWS
'f079' => '1f501',  # 🔁 CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS (icon-retweet)

Many of them can be encoded, with a caveat: they aren't actually in a release of Unicode yet. But they're in the pipeline as imports from Wingdings, approved, and pending publication. There's a list here, and the current Symbola encodes all of them (or at least the ones I use below).

class DamageClass(Enum):
__tablename__ = 'move_damage_classes'
identifier = Identifier()
name = LocalFanText()
description = LocalFanText()
class Generation(Enum):
__tablename__ = 'generations'
@eevee
eevee / spabs.md
Last active June 22, 2025 22:20
tabs to spaces
# A file containing descriptions of types' immunities to things that are not other types.
# XXX: it does occur to me that this could be stored programmatically, so perhaps this is not a great example
# note that this also raises the question (hopefully to be answered RSN) of just where the index of "mechanic" items lives and how it works
fire:
en: Cannot be [burned]{mechanic:burn}.
ja: [燃やせられない]{mechanic:burn}。
ghost:
en: Immune to [trapping]{mechanic:trap}.
ja: [引っ掛けられない]{mechanic:trap}.