Hubot and Slack

I’m enjoying using hubot to integrate services very easily and both give updates and respond to commands in chat. One of my hubots chats to us in slack rather than in IRC, and there are a couple of gotchas that I wish I’d known about before I started!

  • Hubot will not respond to you in PM, you need to join a channel and then /invite @hubot and your bot will join you in that channel and then respond when you address him/her by name
  • When configuring channel names for slack (I use the gitlab plugin which needs a GITLAB_CHANNEL environment variable), do NOT include a # at the start of it if you use slack – works a treat in IRC, but skip it for slack. I spent quite a while looking for a bug in the slack adapter before I figured this one out so it’s written here for me to look up next time!
  • Also note that your hubot can only speak in channels that it has joined; I have seen hubot actually crash when asked to speak in a channel that exists but which isn’t known to it.

I think this central way of having plugins which can integrate with many messaging platforms on one side, and integrate with many external APIs on the other means we’ll be doing much more in chat ops moving forward. Already I’m impressed by how many of the hosted tools I use have webhooks, although there aren’t hubot plugins for all of them (yet!).

Todotxt on Android and Ubuntu

I’m a big fan of good tools, however struggle to find products that fit me because there are some key constraints:

  • I use Linux (specifically Ubuntu 14.10)
  • I don’t use a pointing device. At all. If I can’t use a tool from the keyboard, I can’t use it at all (as a side effect, I use keyboard enablers in my browser so if your website has “helper” keyboard shortcuts, I probably can’t use that either)
  • My other devices (phone, tablet, work phone) are all android

Taken together, this makes finding tools a challenge – but I’ve had good experiences with todotxt and the ecosystem around it. Continue reading

Status Check on All Vagrant Machines

Much of the development I do these days uses vagrant machines to make sure that my code is running in the correct environment. This is great, but spinning up too many machines at once can rather stretch the resources of the computer you’re running them on – and I keep starting up machines and then forgetting about them!

It turns out that (since vagrant 1.6) you can ask vagrant to tell you which of its machines are running, using the command:

vagrant global-status

Where did all my system resources go? Now I know!

Vim and HTML Tags with the Surround Plugin

Marking up documents is always tedious, and usually there are shortcuts available. My favourite document format tool is Pandoc, literally a box of document-conversion tricks! Today though I was not so lucky so I marked up a plain text file as HTML by hand … or rather, using my favourite vim tricks so I thought I’d share them.
Continue reading

Announcing the Git Workbook

I’m very pleasedtitle_page to announce the immediate availability of my new book Git Workbook, costing $20 from LeanPub. This is a book that you “do” rather than “read”; it’s a series of chapters (30 ish so far) each covering one specific git skill.

Each chapter includes an explanation of the skill in question, followed by a hands-on exercise so that you can work through the skill yourself, and ends with a tickbox so you can keep track of how far through you are. It has quizzes, diagrams, mildly amusing stories, and as many other examples as I could think of that could help anyone to take in this technical topic and understand how to apply the techniques covered. Continue reading

Git Submodules for Dependent or Common Code

Submodules are one of the most powerful and most mistrusted features in git, at least in the web development part of the internet where I spend my time. I’ve seen them go horribly wrong, but I’ve also had teams adopt submodules and have their development process run much more smoothly as a result – so I thought I’d take a moment out of my day to write down the process (and the gotchas) of development with submodules. Continue reading

Ada Lovelace Day: The Women Who Share My Journey

It’s Ada Lovelace Day. If you don’t know what that is, you can read more about it here: http://findingada.com/. Go ahead, I’ll wait.

While being a woman in tech can be isolating, the women I meet along this journey make the experience what it is. I have fabulous male friends and mentors also, but today I’m focussing on the women around me. They are the modern-day equivalent of the cousins that you grow up with, share stories with, laugh and cry with. They have shared the personal and the professional, the joy and the fear. Today seems like a good time to call out some of the women that I’m so glad to have around me. Continue reading

Install CharlesProxy CA Certificate on Android

I use Charles Proxy extensively for debugging all kinds of applications, and lately I’ve been using it more with mobile devices. One of the killer features of Charles is its ability to intercept SSL traffic. This is hard – and rightly so, it should be difficult to inspect SSL traffic!

Charles handles this by using the server’s SSL certificate for the connection from Charles to the remote server, and then using Charles’ own SSL certificate for the “last mile” back to your browser or device. This means that the connection will be flagged as insecure; Charles’ certificates aren’t trusted by your browser or device – but we can easily change that. Continue reading

Adding Npm to a PHP Travis Project

Like most PHP developers, I’m polyglot. My PHP project builds with phing, but uses a bunch of npm tools along the way to minify assets and those types of things. When I introduced TravisCI into my project, I was instantly confused by the requirement to specify the technology I was using … all of them, surely?

In need of wisdom and advice, I turned to the best source I know:

Continue reading