Tag: WCIL

I recently gave a talk about WP-CLI at WordCamp Israel 2016. I thought it would be interesting to actually demo WP-CLI in real time, rather than use boring slides.

I used OS X split screen mode, with a terminal window on one side, and a browser on the other showing the site I’m creating and editing:

The tricky part was to not have to type the commands I wanted to demo (which would be boring, and slow). Luckily, I’ve found doitlive, which takes a bash script and types the commands in a simulated window.

By default doitlive echos the characters one by one: the presenter just has to type randomly on his keyboard (like a Madman!).

But I wanted to be able to move on stage, and control the presentation using a remote. So I set doitlive’s speed option to a large number, and each command appeared with a single key press. I still needed a return to execute the command, a key not present on my remote. I worked around this by using TextExpander to replace ‘b’ (from the ‘Black Screen’ button) with a newline.

The result: each command required just two button presses. (The truth: I forgot to turn on TextExpander, so I had to go back to the lectern for every single command. Bah.)

Some tips that might help if you’re planning to do something similar:

Use the `-g` param when opening a url in the browser to keep the focus on the terminal window

Write a cleanup/prep script that sets up your environment the way you need it before the demo (empty the db, delete or rename files, etc)

Rehearse. A lot. This is true for every presentation, but is a must with live demos.

Here’s the script I’ve used, split into commented sections. I’ll link to the video once it’s up on WordPress.tv.