Archive for the ‘Posts’ Category

Rotating rails logs when using Phusion Passenger

I found a great post on Overstimulate about handling the rotation of rails logs when you use Phusion Passenger. Most of the data for your application should end up in the apache logs, but if your site is highly dynamic, you may end up with a giant production log if you’re not careful.
Toss this [...]

Deleting all e-mail messages in your inbox with mutt

Occasionally, I’ll end up with a mailbox full of random data, alerts, or other useless things. If you have SSH access to the server, you can always clear out your mail spool, but if you connect to an IMAP server, you can use mutt to do the same thing.
First, use mutt to connect to [...]

Two great signals: SIGSTOP and SIGCONT

The best uses I’ve found for the SIGSTOP and SIGCONT signals are times when a process goes haywire, or when a script spawns too many processes at once.
You can issue the signals like this:

kill -SIGSTOP [pid]
kill -SIGCONT [pid]

Wikipedia has great definitions for SIGSTOP:
When SIGSTOP is sent to a process, the usual behaviour is to pause [...]

Ugly upgrade path from Wordpress 2.7.1 to 2.8

When I tried to do an automatic upgrade from Wordpress 2.7.1 to 2.8 yesterday, it failed miserably. The files were all put in place, but when I tried to load /wp-admin/upgrade.php, this error popped up:

Fatal error: Call to undefined method wpdb::has_cap() in
/path/to/wordpress/wp-admin/includes/schema.php on line 22

I was perplexed at the error, so I restored [...]

Upgrading from Fedora 10 (Cambridge) to Fedora 11 (Leonidas)

There are two main ways to upgrade Fedora 10 (Cambridge) to Fedora 11 (Leonidas):
» What the Fedora developers suggest:

yum -y upgrade
yum -y install preupgrade
yum clean all
preupgrade-cli "Fedora 11 (Leonidas)"

Of course, if you’re doing this on a Fedora desktop, you can use preupgrade (rather than preupgrade-cli) to upgrade with a GUI.
» The method I prefer (and [...]