Network, camera, action!

For a while now I’ve been running a couple of Raspberry Pi’s as security cameras. They use the ‘motion’ software to spot movement, then save a wee video of the action then upload it to a network drive hosted on a Synology DS115J NAS.

It only just dawned on me that the Synology has a package called ‘Surveillance Station’ which is meant to do just that.

As I’m bound to forget, and it might be useful to others, here’s the settings needed to use the Pi as an IP camera:

Screen Shot 2016-07-28 at 16.52.40

Needle in a Paperstack

Somehow I’ve amassed a huuuuge collection of over 10,000 desktop wallpaper images, which I’ve set to appear in a random order.

Every now and then one pops up that needs culling, or maybe being granted longer than the sixty seconds each one currently gets.

Problem is, with that many images it’s impossible to work out which one is which, so I came up with the following Apple Script to open the current wallpaper image file in Finder.

 

tell application "System Events" to set folderPath to pictures folder of current desktop

set picturePath to folderPath & "/" & paragraph 1 of (do shell script "ls -tu " & quoted form of folderPath)

set realPath to POSIX file picturePath

tell application "Finder" to reveal realPath

 

Drupal to WordPress

I’ve been using Drupal to build websites for years now. I’ve used it for a few of my own sites, and for a number of client sites. Since version three point something I’ve been comfortable with it’s often weird ways and always been able to mould it into whatever it was I was trying to build.

drupal-logo

I’ve read books on it, I’ve build themes from scratch and coded the odd module. I’ve listened to many a podcast on the subject and generally been in that world.

But a couple of things happened recently that have made me reconsider and, in the first instance at least, start switching over to WordPress.

The first thing was my blog being hacked. I missed a critical security update to the core Drupal platform and nasties got in and took over my site. Ok, these things happen, my fault really. After nuking the site from orbit and restoring from backup I put it behind me.

The second thing was me flipping out and ranting about ‘it shouldn’t be this hard to put a picture where I want it!’ when adding a blog entry. I’d not noticed how backward Drupal had become over time when performing the basics of content editing. It’s just not acceptable nowadays to need to tweak a million and one things just to add text and images to a blog post. Just search the web for ‘wysiwyg editing drupal’ to see what I mean.

The third thing was Drupal 8 was released. And to my dismay, it still needed FTP and files copying about in order to apply core updates, and basic content editing seemed no better.

Sorry Drupal, but life’s too short to be swimming against that tide any more.

A quick WordPress install later, and I can now install themes and plugins via the dashboard, and also apply security updates. Minor ones can even be set to install automatically.

Content editing is so much better, with no strange behaviour owing the complex behaviour of text filters, and if I want an image, I just drag and drop to upload it and it ‘just works’.

wordpress-logo-hoz-rgb

Drupal has always been a more developer-centric platform and WordPress more user-centric, but over time WordPress has evolved it’s developer side whereas Drupal still feels clunky from a user perspective.

Sorry Drupal but you seem to have got carried away with the latest PHP dohicky and database widget behind the scenes and lost sight of the user experience, and WordPress is stealing your lunch.

Synology Packt Book Grabber

Over the years I’ve bought a fair few of Packt Publishing’s IT books – they’re pretty good. Somehow though, I managed to remain blissfuly unaware of their free book a day thingy until recently.

https://www.packtpub.com/packt/offers/free-learning

It’s very good at it’s main aim, which is getting people to visit their site frequently. But I’m forgetful so it’s best for all concerned if a computer does that for me, and claims my free daily book.

As well as being forgetfull I’m also pretty lazy so I looked for a pre-existing solution, and found this:

https://github.com/draconar/grab_packt

Here’s how to install it on a Synology DS115J NAS
Continue reading “Synology Packt Book Grabber”

Business : Development

coding

Somehow I’ve been writing code for a living for 20 odd years now. During that time I think I’ve spent some time as almost all of the stereotypical developer types, including:

  • The new guy who thinks he knows better than everyone else.
  • The old hand with a whopping two years experience who definitely knows it all now.
  • The team leader who has to deal with newbies who think they know everything.

And so on.
Continue reading “Business : Development”