Skip to content

Instantly share code, notes, and snippets.

@deanhunt
deanhunt / gist:861263
Created March 8, 2011 22:38
on thinking about hell, brecht
On thinking about Hell
On thinking about Hell, I gather
My brother Shelley found it was a place
Much like the city of London. I
Who live in Los Angeles and not in London
Find, on thinking about Hell, that it must be
Still more like Los Angeles.
In Hell too
@deanhunt
deanhunt / ValidationErrorChrome.js
Last active December 16, 2015 01:49
XML Validation Error in Chrome
new DOMParser().parseFromString('<type>Inkblot</type', 'text/xml');
// <type>
// <parsererror style="display: block; white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black">​
// <h3>This page contains the following errors:</h3>
// <div style="font-family: monospace; font-size: 12px">error on line 1 at column 24: expected '>'</div>
// <h3>Below is a rendering of the page up to the first error.</h3>
// </parsererror>
// </type>
@deanhunt
deanhunt / ValidationErrorFirefox.js
Created April 10, 2013 19:08
XML Validation Error in Firefox
new DOMParser().parseFromString('<type>Inkblot</type', 'text/xml');
// <parseerror>XML Parsing Error: unclosed token\nLocation: about:home\nLine Number 1, Column 14:<type>Inkblot</type\n-------------^<parseerror>
@deanhunt
deanhunt / DOMParserExample.js
Created April 10, 2013 19:11
Example DOMParser output
new DOMParser().parseFromString('<type>Inkblot</type>', 'text/xml');
// <type>Inkblot</type>
INTERVIEWER
As someone whose poems suggest a certain fascination with machines, why haven't you migrated from typewriter to computer?
LES MURRAY
The computer isn't a machine, it's a traffic with spirits. I'm no good with keyboards and I'm private enough not to want everything I write or miswrite being open to surveillance forever in the akashic record of cyberspace. _Writing on the computer is a bit like sculpture: You sculpt the poem on the screen. Or it's a kind of patchwork; then all the patches disappear and you've got something where all the elaboration and work that has gone into it has vanished._ The poem looks as if it's been published, but old mistakes still come up ghostlike from behind the process.
http://www.theparisreview.org/interviews/5508/the-art-of-poetry-no-89-les-murray
@deanhunt
deanhunt / fowler.md
Last active May 18, 2023 18:56
Notes from Martin Fowler's "Refactoring"

Refactoring, Fowler

http://martinfowler.com/books/refactoring.html

Five or six years ago I was working on an essay about refactoring CSS. I didn't do that, but I did find these notes while working on something new. Hope they're useful! —Dean

p7 "When you find you have to add a feature to a program, and the program's code is not structured in a convenient way to add the feature, first refactor the program to make it easy to add the feature, then add the feature."

p7