Friday, March 26, 2010

My first monetized video

Youtube's ContentID system flagged one of my videos to have 3rd party content. Well, yes that's correct. I didn't expect them to pick up content based on less than 40 seconds of ABBA music, but oh well. Contrary to times before ContentID, the video now has ads, instead of just being blocked.

I can live with that, though I'm not getting paid for any clicks on these ads.

Saturday, March 20, 2010

Kitchen cabinets gone, part 2

All the remaining old kitchen cabinets are now on the patio. Removing everything went at a fairly steady pace. Now on to cutting everything into pieces, small enough to fit into the car later, and making a neat stack on the patio for now.

Friday, March 19, 2010 only supports Internet Explorer? - bah

As much as I like it to be able to schedule a city inspector for our kitchen work online, I'm annoyed by, the official city web site for all things around permits.

At first this all looks nice (if not somewhat outdated), and mostly works just fine. You can look up previous permits for an address, even apply for permits for simple projects, and schedule an inspector. At the top of the home page is this little note:

Welcome to San Jose Permits On-Line. This site provides a comprehensive menu of development permit services.
Permits On-Line has been tested for functionality on the IE browser platform. Other browsers may work but are not supported.

So the Capital of Silicon Valley doesn't care about any alternative browsers. This becomes perfectly clear when you actually try to set up an inspection. After working through a multi-step process the final submission of the form fails, because some JavaScript is unable to parse out whether there are any checkboxes selected for the type of inspection.

Mind you, this doesn't work on Mozilla Firefox, Google Chrome, nor Apple Safari. I don't have a Windows computer to run Internet Explorer on, and I don't want one.

I eventually got through that step by cheating and use the Windows Citrix service at work, accessing a virtual Windows instance with IE8.The alternative would have been to call up the building department and schedule over the phone.

I complained to the city about this, no response yet, but given the current budget troubles I'm sure they are already happy to keep this working as is.

They did respond after a couple days, basically saying to call them and schedule over the phone if the automated system doesn't work for me, or suit my needs.

Talheim switches now on control panel

Last night I finished up the connections for the servo-controlled switches in Talheim on the control panel. It was quite painful since I apparently mixed up the anode and kathode of a few LEDs, so I soldered connections, then had to unsolder, clean up, retry. Every iteration meant I had to carry the panel and controller board from the work bench to the layout, connect everything, power up, test, power down, disconnect, carry back, ...

There are some disadvantages to not doing this in place.
After a little while I got into pipelining mode, connecting only the power leads and push-button switch for one track switch, hook everything up, QA the previously soldered LEDs, try out which way around the LED leads need to be soldered, then carry everything back, finish up the soldering, and half-start the next one.

There are two more servo-controlled switches left to do that are not yet installed, as well as building the layout connection for all the old Maerklin snap switches, so I can control hidden staging and all ramp switches from the panel, too.

Overall, this is a ton of work, and I'm not really sure it's worth it, though I *really* like the tactile feedback from the push-buttons, and seeing the direction of the switch points indicated by LEDs on the panel.

If and when I get to building a control panel for Emsingen, I will revisit my approach and decide whether I go with a home-made panel, or something more fancy.

Monday, March 15, 2010

control panel making progress

Last fall I started working on the control panel for staging and Talheim. While I want all switches to be computer-controlled, I also want the ability to press a button on a panel, see the switch points move along with LED indicators on the panel. As early as being a teenager working on my Dad's layout, I loved the chapters about building custom control panels with feedback indicators in Bernd Schmidt's books. I must have read "Maerklin Bahn&Landschaft" a dozen times or more. Still have it, and even though the wiring instructions are not quite up to the times anymore (he wrote for analog AC wiring), the general ideas are as applicable then as they are today.

So, work and other projects don't leave me a lot of time, but last night my little control panel finally successfully threw the first switch.

The panel is made from a lexan sheet with holes drilled for buttons and LEDs mounted in a wooden frame. Buttons and LEDs are soldered to a bunch of cables that connect the panel to the "decoder board". Originally I planned to solder those cables to DB25 plugs so I can disconnect the panel from the decoder board easily. After soldering 150 connections just for the cables to the panels, and another 100+ for the first round of DB25 plugs I dropped that idea and revised the design to hardwire the cables between decoder board and panel.

Why use a separate board to mount the decoders you ask? Space constraints. I don't have a lot of room between laptop, Intellibox and the layout to install a panel in the first place. Furthermore, since I want to be able to run the layout with two operators, I need to fit two people in the rather small space left in the room. Every centimeter counts, so the panel itself is quite compact, and I mounted the Digitrax DS64 decoders (which replace the amnesiac ESU SwitchPilots I'm using for hidden staging) on a sheet of plywood that will be installed under the layout. That decoder board and the control panel are now permanently tied together by eleven 10-connector cables.

The reason for making this removable is that I can wire the decoder board on the work bench. Soldering is soo much easier when you sit on a stool than crouch on the floor under the layout.

The connection to the layout still goes through DB25 connectors. One DB25 plug for the Tam Valley Depot servo decoders. Two DB25's for the DS64 snap switch connections. Those wires will feed into a bank of 36 euro-style terminal connectors ("Lusterklemmen") for easy disconnect and wiring on the layout.

I need to solder the two remaining DB25 plugs for the snap switches, and the remaining  fascia boards for the servo controlled switches. Another 200 or so solder points left ...

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 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$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 :
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 [R=permanent,L] 
RewriteRule ^/blog/(.+)\.html$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.