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
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…
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…
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…
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,
The Pressing Need to Overtake
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…
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
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
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…
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…
< Previous Next >