Managing WordPress and Gallery2 With Subversion

Keeping WordPress up to date using the standard method of deleting old files, extracting the new ones and then running the database upgrade script is a bit cumbersome, but really not that difficult. Gallery2 uses more or less the same methodology, but it does not require you to delete your files prior to the upgrade because it generates a script to remove deprecated files after the install is complete. This is very kind of them, but the Gallery package is large, and upgrades can get a bit unwieldy. While there are certainly more difficult software packages to maintain, there are things I would much rather be doing than software updates, so I decided to make my life easier by using subversion to manage both applications.

Subversion is a code revision management tool that is everything CVS should have been. It is not only amazingly useful for software developers, but it can be readily used by end users as a convenient method of keeping their software up to date. It is for this reason that the Automattic and and Gallery folks have started recommending it for those who have command line access to subversion enabled servers.

There is no way to force the software to make an existing install into a subversion checkout, so to convert my site, I pretty much just followed the instructions at wordpress.org site.

Create a directory for the new install and “cd” into it:
$ mkdir wordpress-svn

Checkout the current WordPress version:
$ svn co http://svn.automattic.com/wordpress/tags/2.3.1 .

Copy the things I cared about into from the old directory into the new one:
$ cp ../wordpress/wp-config.php .
And the same for:
favicon.ico
.htaccess

The only thing I didn’t really like was their method for copying the files from the old wp-content directory to the new one.

They suggested using “cp -rpf”:
$ cd wordpress
$ cp -rpf wp-content/* ../wordpress-svn/wp-content

But I prefer to use a “tar | tar” operation as root from my original wp-content directory.
$ cd wordpress/wp-content
$ tar cpEf - * | (cd ../../wordpress-svn/wp-content; tar xf -)

I don’t really have a reason for this other than it’s the way I have always moved large directories full of files with varying permissions. I just have more confidence in “tar” to maintain permissions than I do “cp”. I seem to remember being bitten by “cp” while moving some Oracle databases at some point.

That pretty much did it for WordPress… Next I moved onto Gallery2. The process was very similar.

Create the new gallery2 directory within your wordpress-svn folder and “cd” into it:
$ mkdir gallery2

Checkout the latest version of the Gallery2 code:
svn co https://gallery.svn.sourceforge.net/
svnroot/gallery/branches/BRANCH_2_2/gallery2 .

Copy over the config file:
cp ../../wordpress/gallery2/config.php .

Finally, copy the g2data directory over using “tar | tar”:
$ cd ../../wordpress/gallery2/g2data
$ tar cpEf - * | (cd ../../wordpress-svn/gallery2/g2data; tar xf -)

That was it… Now all that was left was to rename wordpress to wordpress-presvn and wordpress-svn to wordpress:
$ mv wordpress wordpress-presvn; mv wordpress-svn wordpress

Everything worked fine, so I was golden. If it had not been, I could have simply renamed the directories back to their original names.

What did all this get me? Much much easier upgrades. Upgrading WordPress is now just a matter of switching to the latest tag and running “svn up”:
$ svn sw http://svn.automattic.com/wordpress/tags/2.3.2
$ svn up

With Gallery, however, there is no need to do a switch for dot releases, so until it goes from 2.2.x to 2.3.x there is no need to run the “svn switch”… I can just “svn up”.

Remember that this is a 10,000 foot view of the process. Please read the links to the Automattic and Gallery documentation if you are going to make the move yourself.

Making a Connector for the Teldyne R22D Oxygen Sensor

If you dive rebreathers much, chances are you will have to repair or replace the Molex plugs and pins that connect your Teledyne R22D oxygen sensors to your head electronics. Many manufacturers are cool about sending you the parts so that you can do the repair yourself, but some, such as AP Diving require that you send the entire head back for this simple repair.

If you are comfortable handling electronics, and you think it’s silly to have to send your head all the way to England or wherever just to have a couple of parts costing less than $1 replaced, you can get the parts you need from just about any distributor that sells electronic components. I like Digi-Key because they would sell me the crystals to make a Red Box when nobody else would. I’ve been loyal ever since.

Here are the parts you will need:

Digi-Key part number: WM1129-ND
Manufacturer Part number: 08-56-0110

CONNECTION TERMMINAL FEMALE

CONNECTION TERMMINAL FEMALE

Digi-Key Part Number: WM2001-ND
Manufacturor Part Number: 22-01-3037

CONNECTION HOUSING

CONNECTION HOUSING

Toyota Yaris Review

About a month ago, Courtney and I decided we needed a new car. She had previously driven a Toyota RAV4, which was not only old and falling apart, it did not get the kind of fuel economy we were looking for given the current price of gasoline. We settled on the Toyota Yaris, and headed over to the dealership to see what we could find.

The first thing they told us what that the Yaris was so popular they could not keep them in stock, and there was absolutely nothing they could to about the price. Furthermore, they indicated that they MIGHT be able to give us $500 for Courtney’s old RAV4, a car that blue booked for trade in at $3,000. I told them that I would sell the car private party and most not likely come back because they had insulted me. The deal-making was on and 5 hours later, we had agreed on a deal that not only got us the whole $3,000 trade in, but a nicely discounted Yaris as well.

We’ve been driving the car for about a month now, and overall, it is actually quite nice. Some people complain about the road noise, but it does not bother me much. The gauge console being directly in the center of the dash took about a day to get used to, but it’s really no big deal either. The seats are comfortable, and 3,000 miles later, we are starting to see the 40 miles-per-gallon fuel economy we had expected. There is even some indication that it will continue to improve until the engine is fully broken in at 10,000 miles. With gas prices continuing to soar, I sure hope so!

There are really only a few things that I don’t like about the Yaris. First, the front of the car is, in my opinion, far too low to the ground, and you have to be constantly be on the lookout for curbs when you are parking. It can also be a problem when you are going over larger dips in the road. It would have been nice for the car to be lifted another inch or so off the ground to keep from having to worry about it so much.

Secondly, the knobs controlling the heater / air conditioning / environmental system seem to be very cheaply made. It’s not big deal, but they feel flimsy, which sucks when you just dropped $12,000 on a new car.

Finally, Toyota’s warranty is absolutely miserable! 3 years or 30,000 miles is still a brand-new car and it sucks that they don’t offer the 100,000 mile warranty that is becoming more popular these days. They seem to be banking entirely on the fact that the company has developed a good reputation for reliability.

Aside from the couple of complaints, however, it’s a good car that seems to be worth having, but not made out of solid gold as Toyota seems to think it is. How it holds up over the long haul remains to be seem, as does the vehicle’s ability to handle in the snow. It would seem, however, that you could certainly do worse.

Ana

Quite a few years ago, Chucky and I found ourselves in Malaga, Spain. We were both in college, and his parents had graciously invited me along on their family trip. We spent our days in more or less typical tourist fashion, venturing around little Spanish villas, the near-by cities and even crossing the Strait of Gibraltar to visit Tangiers Morocco.

The evenings, we had pretty much to ourselves, and although our plans to hop a train to France were thwarted, we managed to enjoy ourselves by wandering aimlessly around Malaga in a relentless search of interesting pubs and British girls to flirt with. We found plenty of both, but as wildly successful as we were at getting these British girls to agree to meet us for dates on subsequent days, we were decidedly less successful at getting them to actually show up.

We also found this poster with a very attractive woman named Ana advertising the Spanish public telephone service. We must have walked past it a dozen times, each time commenting on how attractive Ana was, and how much the poster made us desperately want to use one of these amazing Spanish public telephones to call her up and ask her out on a date. Sadly for us, and fortunately for Ana, however, her number was not listed anywhere on the poster; a fact which we found most upsetting, but was probably a blessing in hindsight because neither of us knew much Spanish and would have most likely made quite a blunder of any advances we might have managed.

On to plan “B” we thought. If we couldn’t have Ana’s phone number, we were most certainly not leaving Spain without her poster.

Now, it is important to realize that this poster was not only in a very public location near the beach, it was also enclosed behind locked glass, making any attempt to acquire it a fairly risky proposition. If we were going to nick it, we were going to first have to find a time when nobody was around, and secondly, a way to unlock the glass cabinet enclosing it.

It so happened that on our last day in Spain, we were were strolling back late at night from a pseudo British pub after a failed attempt to locate flirtable British girls when we noticed that the normally bustling sidewalk where Ana was located had become deserted. Problem one solved! Now just to get that glass cabinet open. I’m a roof and tunnel hacker, so I consider myself above forced entry, preferring more elegant methods like lock picking and social engineering, but I did not have my lock picks so we were forced to use more imaginative methods… Like the butter knife we had conveniently taken from the pub. We moved in to inspect and realized to our joy that the lock was placed directly in the middle of a very long and flimsy piece of aluminum that made up the frame for the poster to sit it.

An insertion of the better knife and a little twist popped the door open with a “dh-dh-dh-dh” sound that I will never forget. Chucky and I looked at each other, both a little surprised, but in total agreement that the only next step could be to take Ana down, roll her up and put her up Chucky’s sleve. This we did, and in a few short seconds we were off with Ana, having escaped Spanish jail and acquired just about the sweetest bit of travel memorabilia I have ever seen!

Ana now hangs in Chuck’s office down in Greenland NH.