Pither.com / Simon
Development, systems administration, parenting and business

Add an SMTP server to a Grails application

Quite a long time ago I talked about setting envelope sender addresses so that I could send mailshots and get back any bounces in a useful way. The missing component to it was to process those bounces within my application. Here, finally, is my write up of how I did this.

After much searching I eventually found the excellent SubEtha …


Daffodil Photos

Much earlier this year Liz and the children planted a few daffodil bulbs along our fence. Not quite so long ago they came out rather well, and I took some photos. My favourite three daffodil close-ups are below (click on each for a larger version).

Daffodil

Daffodil

Daffodil

Tags: photos flowers

Ticket sales (PayPal, Jasper Reports, Barcodes) with Grails

Please see Part 1 for the start of this series and links to all parts.

For the SupaJam ticket outlet, we didn't need anything too fancy, just enough to present people with a couple of ticket types to choose from and a way to pay for them. Of course we still had the extra requirement of collecting a real name …


Tickets: selling, sending, supporting and checking; all in three weeks

Towards the end of May, SupaJam launched the first round of several festival ticket give aways planned for this summer. This wasn’t the first time SupaJam has given away festival tickets, but it is the first time that we've done it in this way.

Technically, it all went well. The days afterwards did include a rather large number of support …


grails-mail patch for envelopeFrom (VERP)

I have previously written about setting envelope senders when sending email in grails and following comments made on that post I did actually get around to submitting a patch to the plugin.

However a change to that patch was suggested and before I managed to implement it, the mail plugin underwent a fairly large refactoring which meant I needed to …


Grails multi-version launch script

Note: The latest version of the script below is on github.

I work with grails quite a lot these days. I have about 5 plugins and over 10 projects that I currently work on frequently. Fairly inevitably they use an assortment of grails versions. Manually chopping and changing command lines to execute different versions gets pretty tedious.

The solution - …


Custom (private) DTD in HTTPBuilder XML response

The Groovy HTTPBuilder library is extremely useful for interacting with all sorts of things, including remote web services that send back XML responses. In these cases HTTPBuilder will automatically use Groovy's XmlSlurper to parse the response and give you back a GPathResult to make navigating the XML super easy.

However today I've been trying to parse XML that's returned (from …


Resize iframe from within

I recently needed to dynamically resize an iframe based on the size of it's content. This needed to be done for each page loaded within the iframe (as they are of varying length) to avoid an extra level of scrollbars appearing.

You can skip ahead to see the finished product here: Sutton Footprint Calculator. The details of the solution …


I'm running 10km on Sunday!

Some while ago I realised that I hadn't done much exercise for the prior year or so and it was starting to take its toll. And by "much", I really mean "any at all".

Working from home is great, I can work longer and see my family more, I damage the environment less and it costs less. However it means …

Tags: sport

Backport rsnapshot 1.3.1 to Lenny

I recently needed a version of rsnapshot that included LVM snapshot support. Unfortunately the version included with Debian Lenny doesn't include this, so I had to create a quick backport.

This is a very quick record of what I did.

Install useful build scripts:

aptitude install devscripts

Create somewhere to store our downloads and built files:

mkdir build-dir
cd build-dir …

Sleepy Sophie

It seems that sometimes, after an especially long day playing, the effort of eating is just a bit too much...

It appears that getting older doesn't make the situation any better...

Tags: sophie

Edward and the sunflower

Over the last few months "Edward" has grown a sunflower.

Edward with young sunflower

It started off with him planting a seed in a little plastic cup at nursery. When he brought it home with instructions to water it and return photos of progress we were expecting to have to start dodging the subject within a week or two! Our track record with plants …

Tags: family edward

A to B

I need to get from A to B, how should I do it? My obvious considerations include cost, environmental impact and my non-working time.

There is parking at the destination and a nearby train station so I can choose between car and train.

Option 1 - car

Time

Google maps has plotted a pretty simple route that it thinks will …

Tags: car train travel

Envelope senders for Grails mail plugin (Spring Java Mail)

I would have expected the desire to set a specific envelope sender address for mails from a web-app to be fairly common. However finding information on how to do it with the Grails mail plugin (ie Spring mail (wrappers for JavaMail)) proved much harder than I expected.

In fact, I ended up reading the source code!

It turns out that …


SparkleShare: self-hosted, git based, DropBox clone

At the end of last week I came across this article announcing SparkleShare.

As an aside, I am slightly concerned that I can't actually recall how I came across that article! I think the influx of links (and general information) from RSS, Twitter and Facebook will eventually make me melt!

Anyway. SparkleShare is something that I've been wanting for …


Hello Fabia

Last week I collected my new car:

My new Skoda Fabia

So far, so good. It's quite red (the only non-white, free colour), which I did fear slightly but I actually haven't noticed too much. It seems pretty quick, both accelerating (and I haven't even tried very hard yet as the manual tells me I must be patient!) and cruising happily at 70 on …

Tags: car skoda fabia

Follow the FIB Final on SupaJam

Today is the Fast Track to FIB 2010 final. For the first time there will be live footage uploaded to SupaJam as the day and night progresses.

This means I get to spend the day in London editing, preparing and uploading photos and videos.

Thankfully I've spent the last couple of weeks preparing the SupaJam site to make my job …

Tags: supajam fib

Bye Bye Prius

Last week I said good bye to the Toyota Prius I've been driving for the last two years. I'm actually pretty indifferent to see it go. Which is quite a change from my last car, which I still miss! The Prius did at least have a little LCD with pictures of which motor is currently powering the wheels though! Despite …

Tags: car prius toyota

Groovy mail shot

A simple mail shot script in groovy...

Runs on Debian Lenny with just a standard openjdk-6-jdk installed, groovy 1.7.2 added by hand and everything else pulled in by Grape.

#!/usr/bin/env groovy

import groovy.sql.Sql
import groovy.grape.Grape

Grape.grab(group: 'mysql', module: 'mysql-connector-java', version: '5.1.6', classLoader: this.class.classLoader.rootLoader)
Grape.grab(group: 'javax.mail', module: 'mail', version: '1.4.3', classLoader: this.class.classLoader.rootLoader)
Grape.grab(group: 'org.apache.ant', module: 'ant-javamail', version: '1.7.1', classLoader: this.class.classLoader.rootLoader)

def …

The 3 Year Old Memory Aid

In the car on the way home from a birthday party, Liz and I are trying to remember names of a few people who we all met for the first time...

I suggest one was called Paul, Liz thinks he was John, but actually John was Letty's sister's boyfriend and Paul was in fact; Paul.

Hmm, but what was Letty's …

Tags: family edward