Git commit signing issue

Posted on 22 October 2016 – 1 minute read

I, like many others, sign my Git commits with GPG. This had been working fine for a while, but when updating to Git 2.10.0, I was always presented with an error when trying to sign a commit

error: gpg failed to sign the data fatal: failed to write commit object

On my windows box, I appear to have both GPG1 and GPG2 installed. Git didn’t like trying to sign with GPG1, so this needed to be forced to use GPG2. Thankfully, this solution is simple:

git config --global gpg.program gpg2

Then sign your commit as usual and voila! No more errors.

Send mail via SMTP with self-signed certificate with Laravel 5.2

Posted on 25 May 2016 – 2 minute read

I’m currently writing an application using Laravel 5.2 but needed to send mail via SMTP with self-signed certificate. I didn’t want to edit the SwiftMailer library directly for obvious reasons.

The version of Laravel currently being used for this application is 5.2.6, which comes with SwiftMailer 5.4.1. We need version 5.4.2 or higher so we can use the setStreamOptions() method of Swift_SmtpTransport`, so I updated this via Composer.

ownCloud and PHP7 update on Debian Jessie

Posted on 10 December 2015 – 2 minute read

ownCloud and PHP7 update coolness

I wanted to upgrade my Debian box so I could run ownCloud and PHP7 to check out the speed increases, and well, because it’s cool.

Determine previous PHP installed modules

I generated a list of previously installed PHP5.6 modules to make easy reference to what to install under PHP7:

# dpkg -l | grep -i php

Remove PHP5.x

You should remove your PHP5.x install before upgrading to PHP7. From the list generated from the dpkg output, remove the modules, eg:

# apt-get purge php php5-dev php5-curl

Install PHP7 from dotdeb repo

If you’re not already using the dotdeb repo, add this to your /etc/apt/sources.list file:

deb jessie all
deb-src jessie all

Installing Homestead on Windows

Posted on 11 August 2015 – 1 minute read

It seems that a fair few people have queried and had issues on getting Homestead installed on Windows nicely. This guide for installing Homestead on Windows will hopefully help things go smoothly.

ownCloud 8.1 update - SMB shares broken

Posted on 08 August 2015 – 3 minute read

I’ve been an avid user of ownCloud for some time now currently running 3 instances, and it’s a great platform, especially as I’m somewhat draconian about privacy and allowing 3rd-parties access to my data.

On one of my home instances, I also have my desktop box running various SMB shares so that I can access the likes of video and music via my Raspberry Pi media streaming systems, and also my ebooks and applications repository for easy network installs or reading in various rooms… ownCloud has performed great for accessing these and I’ve been able to share those SMB shares via the external storage feature so that I can access things on the go too from the likes of my iPhone.

So, like many others, when ownCloud 8.1 was released, I upgraded. Whilst the main upgrade itself went smoothly (2 of my instances are installed via Debian packages, the other via ownCloud / manually on a CentOS box), I found that I was unable to login to 2 of my instances from the official iOS ownCloud app with a It is not possible to connect to the server at this time error message.

Reflection in PHP

Posted on 26 March 2015 – 1 minute read

Sometimes, it’s useful to set properties within a PHP class, but also return those same properties if perhaps, they’re public so can be accessed directly without exposing the rest of the class. The most accurate way of doing this IMO, is by using Reflection via PHP’s ReflectionClass.

JIRA - ictime plugin worklog

Posted on 27 February 2015 – 2 minute read

JIRA is my preference in issue trackers, it’s well designed, flexible, well priced and integrates nicely into my other Atlassian products such as Confluence and Stash and also 3rd party products, for example Jenkins Continuous Integration server.

Another bonus is the external plugins that can be installed either for free or for a varying sum normally dependent on number of users. One of the plugins I had been using was ictime as it enabled me to see a bigger picture of what hours I’d spent working on a project.