Older blog entries for rcaden (starting at number 76)

Customizing Apache Directory Listings with .htaccess

I was clearing off my desk today when I found an article I've been meaning to scan and send to somebody -- the story of how my friends almost elected a dalmatian and squirrel to the homecoming court of the University of North Texas in 1989. The alumni magazine wrote a feature on Hector the Eagle Dog and Agnes the Squirrel's campaign, which attracted national media and made a few of the human homecoming candidates very angry.

I can never tell when a file's too big to send in email without aggravating the recipient, so I upload files to my server and email the links instead. I decided to make this process easier by creating a clippings directory where uploaded files show up automatically.

The Apache web server can publish a listing of all files in a directory, as the official Apache site does in its images subdirectory. I wanted to make my clippings page look more like the rest of my weblog, so I found a tutorial on customizing directory listing pages.

First, I created an .htaccess file in the directory and turned directory indexing on with this command:

Options +Indexes

This command only works on servers that are configured to allow users to change options. For security reasons, I turn directory listings off by default, so they only appear when I specifically configure a directory to reveal its contents.

Next, I created header and footer web pages that contain the HTML markup to display above and below the directory listing. These files are identified by two more commands in .htaccess:

HeaderName header.html
ReadmeName footer.html

These web pages are located in the clippings directory. For the final step, I added a description of PDF documents and made sure that the header and footer files are not included in the listing:

AddDescription "PDF Document" .pdf
IndexIgnore header.html footer.html

There's a lot more that can be customized in an Apache directory listing, as the tutorial demonstrates, but for my project it seemed like overkill.

Update: Alternatively, I could've checked to see if the story was already online. Auugh.

Syndicated 2008-11-27 00:30:05 from Workbench

Sharing Bookmarks and Feed Lists with XML

I'm working on a programming project that requires an XML format to represent bookmarks and other collections of URIs, but before I reinvent the wheel I'd like to see if there's an existing format that meets my goals. The format should be able to hold all of the following information:

There are several potential formats that could be put to use: XBEL, the outline formats OPML and XOXO and the syndication formats RSS and Atom. Each has drawbacks, as I'll go over in upcoming posts here on Workbench.

I'm starting with XBEL, because that's the best-supported format specifically designed to hold bookmarks. XBEL was created in 1998 by members of the Python community led by Fred L. Drake Jr. XBEL 1.0 continues to be the only release, though there's occasional talk on the XBEL-Specs mailing list about developing a new version.

XBEL was designed to represent browser bookmarks and has become the native format for storing them in the Konqueror and Galeon browsers. There are add-ons that extend XBEL support to more popular browsers -- one example is SyncPlaces, a Firefox add-on that can manually import and export XBEL bookmarks.

Here's what a bookmark looks like in XBEL data produced by SyncPlaces:

<bookmark id="row123" added="2008-11-25T17:30:22.352" modified="2008-11-25T17:30:22.522" href="http://workbench.cadenhead.org/">
  <title>Workbench</title>
  <info>
    <metadata owner="Mozilla" dateadded="1227634222352963" lastmodified="1227634222522963"/>
  </info>
  <desc>Rogers Cadenhead's personal weblog</desc>
</bookmark>

Bookmarks in XBEL can be grouped into folders, which themselves can contain more folders to create a hierarchy. The format's well-designed and can be extended by namespaces or the metadata element, which in the preceding example carries Firefox-specific information.

There are several drawbacks to using XBEL. The format predates social bookmarking and lacks support for tagging bookmarks or assigning them to categories like the ones employed by the Open Directory Project.

XBEL also predates the popularity of syndication, so there's no way to identify that bookmarks are RSS or Atom feeds. You also can't establish a relationship between a web site's home page and its feed. A few years ago on XBEL-Specs I floated the idea of adding type and rel attributes to bookmarks that function like they do in Atom, which would be all that's required to publish blogrolls and feed subscription lists with the format.

XBEL can't be used for web directories, feed lists or social bookmarks without extending the format. I think all three are strong enough use cases to be part of a bookmark format's core set of elements. If I choose XBEL, most of my project's functionality won't be supported by today's XBEL tools or client libraries, which is the primary reason to adopt an existing format.

Syndicated 2008-11-25 19:42:31 from Workbench

CBS Takes 'Ex List' Off Schedule

CBS has pulled The Ex List off its schedule, which is good news for my TV Death Pool:

Eye has yanked the drama off the sked, effective this Friday. A repeat of NCIS will air in its place.

Decision comes after The Ex List averaged 5.3 million viewers and a 1.5 rating/5 share in its final airing, last Friday. The Ex List repped CBS' weak link on Friday nights, where Ghost Whisperer and Numbers both won their hours.

The Ex List had an idea that was better in concept than application. A single woman (Elizabeth Reaser) is told by a psychic that she has one year to find her true love or end up alone, and the guy's somebody she already dated.

Reaser's an appealing actress as the unlucky-in-love woman, but every week she chased after -- and usually bedded -- some old boyfriend who had become a stranger to her. So there was a new male guest star every week, just like on Love Boat, but he wasn't just climbing aboard a boat.

Syndicated 2008-10-28 14:55:56 from Workbench

Cyber-Cowboy Post-Apocalyptic Kung Fu

I found a great "cyber-cowboy post-apocalyptic fu" music video on another blog this morning. Watch for the appearance of Col. Wilma Deering, the Planet of the Apes Statue of Liberty and the film crew in a mirror:

This video for Muse's "Knights of Cydonia" is the work of Joseph Kahn, a prolific music video director whose next project is a film based on William Gibson's Neuromancer. (Via Stan!.)

Syndicated 2008-10-28 13:44:11 from Workbench

Local Blogger: 'Barack Obama Loathes My Kind'

I mentioned earlier that some of my neighbors in North Florida are having trouble accepting the possibility of an Obama presidency. One of them is Kim "Velociman" Crawford, who's going to flee to the Georgia mountains if Obama wins:

... I firmly believe Barack Obama absolutely loathes my kind. This man will not be content to win the presidency. He will spend his waking hours thereafter not pursuing the legitimate goals of state, but punishing those who would dare to oppose him. ...

Did I mention this man hates me? You and me? Yes he does. Why? Because he can. Yes He Can. Beneath that cool persona is a megalomaniac. Cool? Like Stalin after a purge, emotionally and sexually spent. Like Saddam after a torture session, dozing in his chair with someone's genitals curled in his fist. Like Pol Pot after a petit mal seizure, mumbling a litany of the dead. Cool that way.

So I will cast my pathetic vote, and ramp up my relocation to the mountains. Reduce my footprint. Carbon? That will be a nice byproduct, but I mean my personal footprint. My credit footprint. My interface with authority footprint. I'm researching micro-hydro water turbines for that stream, windmills for water, a half-acre patch for vegetables, a few goats, and a bison. Just because I want a fucking bison.

Velociman's our region's greatest crank, which ought to be an official ceremonial position like poet laureate. One of my favorite posts of his gave a primer on how to speak Southern:

... we talked like many people in southern or rural areas talk. You make eye contact when you address each other, then you look down, at the ground, and spit in the grass, and rub it absent-mindedly with the toe of your shoe. As if to say, I enjoy your company, but not that much. I ain't gay, trucklehead! Talk, spit, rub. Had many a conversation doing that.

Syndicated 2008-10-27 13:46:08 from Workbench

Apache HTTP Server 2.2.10 Released

This afternoon I upgraded the servers that run the Drudge Retort and SportsFilter to Apache 2.2.10, a minor upgrade released on Oct. 15 that fixes a cross-site scripting (XSS) vulnerability in FTP URLs discovered by Marc Bevand of the network security company Rapid 7.

The rest of the changes in the new version look like minor bug fixes.

I compile the Apache web server from source code on both servers, a process that was difficult the first time around but has been easy since then. After I download a new version, I upgrade with three commands:

  1. ./configure --prefix=/usr/local/apache2 --enable-rewrite --enable-so
  2. make
  3. make install

Syndicated 2008-10-27 01:10:15 from Workbench

Arguing Politics During My Vasectomy

To give you an idea of how tough my wife is, she delivered two of our sons via natural childbirth, skipping out on epidural anasthesia in the belief it's better for the baby. One son was 11 pounds and three ounces. When he hit the birth canal, her screams were so loud that I asked for a sedative to calm my nerves. Nurses stuck around after their shifts to find out how much he weighed.

To give you an idea of how tough I am, I researched vasectomies for five years before consenting to the procedure. You can't be too careful about these things. I wanted to give the medical community time to work out the kinks.

So it's last Friday, and I find myself at Planned Parenthood in Jacksonville, lying flat on my back with my pants around my ankles, trying to find my happy place. A urologist begins handling up on my junk, explaining each step in the process with the unabashed enthusiasm of Bill Nye the Science Guy.

Desperate to change the subject, I look away from my imperiled dingus and tell the doctor about a problem I had completing the online registration on his web site. The components of the web form disappear on Mozilla Firefox when you begin to input data. I had to switch to Internet Explorer to get it to work. He seems interested. We lament cross-platform browser incompatibilities and get into a debate about whether Safari or Firefox is the second most popular browser among users. He lays a surgical drape around my genitals. I let him win the argument.

I tell him that I publish sites, and when he asks which ones I am faced with a socially difficult decision: Do I tell the person approaching my wang with a cauterization tool that I publish a stridently liberal web site?

Keep in mind that we're in conservative North Florida, where doctors and just about everybody else are rock-ribbed Republicans and the presidential campaign's getting angrier by the day. Some of my neighbors in this right-wing community are finding it difficult to accept that a Democrat might win the White House. They thought a cure had been found for that disease years ago.

I bite the bullet and tell the doctor about the Drudge Retort. My wife, who's in the room observing the surgery without an ounce of squeamishness, visibly winces.

The doctor's Douglas G. Stein, a Tampa urologist who offers a no-scalpel, no-needle vasectomy procedure that's advertised throughout the state. His web site offers more reassurance to fearful patients than my wife was ever offered before childbirth. I'm not the only guy with a heightened sense of anxiety regarding my tallywacker.

How is vasectomy done without a scalpel?

No-scalpel vasectomy instruments, used in China since the mid-70's and introduced into the United States in 1989, are simply a very pointy hemostat, used initially to make a tiny opening into anesthetized skin of the scrotal wall, and a ring clamp, used initially to secure each vas tube in turn beneath this opening. The pointy hemostat is then used to spread all layers (the vas sheath) down to the vas tube itself and to then deliver a small loop of the vas through the opening as the ring clamp is released. In turn, the ring clamp is used to hold the vas, while the pointy hemostat spreads adherent tissue and blood vessels away from the vas under direct vision, so that the vas can then be divided with a fine surgical scissors and the upper end cauterized with a hand-held cautery unit so that it will seal closed.

How is vasectomy done without a needle?

Traditionally, a local anesthetic has been injected into the skin and alongside each vas tube with a very fine needle, as small as diabetics use to inject themselves with insulin. One could feel a tiny poke in the skin, then a bit of a squeeze as the anesthetic was applied to each vas tube. However, most people do not like needles of any size ... especially there!

A MadaJet is a spray applicator which delivers a fine stream of liquid anesthetic at a pressure great enough to penetrate the skin to a depth of about 3/16", deep enough to envelop the vas tube held snugly beneath the skin. Each vas is positioned in turn beneath the very middle of the front scrotal wall and given two or three squirts. That numbs the skin and both vas tubes adequately for 99% of men.

Stein becomes so animated talking politics that he doesn't announce the cauterization of my first vas tube. I figure it out when I spot a small wisp of smoke rising to the ceiling above my bits and pieces.

When I mention with excitement my recent Obama rally trip to Orlando, he asks if I saw the following billboard on my drive down Interstate 4.

McSame billboard bought in Florida by vasectomy doctor Douglas G. Stein

I say that I did, still unsure whether the doctor -- who has one testicle to go -- leans left or right.

At this point, Stein offers a final bit of reassurance: "Those are my billboards."

As Florida blogger Jim White recently discovered, Stein replaced several of his vasectomy billboards across the state with the cutting message "Stop McSame." Stein tells me with great excitement the interest his effort has generated. White calls this campaign "preventing unwanted presidents."

I relax, to the extent that it's ever possible to relax while a stranger applies scissors to your mantackle.

Syndicated 2008-10-25 21:23:15 from Workbench

Henry Hey's 'Palin Song'

Before you dismiss Palin Song as a slam against the candidate, listen to it a few times to see how jazz musician Henry Hey stalks her speech with his piano.

The song takes me back to Mister Rogers neighborhood. (Via Michael Sippey.)

Syndicated 2008-10-23 22:18:30 from Workbench

Going to Buckethead at Jacksonville's Freebird Live

Last night I took my 12-year-old son to see Buckethead at Freebird Live in Jacksonville Beach. In the past year all three of my sons have developed an appreciation for, and I hope I'm using the term properly here, people who can shred an axe. They acquired this taste by spending most of their waking hours and some REM sleep playing Guitar Hero.

To give you an idea of how out of place I was at this event, the last musician I saw perform live was Janet Jackson at the MGM Grand in Vegas back in 1994. Yes, I'm a part of the Rhythm Nation. When I mentioned that I had attended this concert to my son and his teen-aged friend and nephew on the drive up, they didn't know enough about her to be mortified.

For those not yet familiar with Buckethead, he's a former guitarist for Guns N' Roses who plays his own instrumental guitar songs, most of which are thundering heavy metal riffs played at such a ferocious pace they're perfect for masochistic pattern-recognition videogames. I first discovered this performer when his song Jordan was played around 1,000 times in my house as an unlockable bonus track on Guitar Hero II.

Buckethead performing at Jacksonville's Freebird Live, photo by Anders LindquistBut you really don't know Buckethead until you've seen Buckethead. He played Wednesday wearing his usual attire -- a bucket on his head, expressionless Michael Myers mask, one-piece work dungarees and Converse All-Stars. Last night he wore a plain white sandpail instead of what we were expecting, a KFC bucket scrawled with the word "Funeral." Although I read somewhere that his outfit's a consequence of shyness, the presentation makes him look like someone who has killed and will kill again.

I'd never been to Freebird Live, a concert venue owned by Judy Van Zant-Jenness, the widow of Lynyrd Skynrd founder Ronnie Van Zant. The place holds around 700 people, who can either watch downstairs or from a balcony that overhangs the stage. We watched upstairs from a perch close enough to drop a cameraphone on Buckethead, because I know that if I ever enter a mosh pit I will fall and break a hip.

Apparently there's a protocol for moshing at Freebird that allows it at some performances but not others. Early in Buckethead's set, a guy in his early twenties began banging around, clearing out a widening circle between himself and a bunch of unhappy people who held up the universal hand gesture for "step off, motherfucker." When a bald guy finally showed up and reciprocated his desire to become human pinballs, they had just gotten started when giant security guards wrapped them up and dragged them off.

This was probably for the best. When only two people are moshing, they look like the preliminary rutting ritual of adolescent male elk. I would not be surprised to learn they're now dating.

Considering the location, I was shocked and disappointed that nobody yelled "Freebird".

I'm afraid of liking a band for fear it will ruin them for my kids, but Buckethead rocked. We didn't bail until after he played "Jordan" around midnight, and I can still hear the song in my tinnitis. The bass was so loud downstairs I was afraid it might alter the electrical impulses of my heart. I went to bed twitching like Jeff Goldblum in The Fly.

Credit: The photo from last night's concert was taken by Anders Lindquist.

Syndicated 2008-10-23 16:22:38 from Workbench

Obama Rally Brings Thousands to Orlando

I made the two-hour trek to Orlando yesterday to attend my first Barack Obama campaign rally, an event that brought 40,000 to 60,000 people to a plaza outside Amway Arena. Arriving around an hour before the event, I knew to avoid the streets around the arena and parked my car at the Citrus Bowl, where buses were available.

Most of Obama's speech was so familiar I could have delivered it myself, as someone who has seen every one of the 30-plus debates he has participated in during this long campaign. One of his new remarks was a response to Sarah Palin's recent comment where she objected to the McCain campaign's use of robocalls. Obama said you'd have to go pretty far to violate Palin's standards for negative campaigning.

Father and son attending the Barack Obama campaign rally at Amway Arena in Orlando, Florida. Picture by Rob McCulloughHillary Clinton, making her first joint appearance with Obama since July, gave a sharp 15-minute speech that tied John McCain to President Bush's economic policies and touted the record of the last Democratic president on the economy. She coined a new slogan, "Jobs, baby, jobs!", that was chanted a few times by the crowd. For some reason, chanting is harder in person than it seems like it would be on television. I couldn't keep up with the speed of the crowd racing through "Yes we can!" and "O-BA-MA!", and I found myself wishing that Democrats had a few more well-practiced exhortations in our repertoire, like "U-S-A!"

Both Clinton and Obama focused almost entirely on economic concerns. "At this rate, the question isn't just, 'Are you better off than you were four years ago?'" Obama said. "It's 'are you better off than you were four weeks ago?'"

I needed too much personal space to get close to the stage, relying instead on a giant screen to follow the speeches. (You can find me in Flickr photographer Rob McCullough's crowd shot, where I'm an unshaven gray-haired smudge with a tree growing out of my head.) Throughout the event, black families, some with aging grandparents and young children, gently moved through attendees to get closer. Although the crowd was racially and generationally diverse, you couldn't miss the emotion of blacks who had come to see Obama's first event in the city. As an adopted Floridian who has learned the tragic history of race relations in the Sunshine State during my decade here, I had to marvel at the progress that brought some of the older Americans in attendance past central Florida's Rosewood massacre, Klan lynchings, poll taxes and the civil rights struggle to this amazing moment in time.

Despite the size of the crowd and the zeal of some attendees to get a better spot, I can't recall a large event I've attended where people were in a better mood. Even at the Citrus Bowl, where more than 2,000 people were still in line to get on buses 15 minutes before the 6 p.m. start of the event, I heard no complaints.

Stories from early voting sites across Florida and other states this week describe huge lines where people aren't leaving, no matter how long it takes. Looking at the bus line in Orlando and the faces of the crowdgoers who made it to the rally on time, I think there are millions of Americans who regard casting their vote this year as one of the biggest milestones of their lives. Turnout this year will be massive.

On the way back to the Citrus Bowl, as we drove through a dodgy neighborhood right on the outskirts of downtown, a car avoided an accident by swerving towards the bus and stopped a few feet from riders seated behind the driver. Even that near-miss didn't sour the mood.

Credit: The photo from the Obama rally was taken by McCullough.

Syndicated 2008-10-21 15:54:38 from Workbench

67 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!