Category: Code

CloudLinux Selector Script to detect PHP version selected

This is odd, my last two blog posts have been about bash scripting, not because it’s something I’m good at or do a lot, but because when I achieve something with it – I want to remember it and am quite proud of it!

In this case CloudLinux gives us a PHP selector but no user interface for checking the version, it’s all command line, but on a per user basis.

(more…)

PHP Bank Holidays, mainly Easter!

PHP

I need to calculate bank holidays in the UK as part of a project I’m working on. You might think this would be easy, but then you realise that Easter moves, Christmas and Boxing Day bank holidays rollover if they fall on a weekend etc.
(more…)

Building a Javascript Embedded Widget

As primarily an API / backend coder in recent years I’ve always thought that Javascript looks amazing when it works (and making it work when it seems such an ambiguous language is half the battle). However, recently I’ve had reason to write a lot more Javascript (and learn a lot along the way!), let’s start with the widget I’ve built.
(more…)

Creating artisan commands in Laravel

This is part of a two part series in fetching Delicious bookmarks into Laravel. in this part we create our new console command for fetching bookmarks and the class for handling them.
(more…)

Using s3 storage in Laravel

Getting Amazon S3 storage working in Laravel has caused me a few headaches today, so I thought I’d blog about how I got it working for others (and future reference for myself!).

(more…)