Dockering with cardboard

Although the PiGlow visualisation of CPU usage was pretty, we reckoned we could go a couple of steps further and integrate a much more complete tangible solution - a hardware-driven load monitor dashboard. Made of cardboard. This was to be driven by two high torque servos (Ben had them lying around) which would rotate according to whichever performance indicator we chose. Servos are not, of course, very good pointers so with a trusty craft knife to the fore we re-purposed some Pi packaging into a cardboard user interface. On the code side, we particularly wanted to monitor the load across the entire cluster so we ended up writing our own Python HTTP API with Flask and copied client scripts over continue...

Visualising Docker on Pi with PiGlow

In my last post I described how I set up a 5-strong Raspberry Pi Docker swarm. It wasn't long before I realised I wanted some ambient way to see how they were performing which a) didn't involve staring at a screen and b) would wind up the cat. Luckily my friend Ben was round and he's quite into tangible stuff so after rummaging in a few dusty boxes for inspiration we found a PiGlow and wondered if that would do the trick. We stuck the PiGlow on top of the swarm and sure enough, thanks to the great Python PiGlow library from the pirates over at Pimoroni, we managed to get the LEDs to map the CPU usage. As ever continue...

Git directory server vulnerability

Do you use git to manage your site and or server files? In my opinion, this is undoubtably a good way to run things but you need to make sure it's secure. Just try going to yoursite.com/.git/config. If you haven't secured your server properly, you will see the configuration file for your git repository. Not good, huh? Not only could an attacker reveal lots of information about your code base including where the upstream server is, I believe they could possibly get the entire source. This would allow the attacker to see exactly how the site works and be able to exploit it very easily. Now, the good news. It's an easy fix! Here are the two continue...

Drones, Zeros and Cake

We all love drones. We all love cake. And we all love Raspberry Pi. What better way to spend an afternoon than to kick up at my mate Ben's house, borrow his faster internet and combine all of those things. We started the day by wrapping a Pi Zero and camera module in excessive amounts of electrical tape and sticking it to Ben's 250-class racing drone. Sounds cool huh? Not only did it work amazingly well, it didn't impact the performance of the quad at all. Pretty good for a 1 GHz fully featured Linux box! As you can see from the image above, the camera module was orientated so as to get a birds eye view from the drone's continue...

RStudio Server

My father, Ben Anderson plays with numbers. As his Twitter bio says "big data, small data, open data, any data". He works with R a lot and has been persuading me to take a look at it. I've held off until now because I'm all for analysing data in real time (primarily using delightful JS libraries such as Chart.js and D3.js). As far as I understood it, R is geared towards static data analysis and because of that, is able to utilise the hardware it runs on to optimise computations. Dad has an SSD in his Mac which reduces the time to load data substantially, but he also makes use of the R package data.table. This library continue...

A URL shortener written in ten minutes

Friday night, or more specifically, Friday February 26th 2016 at 19:45:57, I was having a group Skype call with Alexander Craggs, Miles Budden and Tom Emmerson when Alexander started complaining that all the URL shorteners out there were becoming too long. To clarify, URL shorteners were becoming bloated. He suddenly said, "Let's make a URL shortener". The situation escalated very rapidly and within 5 minutes, Miles had bought the domain subr.pw for an astronomical price of £0.60, I had setup Nginx on the server used for the majority of SubjectRefresh's projects and Alexander had setup the codebase and had a Node.js skeleton ready to go. We went with subr.pw for two reasons. The first continue...

RAM Card Fun

My ageing hand-me-down MacBook (late 2007 - 1GB RAM) has been serving me well - it ended it's OS X life in the Autumn of last year and has been running Linux Mint 17 ever since - we call it the MintBook. Linux has been a saviour. Making the shift was easy enough (having used GNU/Linux before - mainly in Raspberry Pis and web servers), the ease of software development has been greatly improved (bar Xcode of course!) and it has basically resurrected an almost dead laptop. However, 1GB of RAM really isn't good enough to run as a multi-purpose development/recreational machine. I could put Ubuntu on a Pi 2 model B and have practically the same results. continue...