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)
(Source: halloween-addiction, via arcaneimages)
From Shapefile to GeoJSON - Jim Vallandingham
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)
Unlimited Novelty: Don't use bcrypt
Just a quick regular expression to match on Canadian Business numbers as specified by the CRA.
Come hang! Feel free to message me.
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.
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' self.link_process(child) def run(self, root): self.link_process(root) return root class NewTabLinksExtension(Extension): """ Makes links open in a new tab. """ def extendMarkdown(self, md, md_globals): md.registerExtension(self) md.treeprocessors.add("newtablinks", NewTabLinksTreeProcessor(self), "_end") def markdown(text): """ Return markdown `text` rendered in HTML. """ return md.markdown(text, [NewTabLinksExtension()])