Extracting a tar archive, advanced!

Because otherwise I’ll forget and have to search through forum posts to find it again:

Let’s say you have a tar archive, foo.tar.gz .  Let’s also say that this archive contains an upgraded version of a popular blogging software suite.  The contents of the archive look like this:


Let’s also suppose, shall we, that you’ve got the previous version of foo already installed in another location, like /var/www/foo.example.com/  , and you want to extract the contents of the archive (here’s the important part) into that directory, without having to move the directory contents or rename any directories, or whatnot.  Here’s how:

cd /var/www/foo.example.com && tar zxvp –strip-components=1 -f /path/to/foo.tar.gz

This will extract the archive, and ignore the first level of the path (in this case, foo/).

Things I want in the (not-yet-created) 3rd-Generation iPod Touch

Since Apple didn’t update the product line at their event this afternoon, I figure I’ll post my wishlist of things that I want to see in the new model.  Since anyone with that kind of clout reads this page.

  • A Camera. Stills is fine, video would be an added bonus.  The camera on my BlackBerry sucks big-time, and I’d like to take cute pictures of Nora without having to carry a 3rd piece of electronics around with me.
  • Full Bluetooth support. I want to be able to sync with my MacBook over Bluetooth, I want to be able to use the Bluetooth speakers in my office (or Bluetooth headphones, if I ever buy any). I want full file-transfer abilities, too; not just the crappy “you can sync your calendar and contacts” that it has now.
  • A good speaker (yes, I know that the 2nd-generation iPod Touch has a speaker; I don’t have one of those) with an independent software volume control for each of sound effects and music

I think that if Apple added all three of those features, I might downgrade my BlackBerry to “stick that makes phone calls”, and do all of the “funnest” stuff on the iPod.  Or if Apple gives up on the AT&T exclusivity for the iPhone, and lets T-Mobile sell them in the US, I’ll just trade both out for an iPhone 3GS.  But since I don’t see that happening any time soon, I’ll just have to continue hoping for upgrades instead….

I’m a daddy!

NoraNora was born at 2:31 this afternoon, weighing in at 7 pounds, 11 oz, and 19.5 inches long.

She’s swaddled and sleeping right now (and boy am I envious).  Heather is pretty exhausted; I think once she gets out of the shower, she’s going to try to get some sleep (before she has to wake up for a feeding).  I’m running on new-father adrenaline and the fact that I finally ate something bigger than a breakfast taco for the first time in about 24 hours, but I suspect that in the very near future I’m going to crash and sleep for about a month.

I’m sure more pictures will surface once we dig out our digital camera cables and start the downloads And I’m similarly sure that I’ll be close to this tired for the next year or so; I’ve accepted that as one of the dangers of being a parent.

Ugh, that was irritating

OK, this is going to start out being technical (actually, the entire thing will be technical). So you might want to skip this unless you’re a hardcode geek.

Now that the warning’s been issued:

I finally decided to take another swing at OpenID. Specifially, the WordPress OpenID plugin. It just wouldn’t work on this site (Dreamhost doesn’t have the GMP library installed, and the fallback method failed to work). This didn’t bother me in the past, but it finally got to the point (again) that it bothered me that it didn’t work. I think the last straw was when I tried to sign into filttr.com.  So Google to the rescue!

It took a while, but eventually I came across a blog post from someone with a Dreamhost account, who described how to compile a custom PHP5 with GMP support. And that article pointed to a page on a Dreamhost support wiki (imagine that) that had shell scripts which were supposed to handle most of the heavy lifting (compiling the dependencies first, for example).  Trouble is, I ran into a couple of problems with the automated scripts, so here are the changes that I made (which, incidentally, worked):

First, the scripts delete everything in ${INSTALLDIR} when they run. That means they also delete the GMP library that you may have just gone to the trouble of compiling and installing.  Three options here (I chose the 2nd):

  1. Comment out the line that reads rm -rf ${INSTALLDIR}
  2. Re-run the “make install” step of the GMP installation instructions, in another terminal, after the first script has started compiling something else. Just make sure you do this before PHP starts compiling.
  3. Hack the scripts even more than you already have, and add in the step of compiling libGMP.

Next, cURL wouldn’t compile because of a shared-library error in libssl (from OpenSSL). The specific error was:

/usr/bin/ld: /home/HOMEDIR/php5/lib/libssl.a(s2_clnt.o): relocation R_X86_64_32 against `a local symbol’ can not be used when making a shared object; recompile with -fPIC
/home/HOMEDIR/php5/lib/libssl.a: could not read symbols: Bad value

To fix that, I added “–shared” to the pre-compile config command for openssl; that ended up looking like

./config –shared –prefix=${HOME}/php5

after that, almost everything else compiled properly (although I had to compile OpenSSL twice, probably because I screwed up the source dir at some point during my first attempt; deleting the entire source dir and re-extracting everything let the compile succeed).

Except PHP, initially. PHP 5.2.6 is pretty old, and I neglected to update the version information in the download script (also, I think php.net may have changed their download process).  So I downloaded PHP 5.2.10 direct from php.net with wget, extracted it to the appropriate location, and updated the compile script to reference the new version.

Oh, and be sure to update ${DOMAIN} in that script as well; otherwise, the install portions at the very bottom won’t work quite right (or even at all). Also, note that at the bottom of that wiki page (below the “other alternate script”), there are some addenda that need to be added to your .htaccess file; don’t forget them if you plan on customizing your php.ini file.

Of course, there are drawbacks to having my own custom PHP5 installed. I’ll have to keep up with upgrades and security updates myself, and recompile whenever any changes happen. But I consider that a small price to pay to get what I wanted.

Sewing for Guys: Project Equipment – The Pattern

I got a whopping 24 hits on part 1 of this series, which was still about 5x as many hits as any other post I’ve made, so here’s the next part. I decided to start doing one item at a time, because I lack the attention span (on the weekend, at least) to write about 10 different tools. So for the next few posts, I’ll be talking about things that are required for most projects, but don’t count as “basic equipment”.  Basically, these will be things that you’ll need to get for each project which will be specific to what you’re making, as opposed to “pantry items” like shears and a tape measure.  This post focuses on the pattern itself.

Continue reading Sewing for Guys: Project Equipment – The Pattern

Wait, Yellow What?


Ketchup BottlesThis morning, I made homemade ketchup for the second time ever. And it turned out pretty good.  The bottles (pictured to the right) are cooling on the counter right now.  Once they’re done (I just heard one of them pop), they should be shelf stable, if left unopened, for at least 6 months, probably longer.

This originally came about because I wanted to give my dad something unusual and hand-made for Christmas last year. He ended up getting a bottle caddy with two bottles of homemade ketchup, a bottle of homemade mustard, and a bottle of unique steak sauce that I doubt tasted any good, but sounded like fun at the time. I had lots left over (like, one of the 12-oz bottles you see in the picture, plus an entire one-quart Stor-N-Pour®, plus a bit more. I just opened the last bottle about a week ago. I really like it; it’s got an interesting twang to it, making it taste more like a steak sauce than ketchup (yes, I know ketchup can be used as steak sauce). Probably because I ran out of red wine vinegar the first time, and had to substitute some cheap balsamic vinegar instead. But it still turned out excellent (and I do prefer it over any other processed ketchup that I’ve ever eaten).

This time, I was at Central Market over the weekend, and saw that they had yellow tomatoes on sale for $1.99 a pound.

Yellow Tomatoes

So I decided I’d try to make yellow ketchup. And it turned out OK. It’s not actually yellow, more of a dull brown color, but it’s still pretty darn tasty. I may end up having some tonight with dinner (burgers and fries, I believe).  If you read my previous post, you know that I decided to try making this batch according to the recipe presented by Jamie Oliver, rather than using the printed recipe from Food Network.  Here’s my observations on the difference:

I liked not having to find, buy, and chop fennel bulb. It probably made for less to strain out at the end as well. I also liked the shorter cooking time: when I cooked the last batch, I think I was in the kitchen for about 6 or 8 hours, waiting for things to reduce. This time, I started cooking at about 10:00 (after I bought and cleaned some bottles), and capped the last bottle just before 1:00. And that included a “Heather, can you stir this for me every 10 minutes or so, while I run to Chipotle for lunch?” I think that if I’d taken the tomatoes that I simply chopped, and instead made Passata out of it, I might not have had quite as long to wait for the sauce to thicken. But then I would’ve spent a couple of hours making passata, so I’ll call that one a draw. If I’d substituted white or yellow onions for the red onions in the recipe, I might’ve gotten a brighter color that was closer to yellow than brown. And if I could find a way to use a different vinegar without substantially modifying the flavor of the finished sauce, that might also add to the color.

All in all, I think it turned out just fine, and now I’ve got some ketchup to keep and eat, some to give to Dad for Father’s Day next month, and some to inflict upon give to my friends.  The full recipe, for those interested, is below the fold.

Continue reading Wait, Yellow What?