Bring back the keyboard shortcut for Responsive Design Mode in Safari 11

Yesterday, I tweeted:

Today, I wipped out my favourite search engine (DuckDuckGo, obviously) and found out you can actually define your own keyboard shortcuts from the macOS Keyboard System Preferences.

  1. Open System Preferences (e.g. in the  menu at the top of the screen or in the dock).
  2. Click “Keyboard”
  3. Select “App Shortcuts” in the left pane.
  4. Click the plus icon (at the bottom left of the right pane).
  5. Select “Safari”.
  6. Type “Enter Responsive Design Mode” in the menu item box. Make sure you type it exactly as it appears in the menu. Copy from this blog post if you don’t trust your typing skills and/or are feeling lazy (I know I would).
  7. Place your cursus in the shortcut box and press the shortcut you would like to use. I went for cmd-option(alt)-shift-R (as you can see).
  8. Click add.
  9. Repeat steps 4 through 8 for “Exit Responsive Design Mode”. You can use the same shortcut.

Source: Responsive Design Mode Shortcut on the Apple Support Community.

Posted in Uncategorized | Leave a comment

Open a bunch of URLs from the clipboard in a browser on the Mac

Just now I had a bunch of URLs in a spreadsheet I wanted to quickly open. This time, it wasn’t too quick, because I went down the rabbit hole of coming up with a solution (and making a blog post about it). Next time though….


  1. Copy your URLs into the clipboard (⌘C or Edit > Copy)
  2. Open a terminal
  3. Type:
    pbpaste|tr '\n' '\0'|xargs -0 -I{} open /Applications/ {} &

Quick rundown:

  • pbpaste is a command that simply outputs your current clipboard entry. You can pipe it anywhere you like. (Incidentally, a useful counterparts is pbcopy; you can pipe the output of any other command into it and it ends up in your clipboard, ready for pasting anywhere.)
  • tr converts newlines to nulls
  • xargs is the center of this whole thing. It feeds the individual lines to a command of our choice, in this case the open command, which we tell to use Safari (you could just as easily substitute your favourite browser, assuming it accepts a URL from the command line this way).


Posted in Uncategorized | Leave a comment

DrupalJam talk: Drupal 8 Configuration Management

Last week, on wednesday May 24th, the annual Dutch Drupal conference DrupalJam had its 2017 edition in “De Fabrique” in Maarssen. After having been an attendee for quite some years, this time I submitted a proposal for a talk, which was accepted. I’m now happy to report the slides are available online: Drupal 8 Configuration Management, Workflows for Site Development.

The presentation uses Reveal.js, which means it has some neat tricks up its sleeve. You can have a look at the speaker notes bij pressing ‘s’ (they’re no secret) and zoom out to an overview of slides by pressing ‘o’ or esc. Should you want a print version, you can pass ?print-pdf as a GET-argument in the URL. It will look horrific on screen, but will come out OK on paper or in PDF form, provided you use Chrome or Chromium to do this (the presentation itself should work fine in any browser, although I’ve only really tested it in Safari on the Mac).

Posted in Uncategorized | 1 Response

One Shoe Hackathon: Conny

Yours truly on Medium:

12 developers, two teams, 24 hours. The start of the first One Shoe Hackathon was friday, february 17 at noon.


Our team implemented Conny, the next generation of people tracking. Based on camera images, Conny will keep track of where people are in the building. The Minimum Viable Product was slightly less ambitous; personalized greetings when entering the building.

Go to the original article »

Posted in Uncategorized | Leave a comment

Star Wars: Machete order

If there’s anything to know about Star Wars, it’s that the very first film released, way back in my birth year of 1977, was amended with a rather confusing label, shortly after its first release (when it became clear there were going to be sequels): “Episode IV”. Episodes V and VI followed only a few years later. When I first watched Star Wars (years later, I might add, I was proably ten or twelve), I figured it was a little gag, a way to make the story more mysterious and imply much had happened before it already. Then, 16 years after the then last Star Wars movie, in 1999, Episode I was released, followed by Episodes II and II with three-year gaps in between.

When introducing the films to new viewers (something I hope to do someday, being a long-time geek and a much-shorter-time dad), there is the obvious problem of the order in which to show the movies (some might say there is no problem, since there are only three movies worth watching, but I’m not that much of a purist). Since episode order wreaks havoc with some important twists in the original three movies, you might be tempted to go for “release order”, but I also heard of something called “Machete order”. Last week, I stumbled across the original blog post that introduces it as a thing:

Unfortunately, Release Order is also an instant failure, and the reason is a single shot. If you’re watching the official releases and you view the original trilogy first, then after the Empire is destroyed and everyone is celebrating, Luke looks over at his mentors, Ben Kenobi and Yoda, and suddenly they are joined by… some random creepy looking teenager who needs a haircut.

Machete order is IV, V, II, III, VI. Yes, that leaves out I, and when you read the blogpost, that starts to make a whole lot of sense. The above quote is not the only reason Machete order is a good idea, because a compelling case is made that the story as a whole actually works better in this order, with parallels in IV/V and II/III, and then the whole thing being tied up in VI. Next time I rewatch the Star Wars saga, I’ll give this a try for sure.

Update 20/2/2016: Not too shortly after finishing this post, I actually started watching the movies again, in Machete order. It works. And quite well, I might say. Wholeheartedly recommended. Feel free to watch Episode I, but more as part of the anthology, like Rogue One, and not so much as part of the saga.

Go to the original article »

Posted in Uncategorized | Leave a comment


John Gruber, 5 years ago:

A decade or so from now, when, say, I’m waiting for my son to come home from college for his winter break, and, when he does, he wants to spend his time going out with his friends — how much will I be willing to pay then to be able to go back in time, for one day, to now, when he’s eight years old, he wants to go to movies and play games and build Lego kits with me, and he believes in magic?

This captures my current sentiments perfectly. My daughter is 4 and my son is 20 months old.  I couldn’t be more aware of how fast everything is going and how precious these moments will be, not too long from now.

Go to the original article »

Posted in Uncategorized | Leave a comment

Running Drupal Javascript tests on Vagrant

The last three days, I was at the code sprint for the Drupal Camp Munich 2016, hosted at the Hubert Burda Media offices. It was a great experience. It was my first community code sprint, I’ve met some great people and I’ve learned a ton in three days. I have to thank the organizers of the sprint as well as the camp organizers, and of course my employer One Shoe to give me this opportunity. We have been working on the Media Initiative, to get a solid Media solution into Drupal core in an upcoming minor release (e.g. 8.3 or 8.4). Christian Fritsch, one of the main developers for the Media Initiative, asked me to have a look at one particular issue that is quite important to get sorted out, because it aims to solve a weird usability problem that certainly wouldn’t fly for a core component. I’ve been able to push it quite a bit forward in those three days. Until I got to getting Javascript tests to run on my setup, that is.

There are some solid tutorials available to get you up and running with Javascript testing for Drupal. The one I was pointed to is this one from Alex Pott. Everything seemed to go OK, until I actually went to run the tests. The test would consistently get a 403 when trying to go to the login page of the test environment. When running the test from my Mac directly, the Simpletest install didn’t seem to spin up correctly. In the end, it seems my setup with Vagrant is at the heart of the problem.

Giving this some thought*, I realised that the test environment having to run on the Vagrant box, while the test itself was running on the Mac was the likely culprit. The tutorial stresses that it is important that the tests are ran with a user with the proper permissions. Presumably, because it will need to initialize the environment which will then need to be accessed by the webserver to run the actual test. So, what do you do? Install phantomJS on Vagrant? Sure, that would have worked, most likely. But what worked too, was just setup a little port forward from port 8510 on the Vagrant box to the same port on the host:

ssh -L 8510: localhost

This is issued on the vagrant box. You may need to change the IP address of your host, if it is different, and you will need to provide the password for the vagrant account on the vagrant box (which usually is just “vagrant”).

I both love it and hate it when the solution to a problem is a one liner.

*: This sort of insight usually doesn’t come to me at the end of a long day of hard work, but instead in bed, in the shower, or, in this case, on the Lufthansa flight to Amsterdam while gazing out of the window at all the pretty lights below.


Posted in Uncategorized | Tagged , | Leave a comment

Debugging drush scripts with xdebug and PhpStorm on vagrant in 2016

This is a subject that seems to come up again and again. I figured this out once before, but back then I was using Eclipse, while I am now a PhpStorm devotee. Also, I’ve long since started using Vagrant, which means that every debugging scenario is now “remote”. Usually, this is not a huge issue, but with command line debugging, this presents a bit of a challenge.

Randy Fay has done a nice write-up back in 2013, which covers most of the bases. It does leave one missing link, which seems to have come up only recently; a recent change in drush has broken debugging through xdebug, because it is now using pcntl_exec() to execute the actual script (don’t ask me for the technical details, I haven’t delved into that too much). As is so often the case, Stack Exchange provided the missing piece of the puzzle; it’s possible to circumvent the “decoupling”, that seems to occur due to the pcntl_exec(), by using drush.launcher as the entry point.

As much for my own reference as anyone else’s, these are the key points from both Randy’s post and the SE topic:

  • Set up a “PHP Web Application” for debugging the command line. The sole purpose of this is to be able to provide a path mapping when running the command in Vagrant.
  • Enable xdebug debugging for the command line in your Vagrant box. In my case, this simply meant symlinking the same xdebug.ini from my /etc/php5/cli/conf.d directory as I was using in the /etc/php5/apache/conf.d for web debugging.
  • All executed code needs to be available in the project, including drush. You can accomplish this by e.g. installing drush as a composer dependency (also, remember to execute drush from your project).

The following you will need to do every debugging session:

  • Use PhpStorm’s “Listen for PHP Debug connections” button
  • Set the remote debug client on the command line using (or whatever is the IP-address for your host machine when coming from the Vagrant box; the xdebug.remote_connect_back that is likely in your config will not work for the command line):
    export XDEBUG_CONFIG="idekey=phpstorm remote_host="
  • Set the server configuration. Make sure the name you use matches the server name you configured in PhpStorm:
    export PHP_IDE_CONFIG="serverName=cli"
  • Execute drush by substituting “drush.launcher” for the regular drush command. Make sure you use the drush copy from your project. For example:
    ../vendor/drush/drush/drush.launcher migrate-reset-status posts
Posted in Uncategorized | 1 Response

Cutting The Mustard: Future Friendly Browser Support

Was just linked to this from an issue that is highly likely to make a big impact on Drupal’s future (Select a new client-side framework for Drupal core, worth a read in itself if you’re interested in that sort of thing). Even though it’s from 2013, it’s still a very relevant (and entertaining) set of slides about responsive web design.

Show me your fight face.

Go to the original article »

Posted in Uncategorized | Leave a comment

Apple TV: keeping the score


A little over a year ago, I wrote a blog post about my hopes and dreams for Apple TV. Then, finally, at the last Apple event on september 9 2015, Apple unveiled their plans for the next iteration of their smart TV platform. And, it has been on sale since late last month. I ordered one on the very first day of pre-orders, so I’ve had it since a few weeks now. Which means, it’s time to make up the score. Read More »

Posted in Uncategorized | Leave a comment