This year in open source

December 23rd, 2011 by pyrat

Tame deer above Glen Brittle
Tame deer above Glen Brittle

So the year is coming to a close and I’d like to communicate some wee open source tools I’ve been working on this past year.

Below is a list of open source tools I have released recently. I would not go as far as to call them open source projects as there is rarely anyone involved in these projects apart from me. I learnt at frozen rails that its great to get involved with other peoples open source projects instead of going out on your own all the time. (something I have a habit of doing.)

If anything here catches your eye, or you want to use it, get involved.

Chef Cookbooks

I have been building a fair amount of server infrastructure lately and have been using the excellent chef tool to help with this.

Along the way I have released a few cookbooks which I have extracted from the work I have been doing. These are in a relatively rough state but do work and are in production use. If you want to help me improve any of these, please go for it.

chef-squid
chef-oh-my-zsh
chef-ipcoffeetables
chef-backup
chef-locales

Deployment recipiez

I have been doing a lot of varied application deployments, all with capistrano. For the last couple of years I have been maintaining a collection of customs scripts which I was including in each project. Versioning was becoming difficult and git submodules are not an amazing workflow.

With bundler its possible to manage dependencies well and it can be used outside of rails projects. Recently I have been writing messaging apis in NodeJS and deploying quite successfully with capistrano and a few setup scripts.

With recipiez its possible to setup a node deployment with upstart, nginx, logrotate and monit. This creates a nice “production ready” environment for deploying node apps.

I have packaged it up and released it as a gem. Instructions for use are in the Readme.

recipiez

OpenSSL Extensions

This is a library written by Nathaniel Bibler of Ruby5 fame. I have used this extensively in an SSL certificate reselling app I have been working on which has not yet seen the light of day.

This library was my first github pull request success. Where you open a pull request, discuss the change with the author, make a few alterations, then it gets merged upstream!

openssl-extensions

Wee Flickr

This is a little sinatra app which is meant to get deployed to heroku. It allows me to include images in blog posts very easily and give me a little textile snippet to paste into blog posts.

This scratches a very specific itch but is a example of a sinatra app communicating with the flickr api. It also has a random image function which give a random image from your flickr stream. This is used on my random flickr desktop script which I use at work.

wee_flickr

Solon

This is a gem for integrating with sage pay server. It lacks the standard api of activemerchant but as the service is offsite it doesnt work that well with the activemerchant api.

Using it might help you if you are doing a sage pay integration within a rails app.

solon

Merry Christmas!

Skinning in front of Store Vengetind
Skinning in front of Store Vengetind

DIY Campervan

December 16th, 2011 by pyrat

Vanny in Fontainebleu
Vanny in Fontainebleu

In the spirit of DIY with the likes of the haute route post , here is a description of the DIY Campervan we created last summer.

Helen and I went on a trip to France this summer past, starting in Nottingham and finishing in Inverness after a nice tour of France and parts of the UK.

Wild camping is banned in France along with a few of the other central european countries. Meaning that if you want to be ‘out in the nature’ you need to stay in a campsite or hotel.

However, there is a big campervan culture in France which means that campervans are accepted all over the place and there is a network of aires which provide essential services such as water and waste disposal.

The downside of campervans is that they are very expensive to buy and hire .

Famous refuge and gash
Famous refuge and gash

If you want to spend time in the alps or the pyrenees a good way to do it is with a DIY Camper™

There are some amazing Van conversions out there which take a lot of time and money to create. This is not one of them. This conversion can be done for minimal funds and in a couple of days.

Vehicle

Buy a van, max 2m high as this means you can park in regular car parks. Features to look out for are low mileage, ply-lined, carpeted. without bulk head, turbo diesel, side and back doors. Buy something which has a decent resell value as you will likely want to sell the van on after your trip.

As of 2011 £2000 would be a good budget. We started with a Mercedes Vito electricians van purchased from Autotrader vans.

Post training lunch in the heat.
Post training lunch in the heat.

Sleeping

You can pick up an IKEA sofabed for about £100, this acts as both a sofa and a bed! Jobs a good un!

High altitude camp spot.
High altitude camp spot.

If you have more time / expertise an mdf sleeping platform design is far superior as it allows you to store luggage underneath the sleeping area when you sleep.

Mods

Solar Shower in Action
Solar Shower in Action

  • Inverter for a DC power supply (Laptop and Mobile) – sourced from Maplin.
  • Large water container. You need a lot of water storage as often days can pass without water. – sourced from Decathlon.
  • Solar shower. A large black back with a nozzle attached was excellent for cheeky washes. – sourced from Decathlon.
  • Seat organisers, these clip onto the back of seat.
  • FM transmitter, good way to listen to Ipod / Phone in the car without modifying the stereo.
  • Screw hooks on the ply lining for organising stuff.
  • Cooking was done outside with an MSR Whisperlite International stove running on petrol.
  • Take a basic tool kit for repairs. Our main issue was the back section of the exhaust needed tied onto the chassis for most of the trip. If you get a good van you will hopefully escape mechanical issues.
  • Curtains for the back doors with velcro attachments. Well made by Mrs Palmer.

Tips

  • Use the aires in villages for services (but buy something in the village!). You can also sleep in them as well.
  • When driving long distance we split the driving and did 2hr efforts, which can be maintained.
  • The pyrenees is a lovely area.

4x4 intervals followed by Barbeque
4×4 intervals followed by Barbeque

Random Desktop Background Flickr Mac

September 16th, 2011 by pyrat

Recently I wanted to change my desktop pic randomly and use flickr as a source. The currently working solution (a bit dirty) as it stands is as follows.

Every half an hour a cronjob runs which runs the following script.

change_desktop.sh

  #!/bin/bash
 
  utime=`date +%s`
  file="/tmp/#{$utime}.jpg"
  curl -L http://weeflickr.heroku.com/random_image > $file
 
  /path/to/change_desktop.rb $file

It makes a call to the wee flickr app which redirects to a random photo from your photostream. (Chooses a random set, then a random photo within that set.) This file is then saved to disk and is passed to a ruby script.

change_desktop.rb

  #!/usr/bin/env ruby
 
  # Author: Alastair Brunton
 
  require 'rubygems'
  require 'appscript'
 
  include Appscript
 
  file_path = ARGV[0]
 
  app("Finder").desktop_picture.set(MacTypes::FileURL.path(file_path))

This ruby script uses
rb-appscript
to link into apple script and change the mac desktop background.

Note: This has only been tested on snow leopard and the scripts are currently pretty brittle.

The random flickr photo functionality is available from wee_flickr photopicker.

You also need to delete the /tmp photos now and again so I have a little dirty cron that runs once per day.

  #!/bin/bash
 
  cd /tmp && rm *.jpg

Danny Macaskill – New Vid

August 16th, 2011 by pyrat

The latest in amazing trials riding! source: Steev

Art of Flight – Trailer 2

August 7th, 2011 by pyrat

Another amazing trailer for the next ‘travis rice film’ due out on September 7th!

Wee Flickr Photopicker

June 6th, 2011 by pyrat

008_7
Orienteering Flag

This is a little tool for embedding flickr images on blog posts. For some reason flickr makes this hard to achieve through the web interface so this little sinatra application solves the problem.

This may be a violation of the flickr terms of service, so you might want to remember to credit flickr on the blog posts.

This app is designed to be deployed to heroku.

Steps to deploy

  • git clone git://github.com/pyrat/wee_flickr.git
  • sign up for heroku account (heroku.com)
  • (sudo) gem install heroku
  • edit FLICKR_USERNAME in app.rb to yours
  • commit change locally (git commit -v -a)
  • heroku create [your app name]
  • git push heroku master

ALL DONE!

If you click the paste board a textile snippet is copied to your clipboard. It assumes that you are writing your blog posts in textile! And this can be pasted into your blog post.

You may want to use this tool as a base for a markdown or plain html embed code system.

Source is on github, wee_flickr

Lyngen Alps Splitboarding and Skiing DIY plus Video

May 31st, 2011 by pyrat

Chris looks out to Sea
Chris looks out to Sea

I spent easter in the Lyngen Alps area of Norway, this alpine landscape has seemingly endless possibilities which are untapped by the masses. It is difficult to get to, in a foreign land and the peaks are relatively extreme.

Here are some tips for doing it yourself on the relative* cheap.

*It is Norway afterall.

Getting There

Take a flight to Tromsø, sas and norwegian fly there. You will most likely be flying from outside Norway, take a flight to Oslo first then there are direct flights to Tromsø from there. There is also apparently a direct flight from Riga (Norwegian sun seekers flight), so if you can get there it can be a cheap option.

Transport

Looking up Tomasrenna and Lakelvrenna
Looking up Tomasrenna and Lakelvrenna

Lyngen has been made famous in the international skiing community by the lyngen lodge with stories of skiing direct to and from the boat! This looks like an excellent holiday which you should for sure do if you can afford it. They also seem to spend a bit of time in Kafjord (across the water from Lyngen) which can sometimes have better snow.

In reality, most of the big, famous peaks are best accessed by car. So hiring a car from Tromsø is likely the best plan. The regular suspects of Avis, Sixt and Hertz operate from there. Shop around.

Accomodation

MIT Fablab and Koppangen Brygger are two good places to stay. (I have stayed in both.)

Koppangen Brygger
Koppangen Brygger

If you are looking to go a bit cheaper there is a DNT Cabin and at least one unlocked independent hut in the area (Fastdalshytta). These are like posh bothies, and you need a special key to get into the DNT hut. It is about £11 GBP per night to stay in Jægervasshytta . There are some sweet peaks which can be accessed direct from this hut.

A free option is to go for some camping action. You need to be pretty hardy but there are some good spots in the south west side of the lyngen alps (near Lakselvbukt a bit further south near the alley entrance Ellendalen).

Maps and Guides

Video

Here is a video compilation of our recent trip to the Lyngen Alps for Easter 2011.

Have a good trip if you are going and give me a shout if you have any questions.

Koppangen at Dusk
Koppangen at Dusk

Haute Route – Doing it Yourself

May 24th, 2011 by pyrat

Relaxing after haute route completion
Relaxing after haute route completion

Disclaimer

You should really have been ski touring for a few years, have mountain experience, be able to navigate in the mountains, have glacier experience and be willing to plan a bit beforehand.

If in doubt, hire a guide.

Paper goods

Work out a version of the Haute route that suites your group.

Get a group together

Ideally all of similar ability and maximum 6 people. If possible, go ski touring with the group and meet a few times before the trip to go over plans, shared equipment etc.

Make sure you have the right equipment.

Sort out your equipment beforehand, make sure you have tested everything; make sure your boots are comfortable and dont give you blisters!

Haute route equipment list

Book the huts

Erik Vignettes
Erik Vignettes

It is possible to get email addresses and phone numbers from the Swiss Alpine Club Website attempt to use broken french and book them quite long in advance. It might be worth joining one of the affiliated clubs as this results in cheaper lodgings.

Pick a time to go

We went at the very beginning of April and this was a really good time to go in that the snow was still good and it wasnt too busy on the route. Slightly earlier (maybe a week or 2) would work but you will have to check that the huts are open. Later would also work but you run into issues on the last day with being able to ski out to Zermatt depending on the snow year.

Have a wee bit of leeway in your travel plans

Bad weather may hit when you are on the trip; try to have some extra days in your travel schedule to accomodate this.

Have fun!

Any top tips or questions? Add them below.

Glacier du Mt Collon
Glacier du Mt Collon

Haute Route Days 5 and 6

May 12th, 2011 by pyrat

Pigne D Arolla and Icefall
Pigne D Arolla and Icefall

Day 5 – Arolla, Pas de Chevres to Pigne D Arolla to Vignettes Hut

We had 2 options on this day.

1. Ski direct to the Vignettes hut, same as the guided groups.
2. Rejoin the original route by crossing the Pas de Chevres, climbing the Pignes Des Arolla and then descending to the Vignettes hut.

Option 2 seemed a lot more exciting and the weather forecast was good to we decided to go for it.

Left the old school hotel last with Johan. Bought ski passes for a long poma which saved us a couple of kilometres and a few hundred metres ascent. Cheating?

Skiers on Montagne d Arolla
Skiers on Montagne d Arolla

Roar took a cheeky line up an extra poma and did a sweet traverse to get ahead of us by like 10 minutes. I caught him on the way up the Pas de Chevres and cained all the Norwegians to the top.

Roar and old sun avalanche
Roar and old sun avalanche

Watched the Dix hut being serviced by heli which was cool, it kept swooping over my head at the top of the Pas de Chevres and down toward Arolla. Happy we bypassed the Dix as the guardian had given me an earful for not cancelling in time the day before!

Rigged up a rope and we downclimbed the ladders onto the Glacier de Cheilon. Was fun to get some ladder action with the skis on the back.

Pas De Chevres
Pas De Chevres

We continued up the cheilon glacier in the heat and up to the Col de la Serpentine where the wind got up considerably.

Lone Skiers
Lone Skiers

The Pigne d Arolla stretching out before us and the Mont Blanc de Cheilon behind. This looks like a very impressive mountain and seems to be climbing possibilities and skiing possibilities on it.

Mt Blanc de Cheilon
Mt Blanc de Cheilon

Pigne D Arolla
Pigne D Arolla

The conditions were deteriorating slightly so there was a real feel of commitment and challenge in the air. The steep slope to get up to the Col du Brennay looked quite icy so it was time to get the crampons on and skis on the back and ice axe out.

Felt quite exposed on the way up, here is one of Johan getting buffeted in the wind. (hard to show in a photo!) We didnt think we were going to make the Pigne d’Arolla summit.

Johan on the windy icy section.
Johan on the windy icy section.

We got to the top and started skiing again. Eivind and I pushed on ahead, curled round some crevasses and headed toward the Pigne d Arolla summit. Amazingly the wind dropped as we approached the summit and all were able to summit. There was a guide with one client already on the top and he took some nice photos of us. They had climbed up from the Vignettes side.

Looking back the way we came
Looking back the way we came

View from Pigne D Arolla Summit
View from Pigne D Arolla Summit

Some photo taking, then an amazing descent towards the Vignettes hut. One of the best ski views I have ever had.. snow was a bit wind affected but still an amazing descent. Could have been the best descent of the trip.

Erik, Roar, Alastair, Pigne D Arolla Summit
Erik, Roar, Alastair, Pigne D Arolla Summit

For some reason we were greeting like heroes by the Americans and some of the guides for going the long way round. Was a great feeling to get to the hut and it is potentially the best hut we came across.

Erik Vignettes
Erik Vignettes

Pigne des Arolla descent
Pigne des Arolla descent

Before taking our skis off Johan and I spotted a huge powder bowl down the other side toward Arolla so hit that before retiring to the hut. Really good powder. Johan had left his Thermos in the hotel at Arolla and was seriously considering skiing back to get it. Luckily we managed to talk him out of it!

Glacier du Mt Collon
Glacier du Mt Collon

Most groups were continuing onto the Bertol hut; but we wanted to stick to the classic route so planned to ski direct to Zermatt the next day.

6.5 hours skiing.

Day 6 – Vignettes Hut to Zermatt

Leaving the Vignettes Hut at Dawn
Leaving the Vignettes Hut at Dawn

Excitement was high in the night which meant little sleep and we had an early rise for the ‘biggest’ day of the haute route.

The day started sourly as we lost Roar and Erik at Vignettes due to illness. It would be a team of 4 instead of 6 which was a bit sad. The plan was for them to stay in Vignettes for an extra day; luckily there were 2 places left for them!

Glacier du Mt Collon
Glacier du Mt Collon

Glacier du Mt Collon
Glacier du Mt Collon

We eventually got away from the hut at about 7am, just as it was getting light. A cruisy ski down to the Glacier du Mt Collon and on with the skins for the first of 3 cols. Medium length skin up to the Col d Eveque, passed some groups that were in front of us (we were last to leave again). We got stuck behind a guided group on the way up the skin track. Passed them at the top however and we were in concentration / speed / being ‘effective’ mode as we knew the day was a biggy!

Long line of guided groups to overtake!
Long line of guided groups to overtake!

Skied down the other side of the Col d Eveque, snow was a bit bind affected but nice swooping turns anyway. We then caught up the American group, got a bit of banter with them then passed them on the way up to the foot of the Col d Mt Brule. Got the crampons out again to climb this, my Camp XLC 390 crampons were excellent and was fine with pure aluminium. If going later in the season it might have been a different story.

Col du M. Brule
Col du M. Brule

Col du M. Brule
Col du M. Brule

Col du M. Brule
Col du M. Brule

Pulled away from the stars and stripes and caught up a group of italian stallions all wearing the same closes and using similar skis! A small traverse led us onto the Glacier de Tsa de Tsan were we stopped for a spot of lunch. The climb up to the Col de Valpelline is desceptively long and we worked hard to get there.

Boys up the final glacier
Boys up the final glacier

Eivind and his fishnet thermals
Eivind and his fishnet thermals

Upon arriving we were greeted with an amazing view of the Matterhorn as we left Italy. Time to take the skins off for last time and take some photos.

Me and the matterhorn
Me and the matterhorn

Matterhorn from italian side
Matterhorn (from italian side)

We proceeded to descent the heavily crevassed Stockli Glacier. It wasnt over yet. The great visibility and abundance of ski tracks made it slightly easier but you still needed to watch where you were skiing. It would have been a different story if the weather had been bad and we may have had to ski roped up!

Skiing round some crevasses
Skiing round some crevasses

Johan and Ice
Johan and Ice

Snow conditions on the glacier were excellent spring conditions as it was approximately 1130 am when we skied it. If done too much later in the day I doubt it would have been so fun.

Sweet tele turn
Sweet tele turn

Took the right fork and skied directly under the Matterhorn which was extremely cool. Johan smacked his head on a rock due to rotten snow. The dangers of telemark skiing; wouldnt have happened if his heels were attached! I also wiped out here and my bindings DIDNT release when I came over the top, which is actually just as sketchy really.

We just hit this old glacier in time as apart from a little walk we were able to ski all the way to the afterski at 2300m!

Supposed to take 8:30 to 12 hours in the guidebook. Rando racers could so it a lot faster but we were pretty happy with 6 hours!

We met a dutch group who had skied from the Bertol that day. A tasty celebratory beer was consumed.

Relaxing after haute route completion
Relaxing after haute route completion

We advised the young waitress that when the Americans arrived she was to tell them the Norwegians (and scot) had been waiting for ages and had to ski down!

Band playing at 2200m below matterhorn
Band playing at 2200m below matterhorn

Skied down to Zermatt from here on long cruisy Cat Tracks.

The fun did not end there.

Chez heine for world class lamb, afterski bar, la poste nightclub, climbing rafters and to out delight there being no bouncers, stage dancing.

I had to make it to Scotland the next day nursing a killer hangover but it was worth it!

We made it! Haute route complete!

Sunglass photo
Sunglass photo

Haute Route Days 3 and 4

May 6th, 2011 by pyrat

Day 3 Mont Fort Hut to Prafleuri Hut

Excellent weather again, up early and onto the Col des Chaux, felt strong and did it in one go. A good hard start to the day.

Haute Route 2011
Leaving Mont Fort Hut

Top of Col des Chaux
Top of Col des Chaux

Switched to clothes for warm weather which helped massively. Eivind got his fishnets out, something which an English woman found very exciting.

Towards Rosablanche
Towards Rosablanche

Pushed onto the Rosablanche (3336m).

The slope of the Rosablanche is north facing which meant nice dry snow. Dropped the sack and did an extra round along with Eivind and Johan.

Johan Rosablanche
Johan Rosablanche

Afterwards we had a tasty lunch on top of a rather large cornice (we didn’t realise this at the time) and then wandered up to the top and took some photos.

Rosablanche
Rosablanche

Learnt 2 new Norwegian words, both which translate to bitch.

Next skied all the way from near the Rosablanche summit to the Prafleuri hut. Snow at the top was amazing but it got a bit wet towards the end. Rosti and beer was waiting with the others who got there before us, as our skiing laps took more time.

Johan, Rosablanche Summit
Johan, Rosablanche Summit

You have to be careful about when you approach the Prafleuri hut, as late in the day there is high avalanche risk.

Some guy broke his ski and a helicopter delivered him a fresh pair en route to a helibombing mission. Only in the Alps!

Helicopter Ski Delivery
Helicopter Ski Delivery

A group of plucky Americans arrived late in the day having skied from Trient and an hour or so after they arrived the approach was avalanched.

If you are a strong group I recommend skiing from Trient to Prafleuri in one day if you are doing the Verbier variation, just make sure you keep good time.

Day 4 – Prafleuri – Lac Des Dix – Prafleuri – Pralong – Arolla

Johan and Prafleuri
Johan and Prafleuri

Started early, weather wasnt ideal with snow and bad visibility. However, the main problem was an overcast night meant that the snowpack didnt refreeze overnight. The snow was completely rotten right to the ground and skiing was challenging.

Col des Roux
Col de Roux

All of the guided groups made the decision to turn around, we deliberated for a while but decided to also turn around as it may have not been possible to skin up the Pas du Chat. (It transpired later that a german group without a guide carried on but had to turn around due to snow conditions.) We made the right choice.

We went back the way we came over the Col De Roux to the Prafleuri to look at our options. Apparently the avalanche danger directly below the hut was too high despite the previous days helibombing. Luckily there was a 1.6km disused tunnel under the hut which would pop us out further down the mountain!

Dude in tunnel
Dude in tunnel

There were loads of weird and wonderful ice structured in the tunnel. We walked with some of the guided groups.

The avalanche danger was still relatively high after the tunnel experience. When then relied on the guides to check the slopes and set off a controlled avalanche to evacuate their clients. We potentially would have been faster without the guides (and a swedish prafleuri hut guardian told us about a safer route further to skiers’ right.) but we kept with them.

We finally got to a road but unfortunately this road was closed, lots of large avalanches were funneling into the valley off a huge cliff at regular intervals. To get to civilisation it meant skis on the back and a 6km walk in ski boots to the hamlet of Pralong. Safety!

We eventually squeezed ourselves into a taxi (guided groups had priority) and drove all the way to Arolla. We stayed in the hilarious, ancient Hotel Mt Collon. The food was great, the hotel itself was a blast from the past!

Eivind and his norrona boots
Eivind and his norrona boots

Johan in ancient bathroom.
Johan in ancient bathroom.

Hotel Mt Collon
Hotel Mt Collon