Wednesday, March 10, 2010

.htaccess and RewriteRule

This had me puzzled for a little while, because it was so non-intuitive.

Wolfram's blog was moving from FTP upload to being hosted by Blogger. He wanted redirects on his old Blog Website at http://www.kritzelecke.de/blog/leoslifelog.html for all html pages, while still hosting the images in their old location, since the Blogger migration tool doesn't move them. So we need a redirect that only covers html pages, but not the images, and only for the path that used to host the blog.

My intuitive solution for this was to stick the following into a .htaccess file in the /blog directory:

RewriteEngine On 
RewriteRule ^/blog/(.+)\.html http://blog.kritzelecke.de/$1.html [R=permanent,L]

To my surprise this didn't seem to do anything. Not having access to error logs didn't help.

In the end I recreated the problem on a local Apache instance. At first I thought the .htaccess file gets ignored by Apache. After some searching and eventually reading the docs for mod_rewrite in their entirety, I stumbled over this comment in http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritebase :
As you will see below, RewriteRule can be used in per-directory config files (.htaccess). In such a case, it will act locally, stripping the local directory prefix before processing, and applying rewrite rules only to the remainder.
So the solution was to simply remove /blog from the RewriteRule, since I don't really about path processing for external redirects, and (as icing on the cake) add a specific redirect for the top page.

RewriteEngine On
RewriteRule ^/leoslifelog.html http://blog.kritzelecke.de/ [R=permanent,L] 
RewriteRule ^/blog/(.+)\.html http://blog.kritzelecke.de/$1.html [R=permanent,L]


Of course, this all might be obvious for all you Apache jockeys out there, but I learned something new.


Now on to another experiment whether I can restrict access to parts of my site based on a cookie, with a redirect to a registration page if the cookie is not present while keeping most of the site static html. 

Tuesday, March 09, 2010

Kitchen work scheduled

I'm not good at doing drywall work. Nor do I want to texture dry wall. Nor do I think I'll do a good job with building a box to hide the hole in the ceiling where the neon lights are currently located. Nor do I want to run a bunch of electrical conduit, and set it up in a way that'll pass city inspection.

That's what you pay contractors for. We're on the schedule and they'll start next week with a new sub panel. Over the next couple weeks they'll do the drywall and ceiling, install can lights, run a bunch more circuits into the kitchen to meet current code, and do some light re-piping.

I'll rip out the old cabinets, paint the walls, install flooring, install the new cabinets, and install temporary plywood counter tops as stand-in until the new butcher block counter top is delivered and installed.

If it all works out the worst is over before Easter.

Now I just need to find someone to trade oncall with me, since I'm supposed to carry the pager the same week most of the work happens.

Sunday, February 28, 2010

Taxes Done

Another year, another tax return done. TurboTax Online was as helpful as usual, but my tax situation keeps getting more complicated, as I barely made it through some of the random, occasionally seemingly crazy questions TurboTax had for me.

Overall, the experience was about as pleasant as it can be given we are talking about doing your taxes here...

Friday, February 26, 2010

It's raining hard

I think on TV they call this a "winter storm". It's raining. Quite a bit. And that's good.

Saturday, February 20, 2010

Power outage in San Francisco

There's a power outage in San Francisco. Why would I care?

My DSL circuit is provisioned on an AT&T line, but my Internet service is provided by sonic.net. Sonic's aggregation for the Bay Area is in San Francisco, and the colocation facility had a power outage, which took out the upstream equipment of my connectivity. It's amazing how often data center generator facilities and UPS systems have problems coming online when the mains power goes down, given that's one of the main points for being in a co-location facility in the first place (cooling being the other, and yes, that also goes down more often than one would think).

But again, why would I care about this today? Isn't it great if I forced to do something else than staring at a computer screen?

Well, yes, but I'm oncall this weekend, and Internet connectivity is crucial to do my job. Fortunately, the problem was fixed relatively quickly and I didn't get paged in the meantime.

Sonic has more information on their systems blog. BTW, not many ISPs these days are this open about the small and big problems and outages that do occur regularly in large complex systems.

Thursday, February 11, 2010

Hiking in West Maui

After late breakfast we started the day with a short visit to Iao Valley which was quite disappointing to me, as I remembered it a lot less touristy. However, once we were there it all came back to me, and yes it had looked like this when I was there the last time 10 years or so ago. Tour buses, and lots of ... errm ... seniors. We bailed quickly and drove further north to the Waihee Ridge trail head.

This is a real hike up to the mountain, pretty steep in the beginning, but otherwise not too bad. It's roughly 2.5 miles to the summit. After about 1.5 miles we started to get into the clouds, and I had quite a bit of trouble with condensation on my glasses for the last half mile or so to the summit . My glasses completely fogged up, and I could see better where I was going without glasses..



This was a fun hike, though the definition of fun depended on who you asked.

Wednesday, February 10, 2010

Snorkeling at Kapalua Beach

After breakfast we went snorkeling at Kapalua Beach. The weather was slightly overcast, so light conditions and visibility weren't as good as at Black Rock yesterday, but when the sun was out the colors were spectacular. No sun unfortunately also meant that the water was much cooler, too, (or at least it felt that way). After about 30 minutes in the water I went back to the beach to warm up. Trying to snorkel while your teeth are doing a frost dance in your mouth isn't fun.

After everybody was back out of the water we drove further north to Honolua Bay and watched the surfers. The swell was quite good, surfers were doing their tricks, and the water looked gorgeous from the highway. I might suggest we come back here for snorkeling tomorrow depending on weather and wind.

In the channel between Maui and Molokai there were lots of humpback whales. Some got pretty close to the coast line, so you could see them breathe a couple hundred meters off shore. So overall we got to see quite some action.

Whale Watching and Snorkeling

This morning we went whale watching. It was a nice little trip and we saw a LOT of humpback whales.
They sang. They flapped with their fluke on the water. They breached. During the first half of the trip we got very lucky and the whales came pretty close to the boat. At one time there were about a dozen whales in proximity of the boat. "Blow at 12 o'clock, another at 2, of and there are two more at 8 and 10 o'lock." ... "Woah, did you see that whale breaching at 9 o'clock? Nice!" ... (naturalist on the PA system). I took a bunch of photos and videos, but the photo quality is very so-so, and I don't have the proper means here to make something halfway interesting from the videos. I might post something when I'm back on the mainland.

After a very good cheeseburger Island Style at Cheeseburgers in Paradise, we went Snorkeling at Black Rock in Kaanapali, a few miles north of Lahaina. That was fun. I haven't done this for a few years, so it needed some effort to convince myself it's ok to continue to breathe with the face in the water.
Visibility was not so great, but I saw plenty of tropical fish, and even a big sea turtle. Using a mask with prescription glasses helped a lot.

Tuesday, February 09, 2010

Lahaina, Maui

The flight via LAX to Maui was very long. The service and the entertainment program on United worse than expected. Well, I expected the worse and was pleasantly surprised when one of the stewardesses actually smiled. Since the flight wasn't full I managed to switch to an exit row seat after take-off. I brought food and a good book, time passed, and eventally touched down at the really short runway at Kahului.

I got picked up from the airport and we drove to our hotel in Lahaina. Nice hotel. Nice rooms. Small apartments, really.



Later in the afternoon we went on a walk along Front Street, saw a giant cruise ship, and a nice sunset.

Monday, February 01, 2010

Why you should not leave your truck on railroad tracks

A semi-truck got stuck on a grade crossing in Acworth, GA this morning. Unfortunately, a CSX train was approaching the crossing, and a guy recorded the accident on his cell phone. What I find interesting is how fast the train is still going at the beginning of the video, even though it appears the brakes are already fully engaged, and how long it takes a heavy freight train like this to stop. It finally came to a stop about 300 ft or so behind the crossing.

There's a follow-up video on the same site that shows the front of the train after it pulled back a bit. Looks like mostly minor damage to the locomotive. There were no injuries. The truck driver got out in time, and the sheer mass of the train makes the impact not nearly as bad for the engineer as one might think.

This Youtube video has the dashboard view from the police car seen racing down the street in the first video.

High-speed rail in the US?

A reality? Maybe? Finally?

3 hours from San Francisco to Los Angeles. 130+mph service between Boston and Washington. Less than 2 hours from Seattle to Portland.



After the administrations's announcement last week to spend a ton of money on high-speed rail improvements, suddenly this is no longer a dead topic. Of course, vested interests will fight this tooth and nails, and I have low hope that any of this will actually become truly usable in our lifetimes.

Too bad.

Thursday, January 21, 2010

Lake Washington and Seattle



I really like this view across Lake Washington towards downtown Seattle. On clear skies you can see as far as to the Olympic Mountains on the other side of Pudget Sound. Evening time provides some awesome light this time of year.

Wednesday, January 20, 2010

BNSF Eastside line



This segment of the BNSF line through Kirkland east of Lake Washington was last used by the "dinner train" running several times a week, as well as BNSF freight locals. Due to freeway expansion near Bellevue the line was cut in the middle, and has now fallen into disrepair. I like the rusty look of the rails telling of better times.

Tuesday, January 19, 2010

Before and After

The old row of cabinets:



And the new row of cabinets:

Monday, January 18, 2010

I made it!

The rear row is almost done. The big pullout cabinet (also known as "Apothekerschrank") is in. All the knobs and handles are installed. I even managed to deal with a drain emergency. Our sewer pipe was clogged and required a rooter company to come out and clean. And I made it in time to SJC for my flight to Seattle.

Still missing is mostly window dressing: toe kicks, moulding, some caulking. Some areas of exposed drywall need to be textured. We'll hire that out as part of the lighting project. And there's definitely need for paint on the uncovered walls. But the cabinets are now usable. And I started with this project only one week ago!

I made myself a nifty drilling template for the holes in the doors from an old shelf. Any kind of plywood works for this really. Then put the template on the inside of the door, another on the outside to act as a block to prevent splintering when the drill exits the door and secured this contraption with bar clamps, while carefully aligning the edges of the template with the door. This ensures that the knob holes are in the same place and height for all doors. Worked great for the 10 doors I drilled holes in today. IKEA also sells a plastic drilling template called FIXA for less than $3. I'm likely going to use this for the many drawer and pullout fronts to be installed in the other half of the kitchen.

The 15" pullout cabinet requires the use of a template called "S1184/0404" to mount the cabinet front to the pullout drawers. Unfortunately, that templates was nowhere to be found in any of the boxes. I found a copy of it over at IKEA fans, and resized it in GIMP, so the dimensions in the template actually match reality when printed. I was quite nervous that this won't work, and I therefore would drill holes into a $120+ cabinet front in the wrong place, so I re-checked every hole location before drilling.

One the screw holes was right over one of the cutouts where the hinges normally go. However, I found that the plastic filler piece for those cutouts has a depression at just the right place to hold the screw securely in place. Once I mounted the hardware, I put the pullout drawers with the front attached on the support rails, and low-and-behold, it slid in just fine, clicked in place and was ready for action.

I also installed a 1/2 inch birch plywood board as temporary countertop near the fridge until we install the final countertop.

Oh, and yes, now that I got the hang of how putting together an IKEA kitchen works, I will do the other half of the kitchen in the coming weeks as well. But first we need to arrange a few things, and I need some rest.

Sorry, still no photos online. Maybe tomorrow.

Sunday, January 17, 2010

Kitchen Progress

Another long day. I stopped by OSH this morning to pick up a few parts, and a sweet 12V driver tool made by Milwaukee. It's battery lasted me all day screwing in drawer rails, door hinges, and other odd jobs. While I have a 3.6V driver tool (thanks, Dad!) which is great for the railroad layout, the 12V tool has quite a bit more "ooompf".

Anyways, it took me a while to figure out how these IKEA drawers for the big pantry cabinet go together, but once I got the hang of it, it became really easy. The doors have some snazzy hinges that snap into place on the door, and are very easy to hang to the cabinet frame. I installed all doors with exception of the pull-out drawer cabinet, which will be done tomorrow morning. The fridge is also in it's final place now, and of course Charlie is exploring the new climber's garden.

The annoyance of the day was putting together the modified layout for the microwave/oven cabinet. For one, it took me forever to get the electrical for the microwave routed properly, the cord is just a tad too short to reach the outlet. Then I needed two attempts to build supports for the mounting frame. Once that was out of the way, I could finally measure how much space was left for the oven. Much less than I hoped for. Which left only room for one 9 inch high drawer. Unfortunately, the Stat drawer fronts come in 4 inches and 12 inches only. I mounted the rails into the cabinet but didn't put together the drawer while I wait for an ingenious idea how to fix this in a way that actually looks half-way decent. Hmmm, I could use two 4-inch drawer fronts and mount them on top of each other. Anyways, this will have to wait until Im back from Seattle.

Getting the oven mounted was another heavy lifting action which we worked through with no major damage.

Several people asked for photos. No worries, there will be photos posted here. Stay tuned.

Lessons learned:
  • Careful when snapping together the drawer pieces. It really hurts bad when some skin gets pinched in the process.
  • Go to bed at a decent time and have enough sleep.
  • Cabinet frames installed

    Phew, this was a long day. All cabinet frames are now installed in their final positions.

    Hanging an 27kg over-the-fridge cabinet proved challenging. We managed with some ingenious arm raising mechanism. Think dining room chair, plus step stool, plus wife on top to get her high enough so that she can reach the screws in the back of a 2 feet deep cabinet pretty much just under ceiling.

    Lessons learned:
  • When cutting the rail to hang the wall cabinets measure twice, cut once. It really sucks when you're cutting one inch too short because you forgot to take the cover panel between two cabinets into account.
  • Walls are never straight.
  • A sufficiently strong drill can twist off a screw you're trying to force into a wall stud.
  • Thankfully wall studs are wide enough to allow for a second screw.
  • Make sure your screws are not longer than the hole you drilled for them, unless they are the self-drilling kind.
  • Old laminate flooring on top of two layers of old vinyl is about 1/2 inch thick. No matter how much you wish it, a 95.5 inch side cover panel won't magically fit into 95inch air space in front of the cabinets (due to floor and ceiling lights), even if there is 96inches of vertical space around the cabinets. Cutting off 1/4 inch height is not sufficient.
  • Swearing doesn't make it shorter.
  • Previous owners are idiots for not ripping out the old flooring when remodeling. Come on folks, it's not THAT hard.

    Overall, I think this will come out nicely.

    Tomorrow (well, later today really), I'll start hanging doors, installing shelves and drawers, as well as getting the microwave and oven installed in their new cabinet. That will be interesting, as I'm planning to modify the layout of that cabinet to allow for both microwave and oven stacked on top of each other (29 + 18 inches vertical space), while the cabinet is intended to be used with a 28 inch high oven only (the rest is doors and drawers).

    I need to cut a 24x36 inch piece of plywood to use as temporary flooring in the nook for the fridge so it's level with the existing flooring until I replace the old laminate floor in a few weeks.
  •