Archive for June, 2006

Daemonizing Mongrel

Thursday, June 29th, 2006

is the current darling of the Ruby on Rails world, and for a very good reason – it is an excellent server for your Rails applications. Recently I switched to using Mongrel behind Apache running mod_proxy and I’ve had no complaints with it.

Before anyone points it out, yes there were some issues with this server recently but they were caused by mod_mono hogging all the memory, and not Mongrel/Rails. Once I disabled Mono normality was restored.

I did have one minor niggle though. After restarting my server a couple of times during the aforementioned Mono problems I had to restart Mongrel manually. I knew there was a better way to do it, but I didn’t know how. Now I do…

(more…)

Comment test

Wednesday, June 28th, 2006

Move along, nothing to see here.

Using your self-signed certificate with Microsoft Outlook

Tuesday, June 20th, 2006

I’ve been running my own IMAP server for quite a long time now. Shortly after starting to use it I sopenssl pkcs12 -export -in smtpd.crt -inkey smtpd.key -out OutlookSMTP.p12

Why I love to hate The Chemical Brothers

Wednesday, June 14th, 2006

Intentionally skipping the weekend, over the last eight days on six I’ve run 2½ miles per day in an average time of nearly 24½ minutes. This is skewed slightly because the first of the six runs was accompanied by my dog, and I ended running for a total of 32 minutes. If I ignore that result then my average is just under 23 minutes which is much better.

Todays run was completed below my average time, and involved only one stop! When running my circuit clockwise there a flat of about 140 yds then a downhill of maybe 200 yds. I started running my circuit clockwise because when I originally ran it anti-clockwise I hated this hill at the end. It’s better getting it over with at the beginning, but it’s still awkward, especially trying to tackle it with any speed. Today though I treated it as a warm up – I went at an easy pace until I got to bottom, did some more stretching then tackled the rest of the run. I’m not sure if it was because of doing, or general improvement on my part but I didn’t feel the need for a break on the rest of run which is a great progress.

I drove the circuit last night, and it looks like my pedometer is slightly out, but not enough to be concerned about. I’ll correct it at some point.

Lessons learnt so far:

  • Don’t run too soon after a meal. The previous two runs before today were done in the evening about an hour after the family meal. Both times I got a very nasty stitch which I don’t normally
  • Don’t hold anything. I was using my Pocket PC Phone as my MP3 player. Due to it’s size, I had to hold it in my hand, which got very annoying. For the last two runs I’ve used my daughter’s £20 MP3 player that hangs round your neck. Audio quality sucks (as you’d expect from a device with that price) but running is much easier when your hands are free.
  • Choice of listening is important. I started out listening to music, then I switched to podcasts (more on this in another post). Now I’ve switched back to music. I’ve tried various types of music (again, more on this in another post), but the best type I’ve found has been from the Electronic genre. I discovered this by adding Hey Boy Hey Girl from Surrender by The Chemical Brothers to one of my playlists. As soon as the track got going my pace naturally picked up and I pushed myself harder whilst listening to it. I felt I performed much better during that run and it was all down to the music, but boy was I tired afterwards!

Hosting Rails applications with mongrel , Apache 2 & mod_proxy on Debian Stable

Tuesday, June 13th, 2006

About ten months ago I switched from Apache 2 to `lighttpd` for hosting this site. This was back in the day when the only real way to run your rails app was through FastCGI.

Times change and now all the cool kids are using Mongrel or clusters thereof. I tried to get Mongrel running with Lighty, but I gave up for two reasons:

1. The maintainer of Mongrel recommends not to use lighttpd because of issues
2. Whilst ignoring him and pressing on regardless my Lighty install fubar’d and I couldn’t recover it. It just wouldn’t serve any content anymore – dynamic or static

So I decided to swtich back to Apache 2. There are various guides around for hosting mongrel behind a load balancer behind Apache 2.2, but the load balancer isn’t available for Apache 2.0 and there’s little documentation for alternatives. Balancing would be nice, but it’s not my main objective here so I did some more digging and concluded that `mod_proxy` would meet my needs.

(more…)

Insert interesting, pithy title here

Friday, June 9th, 2006

Unfortunately declaring that I was no longer ‘attempting’ running has left me without any ideas of what to use as titles for my ‘runlogs’. I do have an alternative plan in the works though, so you’ll just have to indulge me for now.

Another run today. Practically same time and distance as yesterday. I felt I hadn’t done as well because as well as a couple of (< 10s) breaks I had a couple of very short walks. I think the reason it panned out was because I introduced some Fartlek. Nothing serious, I just made sure that a few stretches were run at a much faster pace than normal.

Overall I’m feeling pretty good – I’m running faster and more consistantly, and I’m feeling (and seeing) the effects. My legs are a bit sore after todays run (more than yesterday or the day before), so I may skip tomorrow to avoid any injury, but I’ll see how I feel in the morning.

Comments disabled

Friday, June 9th, 2006

Ah the joys of running bleeding edge software. It would appear that comments are broken in Typo svn at the moment. I tried a couple of the patches without success so instead I’ve disabled comments until it’s a) fixed or b) I fix it.

If you really want to comment, please email me or use a trackback.

Sixth (and final) attempt

Thursday, June 8th, 2006

Bright blazing sunshine. Hour long lunchbreak. New running shorts. What else could I do?

This post marks the sixth and final attempt to go running. Why final? Because I’m enjoying it enough that I’m no longer attempting it – I’m just doing it.

Sticking to the shorter circuit is paying off. I know that I’ve done it, but I’m not dead after doing it. This meant that I could go the day after my last attempt. I know that’s not advisable, and I probably won’t be doing that when I’m onto the longer runs but I want to make the most of the good weather.

I ran the same direction as yesterday, and the pedometer claimed practically the same distance (just over 2½ miles) although I was quicker today. I still haven’t re-calibrated it – I’m going to drive the circuit (it’s all road based) to see how it compares before I do.

I’ve a now added a few additional items to my list:

  • Running/lightweight vest/t-shirt/top
  • A (working) shower
  • NIKE+iPod

Let me explain each of them.

(more…)

Marking up with Markdown

Thursday, June 8th, 2006

I’ve been using Textile for a long time now. Mainly because the previous incarnation of this site was running Textpattern. I was aware of alternatives, but due to inertia when I switched to Typo I carried on using Textile. It has a few annoyances (e.g. no easy formatting for `` blocks without resorting to HTML).

As the saying goes "a change is a good as a rest" I decided to mark my [upgrade](http://schwuk.com/articles/2006/06/08/running-typo-svn-on-debian-stable-sarge) to Typo svn by switching to using [Markdown](http://daringfireball.net/projects/markdown/) with [Smartypants](http://daringfireball.net/projects/smartypants/) for both posts and comments.

If you want to play with Markdown, you can do so on the [Dingus](http://daringfireball.net/projects/markdown/dingus/).

Running Typo svn on Debian Stable (Sarge)

Thursday, June 8th, 2006

After numerous attempts to upgrade this site to the latest version of Typo and the current version of Ruby on Rails I’ve finally succeeded. The things that tripped me up were:

  • Debian `stable` ships Ruby 1.8.2. Whilst this is fine for Rails 1.1 I couldn’t migrate to Typo svn’s schema which I thought meant I needed 1.8.4. I didn’t
  • I was running Postgres 7.4.7 (again Debian default which was causing the migration problems

Once I’d figured my way past those I’m now running Postgresql from Debian Backports and Ruby 1.8.4 of my own concoction, with Rails 1.1 (from gems, not debs). A side effect of this is that my old theme was broken on Typo svn so for the time being I’ve switched to Scribbish which is a fantastic theme for for general use and to base your own on – which I shall be doing shortly.

Here’s what I did to solve the package issues I had.

(more…)