After getting a TON of work done today I drove up to the South Fork of the Snoqualmie river to fish a secret spot I’ve discovered fairly high up in the mountains. There’s a forgotten path down to the river, you scramble over some rocks, slide down a small waterfall, boulder around a bend in the river and there’s this sweet little pool. A nice 12 inch rainbow exploded the surface when he took the dry fly on my first cast. He put up a beautiful fight. I released him unharmed. The river turns into a gorge further down with a few big log jams and it looks like it’s fairly unexplored. So that’ll me my next mission when I’m up there again.
Blog
-
Why linux rocks
I’m busy decommissioning an old server I’ve had for almost a year. I’ve used it for dev and testing and installed a bunch of crap on it. It has never required a reboot and has been busily chugging away. Here’s it’s uptime:
11:20:46 up 333 days, 8:13, 1 user, load average: 1.02, 1.34, 1.21
The only reason it needed a reboot 333 days ago is because the datacenter it was hosted in was being migrated. It was up for about a year before that, again without reboot.
-
Configuring apache 2.2.4 + mod_perl 2.0 + php 5.2.3 + libapreq with a worker MPM
I couldn’t find any docs on compiling mod_perl2 alongside php5 with apache 2.2, so hopefully this helps someone.
I’ve always statically compiled mod_perl into apache, but the easiest way to get mod_perl to play nice with PHP under apache2 is to compile them as DSO’s or dynamic modules that are inserted at runtime. I’ve tested this under Ubuntu 7 and CentOS 5.
At the time of this writing the server hosting this page is running with this config and handles a not-insignificant amount of traffic.
NOTE: I use a worker MPM with Apache to get the best possible performance. The worker MPM is a hybrid thread/process model. It requires that PHP be threadsafe when compiled.
Here are the commands I use. I’m assuming you’ve downloaded the latest apache httpd 2.2 source code, php’s source code, mod_perl’s source code and libapreq2’s source code. I’m assuming you’re smart enough to know when to CD to the directory of each app to compile and install that app, so I’ve left out basic steps like that.
First compile apache with DSO support. Enable the worker MPM, enable mod_rewrite, enable mod_expires, and add a little magic to make libapreq work:
./configure –prefix=/usr/local/apache2 –with-mpm=worker –enable-so –enable-rewrite –enable-expires –with-included-apr
make
make install
Now that apache is installed, compile and install a thread-safe PHP DSO . Note the enable-maintainer-zts compiles a threadsafe PHP. I’ve also added mysql support.
./configure –with-mysql –enable-maintainer-zts –with-apxs2=/usr/local/apache2/bin/apxs
make
make install
Now you compile and install a mod_perl DSO.
perl Makefile.PL –with-apache2-apxs=/usr/local/apache2/bin/apxs
make
make install
Next you compile and install libapreq as a DSO
perl Makefile.PL –with-apache2-apxs=/usr/local/apache2/bin/apxs
make
make install
Make sure your httpd.conf contains the following to enable mod_perl, php and libapreq:
LoadModule apreq_module /usr/local/apache2/modules/mod_apreq2.so
LoadModule perl_module modules/mod_perl.so
LoadModule php5_module modules/libphp5.so
DirectoryIndex index.html index.htm index.php
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps -
An ode to the end of Facebook
I rant, Tony rants, Alan ranted.
With surprisingly similar space-time coordinates.
Our love of Facebook is duly recanted.
We’re no longer Zuckerberg’s subordinates.
-
Quote of the day
Douglas MacArthur – “We are not retreating – we are advancing in another direction.”
-
More great headlines that get traffic
My bro (in the literal sense) Nick is on the home page of Reddit this morning with an article about the chopper crash yesterday. As always, it’s all in the headline:
Can you Believe they are Charging the Fugitive Driver for the Deaths in the Press Chopper Crash?

Writing headlines of pure genius like this is going to rapidly become a very desirable skill.
-
Facebook's getting out of hand
Once upon a time I was a Facebook addict. It was an awesome way to reach out to people I haven’t been in contact with for years, share photos, update your status 80 times a day, etc. But Facebook apps are getting a little out of hand…

…and I’ve always hated that friend detail feature. </end rant>
-
How to easily cross-post your linkbait
In my recent podcast we chatted about Linkbait. Linkbait is simply the act of writing a headline for a blog entry or page that will generate a very high click rate and then publicizing that page. If you’re not sure how to write great headlines, start with this page of 10 Sure-Fire headline formulas that work.
If you’re writing great headlines for your blog entries and are looking for places to publicize them, check out socialposter.com. It’s a bookmarklet you drag onto your browser bar. Then you go to the page you want to promote, drag your mouse to select the text on the page you want to use as the summary, and then click the bookmarklet. It lets you easily cross-post to these websites:
Digg.com
Netscape.com
Reddit.com
Del.icio.us
Stumbleupon.com
Google.com/Bookmarks
Myweb2.search.yahoo.com
Technorati.com
Indianpad.com
Socialogs.com
Furl.net
Diigo.com
Wirefan.com
Bibsonomy.org
Looklater.com
Blinklist.com
Blogmemes.net
Bluedot.us
Myjeeves.ask.com
Simpy.com
Backflip.com
Spurl.net
Newsvine.com
Netvouz.com
Grupl.com
Blinkbits.com
Bmaccess.net
Shadows.com
Ma.gnolia.com
Scuttle.org
Smarking.com
Blogmarks.net
Plugim.com
Linkagogo.com
Dotnetkicks.com
Mister-wong.de
Favorites.live.com
Wdclub.com
Yigg.de -
Yahoo takes 10 days to update an email address?
I just updated my email address on Yahoo and got this:

WTF?
-
How to record a remote podcast
A quick article about how to record a remote interview and how to fix the audio levels after the interview.
I got a few questions about the equipment I used to record the podcast interview with Tony yesterday. I recorded it remotely using Skype – Tony was in West Seattle and I’m in Sammamish. We were both wearing headsets which I recommend because even though Skype is good at cutting out feedback from a PC speaker, some noise does get through if you’re not wearing a headset.
I used Pamela to record the audio. I recommend the Pro version because the other versions limit your recording to 30 minutes or less. Pamela is free for the first 30 days and it’s about $12 after that. A tip when using Pamela: To get to the mp3 audio files, right-click on a recording and click “open call recording folder”. It took me a while to figure that out.
The only complaint I have about Pamela is that it doesn’t regulate the volume of the caller vs. the callee. So my voice was very loud and Tony’s was much softer. It’s taking the audio directly from Skype, so perhaps that’s too much to ask. I also haven’t experimented playing around with the Skype audio settings. Fixing this was time consuming:
I used Audacity, and open source sound editor to fix the difference in Audio volume, and besides the actual interview, this occupied most of my time putting the podcast together. Using Audacity you can see the waveform and it’s quite clear where the audio level is much lower. So I selected the parts in the audio where Tony speaks and applied the Amplify effect. Amplify automatically detects the largest waveform and sets the amplification so that the largest waveform won’t clip – in other words it wont over-amplify and cause distortion. I recommend using the default number it gives you and if that’s too low, then look at the area of the clip you’ve selected and you’ll probably see a spike in the waveform that’s causing amplify to give you a low amplification number. Just select around that spike and you’ll be able to boost the signal more.
I’m sure there’s an easier way to do this, but I tried using Leveller and a couple of other tools and the results weren’t as good as Amplify.
Next time, I’m going to make darn sure my levels are much lower and as close as possible to the person I’m calling. Pamela has a level indicator when you’re recording, so I might try and use that as a visual guide and tweak Skype’s audio settings.
Once I’d finished working with the clip in Audacity, I saved it as a WAV file rather than using Audacity’s ‘save-as mp3’ option and I used RazorLame to convert the WAV to mp3. That gave me more control over the mp3 quality. Under Edit/LAME options, select 24kbit as the bitrate and ‘mono’ as the mode.
Then I just uploaded the file to my blog server and presto!