Upgrading to WordPress 2.3 and the New Built-in Tagging Feature

I’ve barely completed an upgrade to WordPress 2.3. Out of many new improvements, one which stood out to me is the integrated tagging support. No longer, is it necessary to download one of the many tagging plugins.

Some things I noticed during the upgrade:

  1. My existing tagging plugin broke at the time of the upgrade. I found, after searching on Google, that some of the database schema that most tag and link plugins depend on was removed. (wp_post2cat et. al.) Simply disabling my two plugins for Simple Tagging fixed the database error message at the top of the pages
  2. WordPress has importers for a lot of tagging widgets. All I had to do was go to the “Manage” tab and choose “Import”. Importing the tags worked flawlessly.
  3. The new tag cloud widget applies unique styles to each tag. They are in the format < a class=”tag-link-$tag_id” … >. To get around the tags not having a style, I modified my style sheet and added color and link styles to the container div that the tag widget is in.
  4. I had to modify my page template to print a list of tags at the bottom of each post. There is a pretty good reference for that here.
Posted in Web | Tagged , , , , , , | Comments Off on Upgrading to WordPress 2.3 and the New Built-in Tagging Feature

More RAM? Or maybe a new Computer?

Well, my sister asked me today which is better, getting more RAM, or just getting a new computer. I’ll do my best to explain.

Your CPU is directly responsible for the speed at which a computer program runs. If programs load slow, take a long time to do certain tasks, and your computer seems generally clunky, It COULD be that purchasing a new computer with a faster CPU would help speed things up.

Continue reading

Posted in Hardware | Tagged , , , , , , | 5 Comments

Gentoo Init Scripts for Cherrypy

A few of the web applications I am hosting/developing are written with TurboGears which uses Cherrypy as its applications server. I have a couple things that need fixed for hosting CherryPy web applications on my Gentoo systems. First, there are no init scripts for CherryPy. Second, I’m running mulitple web applications per machine. I run them as different users with virtual python environments to keep web applications stepping on each others toes.

You can customize the logging for a TurboGears application to have not logging to standard out, but you still have to deal with the python CherryPy process not running as a daemon. I chose rather to run the application in a screen session.

First, a quick script to start my web application in its virtual python environment in my web applications directory.
#!/bin/bash
PATH=/home/<myuser>/bin:$PATH
cd `dirname $0`
./start-<mywebapp>.py prod.cfg

And next, a real simply startup script that starts and stops the application in a screen session.

#!/sbin/runscript
depend() {
need net
}
start() {
su -l $APPUSER -c "screen -S $SESS_NAME -d -m /$APP_DIR/$SCRIPT_NAME"
}
stop() {
su -l $APPUSER -c "screen -S $SESS_NAME -X kill"
}

The variables can go in /etc/conf.d/<app_name> where the <app_name> is the same name as the init.d script. They will automatically be sourced and passed to the init script. For more information on Gentoo init scripts, check here.

Posted in System Administration | Tagged , , , , , , , | 1 Comment

Pardon my dust

I found that my theme was not working correctly in Internet Explorer (Gee, imagine that.)

Rather than search for another, I’ve decided to tweak it myself. Pardon my lack of styles for a bit.

Edit There. I’ve created a new template, based on my old template’s stylesheet, that uses YUI Grids instead of a home grown template layout. Not that I’m opposed to creating your own layout, but hey, I really didn’t want to find out why my left column displayed at the bottom of the page instead of where it was supposed to in Internet Explorer.

Anyway, this is still a work in progress. I need to go through the styles that I didn’t tweak much and delete things I don’t need. I also need to clean up the styles on some of the templates. I also need to re-comment all the template pages. Perhaps when I get a moment I’ll upload this somewhere.

Posted in Web | Tagged , , , , , , | Comments Off on Pardon my dust

Upgrading an OLD Gentoo Machine.

I’m in the process of re-installing a pretty old machine with the latest Gentoo. I’ve got a shared NFS directory with portage and all my machines are using a packages directory. After one machine builds something, another machine can simply install the built package.

Here is a portion of the make.conf on each machine.
FEATURES="-distlocks buildpkg"
PKGDIR="/usr/portage/packages/x86"

Well, this particular machine was installed with Glibc 2.3.x. I typed the following to do the upgrade:
emerge -auDvk system
About 1/3 of the way through the upgrade, tar suddenly stopped working:
tar: /lib/libc.so.6: version `GLIBC_2.4' not found (required by tar)
I realized that tar had been upgraded but the glibc was not yet upgraded. To fix the problem, I created a new version of tar on a different system:
USE="static" emerge -av tar # on another machine
scp :/bin/tar /bin/ # from the broken machine.

Off I go, things are working.

Posted in System Administration | Tagged , , , , , | Comments Off on Upgrading an OLD Gentoo Machine.

One way to unemerge lots of unneeded packages on Gentoo Linux

As part of a recent project, I had installed a lot of packages on a separate machine to test my configuration. As is common, with Gentoo, you want to run the following before you actually emerge anything:
emerge -p <package_name>
In this particular case, I noticed the dependency list was pretty long (50 packages to be exact). Instead of going ahead with the emerge, I first recorded the package list to a file for later reference:
emerge -p <package_name> --nospinner > dep.list
Now that I’m done with the project, I can clean up the packages I no longer need like this:
emerge -aC `cat dep.list | grep 'ebuild N' | cut -d ' ' -f 8`
Notice the grep. That is because a couple of the packages were simply upgraded and I don’t know that they aren’t needed. After a quick scan of the resulting list to see what is going to be uninstalled, I let emerge do the rest of the work.

Walla, no more 50 extra packages on that machine.

Posted in System Administration | Tagged , , , , | Comments Off on One way to unemerge lots of unneeded packages on Gentoo Linux