Category Archive for 'How To'

Research Chain E-mails in 30 Seconds

Thursday, August 5th, 2010

A friend or family member has just forwarded you a wonderful piece of propaganda: It’s filled with inflammatory bare assertions, stirring anecdotes, and a dare to pass it on to everyone you know! And no sources.
1. Find a phrase in the message that’s a) unlikely to appear in anything else on the web, and b) [...]

Chords: The Flaming Lips “All We Have is Now”

Thursday, July 22nd, 2010

[Song on YouTube] All the tabs I could find were crap, so I wrote up a guitar arrangement. The inverted voicings in the choruses made it tough to figure out, but capoing the 2nd fret gets it pretty close.
Capo 2nd fret. / = 1/4 note

V1)
A 3-5-5-4-3-x (2 bars) As [...]

MVC: M != the Database

Wednesday, July 14th, 2010

Great article on the misunderstood scope of the “Model” in the Model-View-Controller architecture. The takehome: Models are commonly thought of as wrappers for database access/stored objects, but application state and business logic need to go in them, too. Otherwise you get bloated controller and/or views that clumsily try to take care of these concerns.
Earlier today [...]

Bass for Stereolab’s “Miss Modular”

Monday, July 5th, 2010

“Miss Modular” has an amazing bass line. It’s probably looped on record, but they play it live…and usually faster than the recording. I’m fairly sure it’s capoed at the 7th fret—that’s how I’ve typed it up here.
Stereolab “Miss Modular”
Capo bass @ 7th fret.
spaces/numbers/hyphens = 1/16th notes.
/ = 1/4 notes.

Intro)

/ [...]

Uh-Oh: Firefox’s Unique Session Cookie Behavior

Sunday, May 2nd, 2010

By now, Opera’s invention of restoring tabs automatically is available in most browsers, but unlike every other browser, Firefox’s restored tabs retain session cookies for the domains of the saved tabs. This is handy in some ways, but dangerous in others:
It’s fooling web developers by breaking a very old and widely-known convention. Since Netscape’s original [...]

Bash script: recursive diff between remote hosts

Friday, April 16th, 2010

This script will generate a recursive, unified diff between the same path on two remote servers. You set the CONNECT1 and CONNECT2 variables as necessary to point to your hosts/paths. Of course, the users you connect as must have read access to the files/directories you’re accessing.
#!/bin/bash

# USAGE: ./sshdiff DIRECTORY
#
# E.g. ./sshdiff static/css
# Generates a recursive [...]

Elgg, ElggChat, and Greener HTTP Polling

Saturday, April 3rd, 2010

At my new job, we maintain a site powered by Elgg, the PHP-based social networking platform. I’m enjoying getting to know the system and the development community, but my biggest criticisms are related to plugins.
On the basis of “keeping the core light”, almost all functionality is outsourced to plugins, and you’ll need lots of them. [...]

Guitar Tuning By Ear

Monday, February 22nd, 2010

(This is edited from an answer I posted to KeyMinor, a music Q&A site. They need more users!)
A lot of recordings end up slightly higher/lower than standardized pitch (I always called this “in the cracks” but don’t google it!), and this is the quickest way I’ve found to tune a guitar to them.  This method [...]

Bash: unbom (to remove UTF-8 BOMs)

Monday, February 15th, 2010

Tests for and removes UTF8 BOMs.
#!/bin/bash
for F in $1
do
if [[ -f $F && `head -c 3 $F` == $'\xef\xbb\xbf' ]]; then
# file exists and has UTF-8 BOM
mv $F $F.bak
tail -c +4 $F.bak > $F
[...]

SQL Server 2008, Domain Auth, PHP5, Ubuntu Server

Thursday, January 28th, 2010

May this save you pain.