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

My ffmpeg Cookbook

I have been doing more screencasting lately, so I thought I'd share some recipes here, for my own future use and in case anyone else wants to use them. I capture my videos using Kazam on Ubuntu, usually by resizing my second monitor to 800x600 and then capturing that. Kinda eye-bleeding to record but looks good in playback and also works well either in tiny web view or on a big screen. I also screencapture my android device and for that I use Screen Recorder.

Continue reading

View Only Headers with Curl

When working with curl, it can give lots of excellent and detailed information, but sometimes it is too much! Today I'm fiddling with the caching headers on a client's application, so I'm only interested in seeing the headers and not the body of the response. Making a HEAD request changes the output I get, so I really do want to GET and then only see the headers.

Handily, when you use the -v verbose flag with curl, it sends the output to stdout as usual, but the extra information including the headers goes to stderr. This means that I can therefore view the headers only throwing away stdout completely:

curl -v -s http://awesome-site.com 1> /dev/null

(you need the -s to stop curl from "helpfully" printing progress bars as well)