Blogging with Ghost

Posted on 12 March 2017 – 2 minute read

After having used Wordpress for some time for Squarecone, I decided to look at alternatives as a basic blogging platform. Wordpress does what it says on the tin and provides blogging features, but it's become far more of a generalised CMS these days, that it's more complex and time consuming to work with, and to be honest, I also fancied playing with new software... welcome aboard Ghost.

I'd not looked into this before, neither had I ever worked with the Handlebars template engine. It didn't take long to get acquainted with both. I've been wanting to build a custom theme for Squarecone for ages, but have never found the spare time due to heavy work / family commitments, but part of the attraction to Ghost for me, was its simplicity and the ability to write the posts as Markdown rather than using the WYSIWYG editor (which I normally disabled and wrote as plain HTML) in Wordpress.

Ubiquiti UniFi in the home

Posted on 26 February 2017 – 11 minute read

Although I hadn’t heard of them before, I’d never thought to use a setup like Ubiquiti UniFi in the home. Initially I thought it might be overkill, despite many things connected to my home network. After poor wifi performance in some areas of the house, and some good reviews from people on Twitter, I decided to have a look.

I also wanted to replace the CCTV system at home as the system I had originally, ultimately had potential issues with the Mirai IoT malware.

My original core network simply contained a DrayTek Vigor 2850n router and a few Netgear gigabit switches.

Linux mouse speed adjustment

Posted on 08 January 2017 – 2 minute read

So I’ve recently switched semi-permanently over to using Linux Mint as my OS on my Lenovo W530. Using *nix as a desktop OS isn’t new for me, back i the day I used to run FreeBSD4.4 with Window Maker on an IBM PII 350Mhz desktop box.

However, things have moved on nicely and when I have my laptop sitting in my dock, I have a mouse plugged in, namely a Razer Mamba. This is a great mouse, and one of only 2 mice I actually enjoy using (my other trusty steeds are a couple of Logitech LX8s). The issue I have is that under Linux Mint both the trackpad and mouse are waaaay too fast for my liking and the type of use I need them for, despite being adjusted to the lowest setting in the Mouse & Touchpad settings, so I use xinput to set them directly. The problem is, is that the mouse is listed twice; the first instance is for the mouse, and the second instance as a “keyboard” (I guess this is due to the programmable nature of the device, which means I need to set the properties by using the device ID instead of the name. Not too much of an issue if you do it manually, but I want to automate this at login as setting it manually each time will get very boring, very quickly, so I decided to use PHP for this purpose as I already have it installed on the laptop.

I use the following script to set both the trackpad and mouse speeds according to the values I like. YMMV and the values can easily be adjusted from the constants at the top of the script.

TalkTalk wi-fi router passwords stolen

Posted on 06 December 2016 – 1 minute read

TalkTalk customers’ wi-fi passwords have been stolen following a malware attack that blocked their internet access last week, an expert has warned.

The researcher said other details had also been taken that would let attackers pinpoint where the equipment was being used, making more targeted hacks possible.

Pen Test Partners’ Ken Munro wants thousands of routers to be replaced.

But a TalkTalk spokeswoman said it had not see evidence to confirm the thefts.

“As is widely known, the Mirai worm is affecting many ISPs [internet service providers] around the world and it has affected a small number of TalkTalk customers,” she said.

“We continue to take steps to review any potential impacts and have deployed a variety of solutions to ensure customers’ routers remain safe.

“We have also employed additional network-level controls to further protect our customers.”

Read the full article at the BBC.

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.