Cloned a GitHub repository to make some changes? Want to use that as a package without having to upload it to GitHub, here’s how…
(more…)
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.
Checking domain records of domains in cPanel – Bash script
We’ve got a project coming up that will require us to have a list of every A record and nameserver for domains hosted (or partially hosted) on our cPanel servers.
PHP Bank Holidays, mainly Easter!
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…)
Google Maps and a Widget Builder
We saw in an earlier post some of the work I’d done to create the widget for Kyero, now we needed a way for the users to build the widget themselves (initially just selecting locations), here begins my adventures into the Google Maps API v3.
Use Guzzle for OAuth2 API Integration
I wanted to fetch my delicious bookmarks for display on this website, I started by creating a command in Laravel (it’s my favourite way of testing things like this work!) that would run my delicious class and fetch bookmarks.
(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!).
Linux: Find files older than a given date to delete
Today I had reason to need to find all the files in a directory older than a given date and delete them.
Doing this over SSH meant it wasn’t a case of re-ordering and selecting with the mouse…