Category: Code

Blink Home scheduling Zones

blink XT photo

The Blink home security cameras are a great little piece of kit, relatively cheap, no storage costs and no wiring requirements (with an alleged two year battery life), there’s a lot to like about them.

However… There is a flaw that has seen customers return these smart little units – you can’t zone them. For example you may have one camera on the front door which you want armed at all times and one on the back garden that you don’t want armed during the day because children are playing there.

(more…)

Concatenating videos with FFMpeg

Filmstrip

If you end up here, you’re either:

  • Tearing your hair out with FFMpeg, trying to do something clever and cursing – a lot!! 
  • Or you’ve followed my saga of the last few days on Twitter.
(more…)

Tracking runners without draining their phone battery

Running a GPS unit on a phone drains your battery quickly with all the work it has to do (measurement reports, transmission alongside your normal apps), when you are going to be running for a LONG time you need to think outside the box!

(more…)

Laravel join overwriting field names

It’s a really common thing to do with databases, join a tables with an other table, but when you have two models that have a field with the same name by default one will overwrite the other!

(more…)

Tinkering the cPanel Backup System

The backup system in cPanel doesn’t do exactly what we want, it does the job pretty well but you can’t set schedules of who wants daily backups and who wants weekly and still handle all the retentions that some hosts need.

(more…)

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…)