Github Profiles

Github has recently added a new feature that allows you to create your very own Profile using a file stored in a repository.

The profile allows you to be able to create a more in depth profile bio using, images, videos and yes GIFs! The will be pinned at the top of your profile, making it the first thing that viewers to your profile will see.

Optimising hibernate queries with tuples

The Java Persistence API (JPA) is a wonderful way of bridging the gap between SQL databases and object-oriented programming.

My preferred implementation of choice is Hibernate, but often Hibernate will generate long and complex SQL statements, that can cause slow queries to occur quickly. Developers will often “solve” this problem by writing native SQL statements, but it turns out that there is an alternative approach.

Leading by examples: using nested hamcrest matchers

I often refer to Marc Philipp’s excellent Hamcrest Quick Reference guide when choosing which hamcrest matchers to use when writing my unit and integration tests.

I use nested hamcrest matchers all the time, often without even releasing, so I thought I would put together some example uses of nested matchers.

Setting up Spring and CORS using hostnames

The Spring framework has a number of ways in which adding CORS to your application can be achieved. I usually implement a Web Filter, rather than using Spring’s configuration, as I often find myself having to implement some logic around which hostnames are accepted by the application’s CORS policy (rather than Origins). Rather than use a Web Filter, I wanted to see if it can be done using Spring Config.

Upgrading an End-of-Life Ubuntu Server

I was recently tasked with updating a handful of Ubuntu 15.04 “Vivid” servers to Ubuntu 16.04 LTS “Xenial”. At first this seemed pretty easy, but I quickly realised that Ubuntu 15.04 reached it’s end of life in February 2016… and I was attempting to perform this upgrade in January 2020. Let the fun times roll!