Jan 23


Dec 16

“Sometimes I feel like I’m not… solid. I’m hollow. There’s… nothing behind my eyes. I’m a negative of a person. It’s as if I never— I never thought anything. I never wrote… anything, I never felt anything. All I want is blackness— blackness and silence.” — Sylvia Plath (via wordsthat-speak)

(via wordsthat-speak)

Dec 07

(Source: halloween-addiction, via arcaneimages)

Dec 02

From Shapefile to GeoJSON - Jim Vallandingham

Oct 30

Oct 02

Sep 25

“Does that mean that you’re coding both pc and other devices simultaneously? :)” — Yup - Windows, Linux, Mac, Phones, Pads and Vitas all running the game in here. If you don’t develop all at once, you can end up with a main version and ports. Not good. (via tonyrevdev)

Aug 29

Unlimited Novelty: Don't use bcrypt

Aug 17

Canadian Business Number Regex

Just a quick regular expression to match on Canadian Business numbers as specified by the CRA.


Aug 12


Aug 03

Animal Crossing friend code

Code: 2452-6467-2895
Name: Devon
Town: Funkyton

Come hang! Feel free to message me.

Aug 01

Jul 19

Jun 26

Markdown2 vs Markdown

While working on a style-overhaul. I noticed that portions of our views are generated with markdown2, which as it turns out, produces terrible markup.

Markdown like


Produces HTML like


When it ought to be


This is something that the original python markdown module does as it should. The 2 in markdown 2 is a little misleading; the original markdown module is still being actively maintained.

After the switch, it necessary for me to port over our markdown extensions. Namely, we want some blocks of markdown to open their links in a new tab because they will always refer to external resources. Fortunately markdown has a robust extensions API and the end result looked like so:

# -*- coding: utf-8 -*-

""" Text generation and transformation utilities """

import markdown as md
from markdown.extensions import Extension
from markdown.treeprocessors import Treeprocessor

class NewTabLinksTreeProcessor(Treeprocessor):
    def link_process(self, element):
        """ Traverse the element tree. """
        children = element.getchildren()
        for child in children:
            if child.tag == 'a':
                child.attrib['target'] = '_blank'

    def run(self, root):
        return root

class NewTabLinksExtension(Extension):
    """ Makes links open in a new tab. """
    def extendMarkdown(self, md, md_globals):
                              NewTabLinksTreeProcessor(self), "_end")

def markdown(text):
    """ Return markdown `text` rendered in HTML. """
    return md.markdown(text, [NewTabLinksExtension()])