From The Blog

Copying CouchDB Data Between Laptops

I'm a regular and happy user of Apache CouchDB, so much so in fact that I'm writing a library to talk to it from PHP. While working on tweaking a feature, I realised that the laptop I use for development didn't have the right/enough data on it to test this particular thing - but that I had a suitable database on my other laptop. Copying data between CouchDB installations is very easy because it has an HTTP API, but usually when I do this at least one endpoint is web-accessible. Enter one of my favourite tools: ngrok.

Ngrok allows me to make the CouchDB on one machine visible to the world (with all the security caveats that this entails! It's a random URL, never leave the tunnel open longer than you need it, etc) with a command like this:

ngrok http 5984

This opens a tunnel to my local machine on port 5984 which is CouchDB's default port. I'm running a local dev instance that doesn't need a username or password which makes this simpler if not exactly secure. I get a gobbledeegook ngrok URL that will allow anyone, anywhere to talk to my CouchDB.

Then I went ahead and on the other laptop, used the web interface to start replication from the sample products database on the local machine over to the one on the ngrok URL.

As soon as it starts, the first laptop shows that there's traffic coming over the ngrok link - and a few minutes later I had the database I wanted and can go ahead and work on this feature.

Slack Enterprise Grid and BotKit

I have the pleasure of using Slack Enterprise Grid on a daily basis as IBM has adopted it internally, I work there, and there are far too many of us to use a single slack instance. The main downside of Slack Enterprise Grid (apart from having about 15 slack organisations running in your client all the time) is that it returns different data when integrating with the Slack Web API and RTM (Real Time Messaging) systems. We had some bot integration that stopped working as a result, and I ended up moving to BotKit and then using a mixture of the RTM and Web API from Slack to get things to work. I won't remember how I did it so I thought I'd better write it down. Continue reading

Login and Switch Spaces With Bluemix CLI

After answering a bunch of questions about the Bluemix CLI tool for IBM Cloud, I thought I'd share my personal cheatsheet in case it helps anyone looking for examples! Continue reading


Talks, Articles, Podcasts, and More

Slides

The Future of Functions


CodeMotion Milan, November 2017
Slides

Becoming Polyglot


CodeMotion Milan, November 2017
Slides

PostgreSQL: Beyond The Basics


PyCon UK, October 2017
Slides

Fun with Serverless Python


PyCon UK, October 2017
Slides

Fun With Serverless JavaScript


International JavaScript Conference, October 2017
Slides

Queues With RabbitMQ


International PHP Conference, October 2017