Email Automation – Laravel+Sendy+JVzoo In under an hour

TLDR; Skip to the lower source block for the apache and htacess configs for laravel in a subdirectory using apache aliases.

I mentioned a few days ago that I’m moving over to using Sendy as my mailing list system. One of the things I needed to get sorted pretty sharpish was handling the customer email automation process for my Book website ‘Beyond Bedroom Guitar”.

Continue reading

Doing something good for young adults

Imagine you were 16 again. In the UK.

Now imagine you’d fallen out with your foster family, because you’re own parents were not around.

You’re out on the street. Alone. No where to live, no where to go.

You’ve still got to go to school.

You need to find food.

You still need to able to wash.

But you’re 16. You don’t qualify for unemployment benefit because you’re supposed to be at school or at college.

You’re 16 – possibly with poor education (those years of being moved from one school to another as foster families change don’t help). So getting a job is pretty hard (but you should be in school or college according to the law now). Even then its going to be low paid, a few hours. Not enough to live on.

There is a MASSIVE hole in the benefits system that means 16-18 year-olds fall through the cracks for support at this most vulnerable time in their lives.

One Charity that makes a difference for children (because that’s what they are really still children) is ‘Action for Children’. They have people that help.

Action for Children

Action for Children Logo

Help find children a place to live, get the benefits they need, get back on track to becoming an adult and most importantly keep them off the street, away from drugs, prostitution and all the other nasty things that they could be dragged into.

They also are trying to lobby to get the laws changed so that these people who are in trouble are NOT ignored by our society.

Each year, a whole group of technology people in and around Bristol get together to raise money for this worthwhile Charity. Apart from the usual fund raising techniques, their ‘big’ event is called ByteNight (come on programmers you know what a byte is). About a hundred people sleep out overnight – rough without shelter. All together about a thousand people do this across the uk in Bristol, London, Birmingham etc. Last year they raised just over £1 million on that one night alone.

I took part. It was my first ‘proper’ charity event. Ever. And it felt good. Really good to realise that I was going to make a difference that could have a direct impact on someone’s life. Yes I’ve done things in the past that have an indirect influence – but not this direct.


This year they are doing it again – and this year I’m doing it again too! I’ll be there on 2nd of October in Bristol with just a fleece, sleeping bag and roll-mat sleeping out rough and hoping to make a contribution to this very important organisation.

If you’d like to make a donation to my efforts then visit my just giving page and put some cash into the collection jar.


I've been waiting for  baited breath for this to get ported to the Mac. Then I forgot about it for a while. 

Nic needed a video creating for her Bed Med Gold Audio and iMovie was playing up a bit. So I downloaded the beta version from www.lwks.com and installed it. Well to say I was amazed is an understatement. After watching a few ​training videos (the one above included), it took me about 5 minutes to edit everything together and set it rendering. 

She wanted one of the Electric sheep rendering videos as a background and that took a long time to download and re-encode.

Here's the finished result (no award for film making yet!)

A Dilemma Version 2 or Version 3 of Cocos2dx

Having just seen the video from the Arm conference where Ricardo talks about some of the improvements to to Cocos2dx in version 3, I thought I’d take a quick look.

First I had to upgrade my version of C++ to 4.7 so I could compile it. Thanks Ubuntu for putting it in a test PPA instead of being generally available. A few apt-* commands later and I’m compiling up the source. At least this time the cmake configuration is much easier to understand. Another recompile after configuring Box2d (why do you insist on making Chipmunk the default!) and the test code is running much faster on my creaky old laptop. Using a later opengl driver has really helped.

The dilemma is should I abandon my previous code and setup and recreate everything in version 3, all the while having to mentally switch between CCSprite and Sprite class names etc. Also a lot of the tutorials are geared to version 2. It might be a bit of a mental stretch too far.

Anyway for now I’ve decided to give it a go and keep up with the latest and greatest. At this rate I might even get out a game before the stable release instead of the beta version.

So I’ll have to go through the same steps again.

  • Create Game Stub
  • Create Repo
  • Create Jenkins configuration.
  • Setup testflight.

All set up!



Your own, Personal, Jenkins

With thanks to Depeche Mode for the title.

This week I’ve been having a bit of fun with my own Jenkins setup. I use jenkins/hudson at work on a daily basis within our agile processes and thought it might be OK to set my own up for Beadbash.

For those that don’t know, Jenkins is a java based continuous integration server that will automate building, testing and deploying software for you. The power of this software comes from the fact that it has dozens of plugins for all sorts tasks. In my case I needed to

  • grab the source code from my bitbucket git repository (although it could quite easily have been svn, mercurial or many other source code management SCM tools).
  • compile it up as an iOS build
  • deploy it to my phone via testflight


Jenkins Continuous Integration Logo

Jenkins Continuous Integration

I watched this youtube video first to see what’s possible, then I got started configuring it all.

To make things a bit easier, I decided to install Jenkins on my mac in the office rather than trying to run it on my laptop. This would make doing the xcode build a bit simpler as I wouldn’t need to create a slave server and configure all that up. (I might if I end up needing lots of build servers if I were anything more than a one man band for this project but as this is my first time setting it all up I felt that adding a slave component was overkill.). Installation was painless! Download the dmg from jenkins-ci.org, run the installer package, select the custom options so it would not run as a boot process as a different user and then run it manually using java -jar jenkins.war. That’s enough to get it all running and opening localhost:8080 gives me the start screen.

I then added all the plugins I would need the bitbucket hook, git, testflight, xcode etc. I also took a moment to configure a username and password so I could restrict access and then make it available externally via my firewall.

First pest problem was getting the source from bitbucket. I tried using ssh keys, but my keys always have a password set. I can understand why people create their keys without passwords so services can use them without needing input each time (like apache ssl certificates) but for personal certs I’m not happy just letting them being used. If my laptop was stolen or I lost a backup usb key then all sorts of mischief could be done before I managed to revoke the keys. Anyways’ it seemed that other people had come across the same problem and after a few false starts I found that actually bitbucket would work with just a username and password setup instead of ssh keys. So job 1 done. 

Next step was getting my repo downloaded. Because I have both the full cocos2dx tree and then a separate repo for beadbash under projects, I needed to use the multiple SCM configuration and set the second scm download to put the files in a sub-directory. That was pretty straightforward but then I came up against another problem. The cocos2dx repo was too large and Jenkins was timing out before getting the whole repo down.  A few searches later and some serious stackoverflow.com reading and I found a solution. I had to create a local bare git repo of the source code and use advanced clone with a longer timeout. This is only a problem the first time the workspace tries to get a copy of the repo as the next time through it only grabs the changes.

Repo sorted, next step was to get xcode to compile the code via the Jenkins plugin. This is where things got a bit hairy for a while. I hadn’t actually tried compiling it natively on the mac, so the first time I tried a build, it failed unable to open the keystore, and dozens of errors.  I opened the current code properly in xcode I had a whole lot of fixing to do:-

Add the resources, *.cpp,* .h files to the project. Modifying the linux makefile just doesn’t do it. (Note to self, I’m going to have the same problem when setting up the android build!).

Create the signing certificates in my keystore. This is the bit of voodoo that I still don’t understand fully but xcode takes care of it for you when developing. When releasing an app to the app store, then you need to create a new certificate via the apple connect interface and apply that to the .ipa package anyway so that’s fairly straightforward when the time comes.

There are a lot of deprecated warnings that I’m not going to fix just yet but will probably mean I need to upgrade to cocos2dx-3 at some point when it becomes stable. Perhaps someone will write a migration tool at the same time else I’ll have to get busy with sublime doing a lot of search and replaces.

So after several false starts, I’ve got the app to build.

The final step for this setup was to get the app deployed to my phone via testflight. This is where things got much easier. I already had a testflight account so I could grab my api keys and plug them straight into the Jenkins Plugin. A few settings later and its ready to test.

I did run into one problem which is that testflight searches the whole repo for apk’s and ipas to upload – which then also included some stuff in the cocos2dx which I didn’t need. So I fixed that by being specific to the android and ios project directories for beadbash.

A few nights work and now I’ve got a superb system for delivery to testers! Write the code, push it to the repo. Jenkins will check once a day (unless I kick off a build manually) if the repo has changed and if it has will build a new version of the code, push it to testflight and an email automatically arrives on my phone with a link to download and install the new version. Slick.





Doxygen – painfree documentation using comments

Leaving google mocks aside for the moment,  I realised that not only did I needed coverage reports, but I also should start to document my code a bit better so I could automate creation of the documentation at a later date.

Having used doxygen several times in the past, this was an obvious choice and just needed a few things setting up. Firstly install the thing:- apt-get install doxygen and an old but stable version is ready in a minute or two. (It took a while to install because of the latex and rtf dependencies needed installing too)

Then I needed a config file doxygen -g Doxyfile inside the root of my code tree is enough to get a boilerplate. I customised the Doxyfile a bit to just create html reports and some specifics for C/C++ but generally its as it comes and is very straightforward to edit. Of course if you install the Doxygen Gui it will do it all for you.

Continue reading