Blog

If I’ve done this right, you might not need a freelancer!

I’ve written some articles – mostly on techy stuff – which I hope help you learn something new or solve some pre-existing problems you’re having.

Tags

Date

How to get icons in React

Here’s a quick review of the different ways to get icons into your React projects.

Aspect ratio boxes

Here’s a quick one on creating aspect ratio boxes – whether or not you know the exact width/height.

Convert days to weeks and days

Here’s a quick mathematical one on dividing a number of days into weeks and days.

Force links to download in HTML

An easy HTML only method of forcing a link to download a file instead of showing it in the browser.

PHP loops

The different types of loops available in PHP and how to use them.

PHP operators

A list of PHP operators and what they do.

CSS Flexbox explained

Here’s an explainer on CSS Flexbox, the CSS 3 web layout model which helps you create better layouts.

Using JSON in PHP

A quick one on using JavaScript Object Notation (JSON) in PHP.

Generate random IDs with React

There’s not much more to say – here’s how you generate a random ID string to use in your React elements.

Favicon dark mode

Use CSS media queries within an SVG favicon to offer light and dark versions.

Preload responsive and retina images

Here’s how to preload responsive and retina images properly, only preloading the image actually shown to the user.

Serving retina images

Here’s how to serve retina images for pixel-dense screens and prevent fuzzy images.

Adding leading zeros in JavaScript

Here’s a very quick and easy one on how to pad integers with leading zeroes using the built in JavaScript math library.