Simon Davies Digital ltd

Simon Davies

Posts By: Simon Davies

Namespacing Models in Laravel

Posted by & filed under Laravel, PHP.

I have been using Laravel quite a bit recently and it’s a great framework, which is really good fun to code with. I’ve just started writing a registration system in Laravel and came across a problem which I felt was worth sharing. I was creating the table and model to store the event details and […]

Show Woocommerce stock status for unmanaged products

Posted by & filed under Woocommerce, WordPress.

The WooCommerce stock status (In Stock, Out of stock) will only show if WooCommerce is managing the stock for you. I was working on a project and the client wanted the ability to manually set if the product was in stock or not. The code snippet below will allow you to show the stock status for both […]

Setting a different ul bullet colour in CSS

Posted by & filed under CSS, SASS.

I’ve always found it annoying that you can’t set a different ul bullet colour through CSS. It should be as simple as: ul { color: red; } li { color: black; }

WP-Admin broken after updating WordPress

Posted by & filed under MAMP, WordPress.

Have you just updated your local of WordPress and its now all broken on MAMP, I’ve had this problem a few times now so thought it would be worth sharing how to fix this. The problem is caused by the load-scripts.php file being compressed with zlib, I first did as suggested on this stackoverflow question. […]

Backing up MySQL Databases

Posted by & filed under Bash, MySQL.

As a web developer you learn that there is nothing more important than keeping regular backups of your databases. I’ve created a little bash script to help with Backing up MySQL databases for this I’ll use mysqldump. Mysqldump is a nifty little utility that lets you dump the contents of a database to a file, so I […]

Website relaunch

Posted by & filed under Random.

I’ve found that one of the best parts of putting my site live in May earlier this year, was being able to start again and use what I had learnt to improve my site. Today I have launched my new design and I couldn’t be happier with it. I think as a web developer/designer it’s […]

PHP Insert into array at position

Posted by & filed under PHP.

The other day I found myself needing to insert into an array at a given position, so I wrote this little function. For example if you have pulled a list of posts from a database and are going to loop through these to output the HTML, but want to insert an advert after the third […]

Using composer with MAMP’s version of PHP

Posted by & filed under MAMP, PHP.

After my laptop has been running really for a couple of weeks now, I have decided to order some new RAM and do a clean install of Lion. This has given me a great opportunity to configure my development environment in a cleaner and more organised way. As a developer I do install a number of packages […]

Using MAMP and Pow on the same machine

Posted by & filed under MAMP.

I’ve been playing with Ruby on Rails recently and I’ve been using Pow as a rack server for the applications I’m working on. So I don’t have to keep running “rails server” when I want to test an app out. It’s a brilliant little tool from 37 Signals that they describe as a zero-config rack server and it is just that. […]

Contact

Want to hear more about Simon Davies Digital and what we can do for your business or simply want to say hello, then get in touch.

+44 7846 400933
hello@simon-davies.name