insomniphilia

lots to do at night.
last.fm profile
cooking blog
Jan 27 '12

View comments Tags: NYC

Jan 24 '12

View comments

Jan 23 '12

View comments

Jan 21 '12
It was a snowy morning.  (Taken with instagram)

It was a snowy morning. (Taken with instagram)

View comments

Jan 16 '12

Had a big cooking night…the first in a long time. Roasted squash plus cream/milk, pasta water, and ricotta became a squash sauce for 1½ lbs pasta. With this, we blanched and sautéed a cauliflower remnant, à la Bittman, and made an absolutely delicious kohlrabi salad that il introduced us to.

View comments

Jan 3 '12

View comments

Dec 26 '11

View comments

Dec 6 '11

Just seeing this video now: a cartoon of the rise of factory farming and mass animal feeding, soundtracked by Willie Nelson (doing a Coldplay cover). Sponsored by Chipotle….

View comments

Nov 29 '11

From PBS, a short (7 min.) video on generative art.

Off Book: Generative Art - Computers, Data and Humanity (by PBS Arts)

View comments

Oct 27 '11

Related to something I’ve been thinking about lately — how we’re surprisingly out of touch with what makes us happy, how advertisers have figured that out, and how we make a lot of choices that end up being bad for us and bad for the planet. (via Barry Schwartz on the paradox of choice)

View comments

Sep 29 '11

I had a dream in which I was re-reading “The Lovesong of J. Alfred Prufrock,” and the “In the room, the women come and go” couplet was suddenly much longer, and went into a lot of interesting stuff. I wish I remembered what it said. I’ve had a long history with Prufrock, including memorizing it, reading the sections Eliot excised following Ezra Pound’s advice, and working on a poem in the style of Prufrock (“The Homework of J. Albert Potter”), so it would’ve been interesting to see if those things influenced my dreamed version of the poem. But probably I just dreamed up some gibberish.

View comments

Sep 9 '11

View comments

Jul 17 '11

Marking duplicate files with ipython

I use (and love) Notational Velocity for storing and quickly retrieving notes on OS X. Recently, I accidentally enabled both SimpleNote and DropBox syncing on two different computers, which resulted in many duplicate notes. Some quick IPython hacking fixed the problem.

Notes are stored in files like Title.rtf, and duplicate notes ended up in files like Title.1.rtf. I first found and extracted all the base filenames, and counted how often each occurred:

files = !ls
R = re.compile(r'(.*?)(\.\d+)?.rtf')
m = map(R.match, files)
c = collections.Counter([mm.group(1) for mm in m
    if mm is not None])

Next, I created a list of all the extra files (I was lazy, and used glob for this, rather than using my original list of filenames), and used the command line to color-label the extra files in Finder (based on this hint):

extra_files = [glob.glob(fn + ".*.rtf")
    for fn, count in c.iteritems() if count > 1]
extra_files = reduce(list.__add__, extra_files)
for fn in extra_files:
    !osascript -e "tell application \"Finder\" to set label index of alias POSIX file \"$fn\" to 1"

Voilà! The duplicate files were all labeled orange. I went through them using QuickView, to make sure I wasn’t deleting anything important, and cleaned up my Notational Velocity directory.

2 notes View comments Tags: code

Jul 8 '11
Like the protected books, plays and movies that preceded them, video games communicate ideas — and even social messages — through many familiar literary devices (such as characters, dialogue, plot and music) and through features distinctive to the medium (such as the player’s interaction with the virtual world). That suffices to confer First Amendment protection.
— Justice Scalia (via Daring Fireball)

View comments

Jul 6 '11
It is more important that innocence be protected than it is that guilt be punished, for guilt and crimes are so frequent in this world that they cannot all be punished. But if innocence itself is brought to the bar and condemned, perhaps to die, then the citizen will say, “whether I do good or whether I do evil is immaterial, for innocence itself is no protection,” and if such an idea as that were to take hold in the mind of the citizen that would be the end of security whatsoever.
— John Adams (via Daring Fireball, Andy Ihnatko)

View comments