Blog - page 14

23 Jan 2017

Aligning Text in Vim

Dev SysAdmin Vim

Did you know you can center align text in vim? From a visual selection, run :center. This aligns the text on the assumption that the width of the document is textwidth, or 80 characters by default. You can also manually set the range by running :center N, where N is the total width of the line.

25 Nov 2016

Client Friendly Images On WordPress

Dev WordPress

This post introduces some considerations and techniques for handling images within WordPress. This is particularly useful if you are building a website that will be handed over to a client who will then maintain the content with no further involvement from you, the developer.

25 Oct 2016

Identical SQL Queries != Identical Results

Dev MySQL SysAdmin

You would expect identical SQL queries, running against the same database at the same time to give the same results, right? Well, it turns out that such an impossibility can occur. Alas, this wasn’t some easter egg or heisenbug hidden in MySQL, the issue turned out to be perfectly sane. This is how the confusion unfolded…

26 Jul 2016

Neat uses for CSS’s awesome viewport units

CSS Dev

CSS offers various units for sizing elements. The popular choices are px, %, pt, em and more recently rem. There are two other units that have quickly become favourites of mine, vw and vh. These are relative units, but unlike say em and rem which are relative to the font size of the current and root element respectively, vw and vh are relative to the viewport. A single viewport unit is equivalent to 1% of the viewport width (vw) or height (vh).

01 May 2016

I booked a holiday for 8 hours (and it’s abroad)

Travel

This post sets out how Feroz and I tried to book a trip for a very short amount of time using as little money as possible. Look out for some live-progress tweets on Saturday the 7th of May for how we are getting on.

12 13 14 15 16