Category Archive for 'How To'
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) [...]
Posted in How To, Politics | Comment »
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 [...]
Posted in How To, Music, Music Transcriptions | Comment »
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 [...]
Posted in Computer Science, How To, PHP | 2 Comments »
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)
/ [...]
Posted in How To, Music, Music Transcriptions | Comment »
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 [...]
Posted in How To, Web Design | 1 Comment »
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 [...]
Posted in How To, Linux | Comment »
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. [...]
Posted in Computer Science, How To, PHP, Web Design | Comment »
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 [...]
Posted in How To, Music | Comment »
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
[...]
Posted in How To, Linux | Comment »
Thursday, January 28th, 2010
Posted in How To, Linux, PHP, Web Design | Comment »