Categories
General

Pork and beans

I know what you’re thinking: “Isn’t pork and beans something Yogi steals from overweight campers?” Maybe, but what if you want to relive the teenager experience of eating whatever you want, but want to do it in a way that fits in with your current gourmet tastes? After all, what is cassoulet but high class pork and beans? Let’s make some classy pork and beans!

Preheat oven to 300-ish F. Sauté onion, carrots, celery, whatever you’ve got around in bacon fat. Even better, start by rendering some chopped bacon or lardons and soften the vegetables in that. Add about four sausages. Add a can of diced tomatoes or a couple of tablespoons of tomato paste. Add a regular-sized can of beans, cannellini preferred. Add spices like Dijon mustard, cumin, thyme, etc. Once it’s bubbling, cover and bake an hour-ish. Cut up the sausages into bite-sized chunks and serve.

Update! It’s not exactly pretty, but here’s a photo of a bowl of it:

Pork and beans.

Categories
General

Fixing unserialize() error at offset…

I’m working on an update to flickpress so it’s compatible with WP 3.3. I decided to upgrade to the latest version of phpFlickr, but started getting an error when browsing my favorites, something like this:
unserialize(): Error at offset 3400 of 8999

I tracked it down to a Japanese character in one of the photo titles and unserialize in phpFlickr. It was my fault though: the MySQL table that flickpress was installing didn’t specify a character set. I finally figured out that setting the table’s character set to UTF-8 would make unserialize happy. To do this with dbDelta, WordPress’ handy database table install/upgrade function, I changed my CREATE TABLE SQL to look like this:
CREATE TABLE table_name ( column1 CHAR( 35 ) NOT NULL ) DEFAULT CHARACTER SET UTF8;

To generalize, if you’re getting an unserialize error on data stored in a database, take a look at the table’s character set.

Categories
General

Network interface renamed in Fedora 15

I was trying to get non-NetworkManager networking running in Fedora 15, but kept failing. When I tried to start the network daemon it failed and something about eth0 missing got logged. Finally, I looked more closely at my dmesg output and noticed that at the end of the network section udev had renamed the interface from eth0 to something like p7p2. Changing my networking script to use that instead fixed it.

Categories
General

Tips for moving a domain to a new PS at Dreamhost

I finally got nginx to work with WordPress at Dreamhost, so I’m moving more domains (including this one) over to it. When you edit a domain in the panel at Dreamhost there’s a handy-looking way to move from one PS to another, including moving all of the files. Sadly, I don’t think it’s ever worked for me. Here are the issues I’ve encountered and their solutions:

  • “Site Temporarily Unavailable” after you move a domain, whether you try to move the files or not. Scary! Editing the domain again and saving with the same settings usually works for me, but sometimes I have to do it a couple of times. This is apparently due to slow DNS propagation, so you can also just wait it out. Why DH can’t manage to still serve the site from the old PS is a mystery to me.
  • Failure to move the files. This seems to happen when your domain has a lot of files – like a WordPress install – and the source PS is overloaded. To fix this I just use rsync to sync the files to my local machine, sync those to the new PS, then move the domain in the panel (unchecking the box to move the files). Upping the resources for the source PS would likely work too.
  • Sometimes nothing works. This is when most people would wisely contact tech support. I’m too stubborn for that, so I move the domain back to the old PS and try again later. Oddly, trying again the next day has always worked.
  • If you do use the panel to move a domain, the file ownership can be weird. Fix this by setting up an admin user for the new PS in the panel and using chown.
  • When you change an nginx conf file for a domain you’ll need to restart nginx (sudo /etc/init.d/nginx restart) using your admin user. I think it’s possible to reload the config without restarting using /etc/init.d/nginx reload instead.
Categories
photos

Mast

Ship rigging in Annapolis

Another scan from a roll of T-MAX 100 that I shot in Annapolis and developed in Caffenol.