This project was to build a simple garage security system to alert of intruder access to the garage by notification over Wifi.
Parts list Wemos D1 mini & mini protoboard The esp8266 is the workhorse of any project - it monitors the sensors and sends notifications over Wifi. I used the Arduino system with Platformio for development.
For the small amount of circuitry required one of these tiny protoboards:
, to flash the new firmware.
A 3.3V breadboard power supply (only required for testing, safer than using mains!
[Read More]
Deploying a scikit-learn classifier to production
Scikit-learn is a great python library for all sorts of machine learning algorithms, and really well documented for the model development side of things. But once you have a trained classifier and are ready to run it in production, how do you go about doing this?
There’s a few managed services that will do it for you, but for my situation these weren’t a good fit. We just wanted to deploy the model onto a modest sized Digital Ocean instance, as a REST API that can be externally queried.
[Read More]
Easy-peasy github releases for go projects using travis
A general theme of this blog is making life easier (or programmer laziness), so continuing in this vane this is a quick post on automated releases of go executables onto your github releases page.
One of the strengths of go (which just got even easier with 1.5) is the ability to cross-compile self-contained executables - I find this particularly handy to get command line tools onto remote servers (though as with fine arts, wines, etc always be sure you trust the provenance of random executables you download…).
[Read More]
Automatically publishing Hugo blogs to S3
The process traditionally is:
create a new blog article, edit it some, save. run hugo on the command line to generate the static site. copy/sync the public directory onto your webserver. Needing a webserver, build environment and text editor is a bit of hassle. It’s all a bit manual too. I’ve previously blogged about hosting on S3, but I wanted to see if a static blog could be managed entirely on free/hosted services.
[Read More]
Hello, Hugo!
Been neglecting this blog for a while (check: blog cliché), but just migrated across from Pelican to Hugo, so thought this warrants a quick “check this out” post…
Hugo? There’s a bit of a buzz around Hugo in the (albeit niche) world of static-blog-generation-tools. Though Pelican has been great, it feels like the world is slowly moving on from python.
Or maybe I’m just a sucker for new stuff. :-)
[Read More]
Elasticsearch as a smart cache
A novel use of Elasticsearch in the context of holiday search, not as a traditional store of persistent documents, but as a rolling cache of transient holiday packages. This puts unique demands on Elasticsearch in terms of index and deletion rate, concurrent to a high query rate.
Figures below are from February 2014, so will have changed.
Fancy a holiday? The travel industry works around the principal of ‘dynamic packaging’ of holidays.
[Read More]
docker fish completion
Command completion for docker in the fish shell
I’ve just released a handy completion definition for the fish shell.
fish?
Fish whilst not as popular as zsh/bash is a far better shell. Make the switch ;-)
install docker completion
$ mkdir ~/.config/fish/completions
$ wget https://raw.github.com/barnybug/docker-fish-completion/master/docker.fish -O ~/.config/fish/completions/docker.fish
example
% docker run -[TAB]
--attach (Attach to stdin, stdout or stderr.)
...
% docker run -t -i [TAB]
busybox:latest (Image)
ubuntu:12.04 (Image)
% docker run -t -i busybox:latest
/ #