danielhpavey.uk

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

Posts tagged #web development:

How do I pull a native DOM element from a jQuery object?

Friday 17 February 2017

How do I pull a native DOM element from a jQuery object? Ruthless plagiarised from the jQuery website A jQuery object is an array-like wrapper around one or more DOM elements. To get a reference to the actual DOM elements (instead of the jQuery object), you have two options. The first (and

Tags: #web development #javascript #jquery

Magento 1 Rest Api Multiple SKU Query

Friday 10 February 2017

Magento 1 Rest Api Multiple SKU Query It took me a long time to track down this solution to get multiple products by SKU out of the Magento Rest API... But here's the solution I've found: http://[magento host]/api/rest/products?filter[1][attribute]=sku&filter[1][in][0]=sku1&filter[1][in][1]=sku2

Tags: #magento #web development #php

Find Magento Layout Handle for Current Controller/Action

Friday 3 February 2017

Find Magento Layout Handle for Current Controller/Action I is still getting the hang of the whole Magento layout functionality but have just found a couple of tips that have helped me greatly. As I understand it the layout handle of and xml file is the node that is called when a particular…

Tags: #magento #web development #php

Magento block caching

Friday 20 January 2017

Magento block caching If you set it to false, Zend cache will get default value of 7200 seconds!! If you want infinite never expired cache set it to 9999999999, which is Zend_Cache maximum value, or something else big enough. Magento block caching • Inchoo

Tags: #magento #web development #php

Web Making

Friday 22 April 2016

Web Making Loving this tweet... Web making: 1. Identify core functionality. 2. Make that functionality available using the simplest technology. 3. Enhance! @adactio #aeabos— Jeffrey Zeldman (@zeldman) May 17, 2016

Tags: #web development #responsive web design

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

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

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

Super Simple Git Submodule Guide

Tuesday 6 October 2015

Super Simple Git Submodule Guide Hopefully you already have some idea what a git submodule is, but if not: It often happens that while working on one project, you need to use another project from within it. Perhaps it’s a library that a third party developed or that you’re developing separately and…

Tags: #git #web development

PHP DateTime Class - Or why it pays to read the documentation (sometimes!)

Friday 18 September 2015

PHP DateTime Class - Or why it pays to read the documentation (sometimes!) I've always struggled with dates in PHP, more specifically writing dates submitted by a PHP form to a database correctly formatted. I've done a few weird and wacky things to get the dates into the database as proper datetime…

Tags: #php #web development

Joomla! Styleguide Component

Wednesday 17 June 2015

Joomla! Styleguide Component Website Styleguides are very 'de rigueur' at the moment. I work with Joomla! a lot and felt that a Styleguide component could be useful. These website styleguides are often also called Pattern Libraries. I think they can be very useful! My component is currently available on Github

Tags: #joomla #web development #php

Remove Individual Stylesheets or Javascript Files from Joomla! Head

Wednesday 17 June 2015

Remove Individual Stylesheets or Javascript Files from Joomla! Head I have worked with Joomla! for a number of years and whilst in many ways it is an excellent content management system, it does still suffer from a common problem. A lot of CMSs get very bloated with extra (sometimes) unnessary code.…

Tags: #joomla #web development

Great Gif: Refactoring

Friday 24 April 2015

Great Gif: Refactoring Love this gif!

Tags: #gifs #css #web development

A Couple of Tips for Using PHP at the Command Line

Tuesday 21 April 2015

A Couple of Tips for Using PHP at the Command Line On vary rare occasion I find it useful to run php in the command line. There are a couple of easy ways to do this, but the first thing you might want to do is check your php version. This is easily…

Tags: #php #web development #terminal #commandline

Super Read -> More Weight Doesn't Mean More Wait

Monday 20 April 2015

Super Read -> More Weight Doesn't Mean More Wait Formerly, much of the focus in web performance was concerned with optimizing assets like images and fonts, which does make for a shorter overall page load time. But today there are techniques we can use in addition to file optimization that have…

Tags: #web development #responsive web design

Awesomplete by Lea Verou

Wednesday 15 April 2015

Awesomplete by Lea Verou Ultra lightweight, customizable, simple autocomplete widget with zero dependencies, built with modern standards for modern browsers. Because still doesn’t cut it. Awesomplete: Ultra lightweight, highly customizable, simple autocomplete, by Lea Verou This looks like a great little bit of code... Planning to use it somewhere soon!

Tags: #bookmarks #javascript #web development

The Problem With Websites

Thursday 19 March 2015

The Problem With Websites Saw this great tweet the other day and thought I'd pop it here for posterity. The problem with websites. pic.twitter.com/cTkSKy4pKF — Erwänn Mest (@_kud) March 10, 2015

Tags: #design #web design #web development

What is Scrum? An Agile Framework for Completing Complex Projects - Scrum Alliance

Thursday 5 February 2015

What is Scrum? An Agile Framework for Completing Complex Projects - Scrum Alliance The Scrum framework in 30 seconds: A product owner creates a prioritized wish list called a product backlog. During sprint planning, the team pulls a small chunk from the top of that wish list, a sprint backlog, and decides how…

Tags: #web design #web development

JCH Optimize Joomla Plugin for Non-Logged in Users

Friday 22 August 2014

JCH Optimize Joomla Plugin for Non-Logged in Users I have recently found a fantastic Joomla plugin that addresses a number of issues I was having with Joomla. Click here to Cut to the chase The JCH Optimize can: automatically optimize external resources like CSS and JavaScript, which can reduce both the size and number…

Tags: #joomla #web development

How to transition height auto in CSS3

Friday 9 May 2014

How to transition height auto in CSS3 The short answer – you can’t..! It is not possible to transition height zero to auto. i.e. ` div{ height:0; transition:height 2s ease; } div:hover{ height:auto; } ` …will not work… Despite the fact that this seems like a fairly natural thing to want to do. However there is a trick to simulate this behaviour.…

Tags: #css #web design #web development

Count number of words in text using MySQL

Monday 10 September 2012

Count number of words in text using MySQL I was trying to count the number of words in some MySQL results today. This is easy enough with PHP using str_word_count However there is no simple command to do it in MySQL However I found this great post that give a nifty little trick for

Tags: #mysql #tips #web development

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