Archive for the 'Chat' Category

Updating rubygems memory problem

October 18th, 2008 by pyrat

This is old news, but if like me you are updating an old rubygems installation because it is sucking up memory when you are installing stuff, the following upgrade command will work for you.

  sudo gem update --bulk-threshold 10009 --system

Apache SSL Configuration

October 15th, 2008 by pyrat


Chevrolet Apache

Little example config for SSL on a server running mod_rails (passenger).

  <VirtualHost 222.111.143.223:443>
    ServerName www.website.co.uk
    DocumentRoot /var/www/apps/website/current/public
    RailsEnv production
    SSLEngine On
    SSLCertificateFile /etc/apache2/certs/website.crt
    SSLCertificateKeyFile /etc/apache2/certs/website.key
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
  </VirtualHost>

Who is this man?

October 9th, 2008 by pyrat


Can you tell me who this is?

The Dog Story

September 28th, 2008 by pyrat

Written after some whisky so grammar isnt the best.


The following dog

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.

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

Summer Skiing

June 7th, 2008 by pyrat

My mate Per Arne Troset attempts to ski across a lake.

Apologies for the swear at the end. I am not normally like that.

Web Designers should do their own CSS

June 6th, 2008 by pyrat

Something I have believed for some time has been put into words by DHH. Last three posts have all be 37Signals related. Makes me look like a bit of a fanboy. Dont care tho, its good stuff.

Web Designers should do their own CSS

Dinnae Hammer ur Webserver for Movies

May 23rd, 2008 by pyrat

Samson.jpg

Ive recently got me a samson audio microphone complete with pop filter for recording screencasts for oentries. As a side note screencasting for the mac is pretty good for explaining how to make screencasts on the cheap.

After making your screencast, they are a considerable size. Theres no point hammering your wee vps or shared server delivering this content. Its a better plan to rely on Amazon S3 to do this for you.

A quick easy way to do this is to get the s3fox firefox extension to upload your media files. Its pretty good but still a bit flaky.

  • Create a new bucket (you need to do this through command line api)
  • Go into S3 Fox open the bucket and upload your files.
  • Right click on the files and set them to be publicly viewable.
  • They are now available on http://s3.amazonaws.com/[bucket_name]/

Now your app webserver can sleep happy and spend its time dealing with app requests.