danielhpavey.uk

A sorta, kinda, web development and design blog...

Web Dev Axioms to Live By

Friday 22 April 2016

Web Dev Axioms to Live By Loving this tweet... web dev axioms to live by: #1 if you can do it in HTML, don’t use CSS#2 if you can do it in CSS, don’t use JS#3 if all else fails use JS— John Allsopp (@johnallsopp) April 12, 2016

Tags: #web development #responsive web design

Change Last Character in String to Uppercase in MySQL

Thursday 11 February 2016

How to Change the Last Character in a String to Uppercase in MySQL I have been working on a project that required the importing of some nasty old, badly formatted data in a nice new MySQL database. I ended up data in a firstname field with titles and initials, for example; Mr…

Tags: #mysql #webdev

Load A Joomla! Template File From A Separate View

Wednesday 10 February 2016

Load A Joomla! Template File From A Separate View I am working hard to improve the quality of my php code and one of significant technique is to use the DRY principle. However this can become a little harder to stick to when using a framework / CMS. I mostly work with…

Tags: #joomla #web development #php

Joomla! Template Equals Component

Monday 1 February 2016

Joomla! Template Equals Component I knew that you can modify the output of Joomla! still further by tagging "tmpl=component" onto the end the url. This should then output the content of whatever component you are viewing without the template. You might need to create a component.php file in the root of your template…

Tags: #joomla # web development

Never Design The Home Page First

Thursday 14 January 2016

Never Design The Home Page First This is something I think about doing, but really need to actually start doing it! Pro tip. Never design the homepage first. Always start with a product page, an article or a page where design thinking is really needed.— Joe Leech 红豆 乔 (@mrjoe) January 14,

Tags: #design #inspiration #web design

The Pressing Need to Overtake

Friday 18 December 2015

The Pressing Need to Overtake I cycle. Every day. Well, most working days. I cycle to work. When you cycle a lot it is very easy to develop a sizable chip on your shoulder about motorists. I try to resist this as clearly, not all motorist are evil fuckers... However there are enough who…

Tags: #cycling

2 Hard Things in Computer Science

Thursday 10 December 2015

2 Hard Things in Computer Science I've long been a fan of this quote from Phil Karlton "There are only two hard things in Computer Science: cache invalidation and naming things" However I am an even bigger fan of the slight variation on it: "There are only two hard things in Computer Science: cache

Tags: #web #web development #programming

Recursively count all the files in a directory

Friday 27 November 2015

Recursively count all the files in a directory Every now and then I need to do this... so this is here for reference... find . -type f | wc -l linux - Recursively count all the files in a directory

Tags: #terminal

Git --assume-unchanged Problem When Switching Branches

Friday 20 November 2015

Git --assume-unchanged Problem When Switching Branches I had a problem switching to a different branch when using git --assume-unchanged. I've been using this command as a lazy git ignore and found it quite useful. However, I recently tried to switch a branch when I had marked a config file --assume-unchanged and had…

Tags: #git #web development

Search a Multi-Dimensional PHP Array with Standard PHP Library Recursive Iterator

Wednesday 4 November 2015

Search a Multi-Dimensional PHP Array with Standard PHP Library Recursive Iterator (That's definitely the best blog post title I've ever come up with...) Messing with php arrays often messes with my head... So I needed to search a multi-dimensional array and return the results in an easily accessible format. A bit of research uncovered…

Tags: #php #web development

< Previous Next >