Thursday, March 26, 2009

Tapping Maples

I tapped a maple tree yesterday, after finding a tap in a Montreal restaurant, and a little bit of web research. So many questions - is it too late to tap, is it actually a sugar maple, will tapping hurt the tree, and will local teens vandalize the equipment? I felt ever so foolish drilling into the tree (3/8" drill, two inches deep, pointing slightly upwards at about waist level), hammering the tap into the hole (firm strokes are required - don't worry, the tree can handle more than you can dish out), and hanging my home-made pail (a two litre pop bottle with a hole cut at the top - slides right over the tap with no need for a lid). But it was all worthwhile when the sap started flowing.

Managed to collect about about two litres of sap on that first day.


Tuesday, March 24, 2009

Programming an ExpressVu 3100 to talk to a Sony VCR

I'm trying to teach my ExpressVu 3100 Satellite Receiver to talk to my Sony VCR, so the receiver can tell the VCR to record shows for me.

The documentation and the online help tell you to first program your remote to work with your VCR, by trying a number of code numbers, and then to use that same code to program the receiver. For my Sony VCR, the list was 500, 501, 502, 503, 504, and 629. Not surprisingly, it was the last one that worked.

Didn't work for the receiver though. Ran the test a bunch of times, moving the VCR around, just in case something was blocking the IR signal. No dice.

Finally I give up, and contact a helpful Bell technician (Claude) through chat support. It turns out the receiver might use a different code than the remote. Exactly the opposite of what it says in the manual. In my case, 500 worked just fine in the receiver.

Thank god for smart technicians.

Connecting svn checkins to Campfire (under Windows)

We use campfire for office communications, and wanted hear from subversion (our source control repository) whenever a checkin happens. There's a great article by David Naffis at Intridea describing just how to do this, but unfortunately their solution is aimed at linux.

To get the same magic to happen on Windows:
  1. Install ruby if you don't already have it. Instant Rails is a fairly easy install.
    (i) Download version 2.0, or look here for the latest build.
    (ii) Unzip that download wherever you want it to live - I chose C:\InstantRails-2.0-win because that was the default name. (Note that Instant Rails doesn't like spaces in their file names.)
    (iii) After you download it, run InstantRails.exe from the root of the package. (On my system, this was C:\InstantRails-2.0-win\InstantRails.exe.) This configures all of the instant rails package, including some stuff we don't need, like apache and mysql.

  2. Install Tinder.
    (i) I downloaded tinder-1.2.0.gem from rubyforge - check for a more recent version here. I copied the gem file into C:\InstantRails-2.0-win
    (ii) Open up a command prompt. (Start|Run|cmd)
    (iii) Switch to the InstantRails directory. (CD C:\InstantRails-2.0-win)
    (iv) Run "use-ruby.cmd". This will add ruby to your path.
    (v) Run "gem install tinder-1.2.0.gem". This will take a little while.

  3. Create svn-campfire.rb as described in Intridea's post. I copied their text into C:\InstantRails-2.0-win\svn-campfire.rb, and then I removed their code at line 17 which read:
    project = ARGV[0].gsub("/home/user/svn/", '')
    and replaced it with
    project = '/svnrepos'
    This could also have been "project=ARGV[0]".
    I also replaced the login info with a local account and password, and replaced line 7 which read:
    campfire = 'campfiresubdomain'
    campfire = 'campfiresubdomain', :ssl => true)

  4. I tested svn-campfire.rb by running
    C:\InstantRails-2.0-win\ruby\bin\ruby C:\InstantRails-2.0-win\svn-campfire.rb /svnrepos 1000
    (Where svnrepos is the name we use for our svn repository, and 1000 was a random checkin number.) There may be some debugging required here - especially if you mess up the login information in the Have fun!

  5. I then added
    C:\InstantRails-2.0-win\ruby\bin\ruby C:\InstantRails-2.0-win\svn-campfire.rb "%0" "%1"
    to the post-commit.bat file in C:\svnrepos\hooks\post-commit.bat. (Your batch file will probably be found elsewhere, so figure it out;) If you don't have a post-commit.bat file, then you will create one. (Note that the %0, %1 parameters are different here than on linux, which would use $0, $1.)
And that's all it took.

(In this author's opinion, this installation process is a nightmare, and should be easier. But on the plus side, at least you can do it. Thanks for the helpful article, David)