Descent of the Col de Vars

September 18th, 2008 by pyrat

Wee video of part of a col descent. Strapped my camera to the front of my bike. Maybe you can see it at the beginning in the reflection of my shades.

Thonon to La Clusaz

September 5th, 2008 by pyrat

The Thunderstorm

About 7.5 hours cycling in torrential rain. Very different from the day before. It was raining hard when i woke. I hid in the hotel like someone sheltering from a bombing raid. I shouldnt have bothered.

Off i went out of thonon then 15 mins later realised I forgot my helmet. Take 2.

Up the first ascent of the day the col de …….. it was raining as hard as it can. Soaked to the skin by the top despite goretex then a bit cold in the wind. On the descent the rain was too much for the cyclecomputer and its died on me… no clock again.

Specialized sucks.

In the valley I was cold so barged into a restaurant and got changed into dryness. Two croisants as prep for the col de la columbiere at 1610 metres.

Easily the hardest ascent I have ever done on a bike. The torrential rain storms did not help. Made it to the top pretty tired and wet again but managed to blitz some of the supported buffties on the way up. (where you pay to have them carry your bag)

Then had coffee and crepes at the summit restaurant along with the rest of my food; Then a long descent in the rain..

I thought that it was all downhill to la clusaz but it turned out it way on the way up the next col!! Got to la clusaz and finished my water then found out that the youth hostel was even further up the next col.

Got there at 1910 hours, a pretty tough day; Food was ace although hostel was devoid of life; Went to bed exhausted; to the sounds of intensly violent thunderstorms.

Geneva to Thonon les Bains

September 5th, 2008 by pyrat

A walk in the park

Changed the bad cycle computer for a new one. 30 mins to fit it then it was nice and shiny which cadence and all that jazz.

Stopped on the way out of switzerland in hermance for expresso in the sun. Stopped off at another wee place as well for some photos of lake geneva.

Ass is sore due to substandard cannondale saddle, replaced with a new one;one one hour fifty Mins cycling so spent a lot of time chilling and doing tourist stuff.

First big alpine day tomorrow. The french generally have big noses and speak little english. Its off season so all is very quiet..

Geneva to Nice (The Beginning)

September 2nd, 2008 by pyrat

In 2 bike bags I have the following stuff.

duct tape

inner tube

hex keys

puncture repair

pump

brake blocks

screwdriver

2 water bottles (litre each)

shorts x1

lycras x1

helmet

sunglasses

bike gloves

gloves

sun tan stuff

windproof jacket

waterproof jacket

2 buffs

lycra booties

cycletop

waterproof trousers

pants x1

boxers x2

trainers

tshirt

small towel like a rag

lightweigth leisure trousers

sawn off toothbrush

washing stuff

toothpaste

inhaler

camera

phone

mp3

credit cards

bike lock

wee book

passport

maps and route info

acc details

compass

first aid

penknife

I took the overnight train to Oslo from Trondheim. Snorers galore drove me to the all night bar on the train. Next took the plane to Geneva, very warm when I got off the plane.

Cruised to the youth hostel after painstakingly building my bike from its ziptied deflated state.

Went to a bike shop and purchased a cycle computer which is bust. Pumped up tyres also as 120psi on a plane is a recipe for BOOM.

Went to a nice french feeling cafe called cafe remar and had an expresso. Maccys from dinner with lake geneva for a view. Lovely relaxed vibe here, must come back with Helen some day. People were swimming in lake geneva.. it looked so nice.

So the cycle trip starts properly tomorrow; will sort out cycle computer and get on the road. Relatively short starter day along the coast of lake geneva. Cant wait.

wee_lightbox rails plugin

August 6th, 2008 by pyrat

Overview

This is a packaged version of lightbox for viewing images on the screen in the popular lightbox design pattern. The plugin includes some view helpers and an automatic install script to make life easier.

Please refer to the lightbox docs for more info. Included are some rails helpers for easy integration into your site. The lightbox javascript is slightly tweaked to configure the location of images and increase the speed of resize.

You can edit lightbox.js to further tweak these if you wish.

Install

If you install from github with rails 2.1+ it will install the files into your public directory. If you install with another method, you may need to issue a recursive copy command manually.

Also this install script is untested on windows.

Usage Example

In your layout add the following in the head section.

<%= javascript_include_tag :defaults %> 
<%= yield :page_includes %>

In your template:

<%= load_lightbox %>

For each image that you would like to make a lightbox to

<%= lightbox_to('/images/small.gif', '/images/large.gif', "Tasty image caption")

If you want to have more than one lightbox on a page and have the lightbox operate with a slideshow between images..

<%= lightbox_to('/images/small.gif', '/images/large.gif', "Tasty image caption", "group_name")

Where group name needs to be the same for all images in the slideshow.

Github project page

Wee Date Picker Rails Plugin

July 18th, 2008 by pyrat

After a bit of a sabbatical here is another plugin for you to feast on.

This is a super simple datepicker for your rails apps. It is essentially just a packaged version of DatePicker v2.9 by frequency-decoder.com with rails helpers for easy integration.

Install

If you install the plugin using git the installer should run and the files will be copied across recursively to your public directory.

Example

In the head section of the layout.

<%= yield :date_includes %>

In the template.

<%= load_date_picker %>

Then for each date field you need to do the following. Remember: field_names have to be unique on your page.

<%= date_picker :start_date, Date.today %>

Where the first argument is the field_name and the second is the initial value. This must be a date object.

This is a tiny plugin which needs a bit of work but hopefully it helps. It is available on the github project page

Update: I wrote the installer script myself.

Rails Gotcha ActionController::MethodNotAllowed

July 14th, 2008 by pyrat

Turns out that sometimes with Mongrel less than 1.1.5 routes are not being resolved properly with Rails 2.1. (Experienced on OSX)

To fix the problem I upgraded mongrel.

sudo gem update mongrel

Would be nice to know how widespread this problem is. This link talks about this same issue in the comments. The main post is a little confused however.

Orienteering Route Choice with GIS

July 11th, 2008 by pyrat

orienteering map

I read an interesting article on how some students in Sweden did a project on calculating route choice using GIS from an orienteering map.

After reading through it, it looks as if they have been pretty successful. It would have been interesting for them to get runners to run the routes and compare them with a human route choice.

Further down the line this could be interesting if the orienteering map was held in some sort of digital device. It could calculate the optimum route in real time and then use GPS to direct you along this route. Turning super technical orienteering into a string course that take the optimum route with respect to contours, terrain run-ability and road options.

In the coming years it will be a challenge to maintain the challenge of orienteering with advances in navigation technology. Formula 1 restrictions will no doubt come into force.

Read the article

Patching with Git

June 27th, 2008 by pyrat

Git is hard; but powerful. A wee bit of command porn for you for contributing with open source projects.

When sitting in a branch you have been working on for a new feature / bugfix which was created with the command:

git checkout -b cool_patch

To create a patch for the master branch which is a remote tracking branch for a read only git repo. Typically, this is an open source project which you cant push to therefore you need to patch.

  git format-patch master --stdout > ~/patches/patchname.diff

Now you can create a ticket on the open source project with your patch.

-||-

To load a patch, its good to do it in a new branch.

So a workflow to applying a patch is as follows

  git branch master
  git checkout -b new_patch
  cat ~/patches/patchname.diff | git am

You can then check you are happy and when you are. You can merge back into master by committing the branch changes then switching back to the master branch and merging your

  git add .
  git commit -a -v 
  git branch master
  git merge new_patch

Please correct me on any glaring errors you see. Im pretty much making it up as I go along.

Add users to groups

June 24th, 2008 by pyrat

  groups deploy
  sudo usermod -a -G www-data deploy