Latest weblog entries

2017-01-12 Finder shortcuts

I couldn't find a one-page PDF with all macOS Finder shortcut keys. So I made one: Finder shortcuts.pdf. Here is the original, so you can adjust to your liking: Finder shortcuts.xlsx. Both are licensed under the Creative Commons Attribution 4.0 International License.

2016-12-25 Firefox crashes on late 2016 MacBook Pro

I've been using Firefox on a late 2016 MacBook Pro, running macOS 10.12.2. Every time the laptop wakes from sleep, Firefox has crashed. To remedy this situation, I've created a Hammerspoon script to kill Firefox when the system goes to sleep, and start it upon waking. In Firefox Preferences -> General, you can configure a setting called "When Firefox starts". Set this to "Show my windows and tabs from last time". Then install Hammerspoon, create the folder .hammerspoon in your home directory and create the file init.lua in that new folder. Then paste the following code and in Hammerspoon, reload the configuration.

    local log ='mywatcher','debug')
    function callback(eventType)
        if (eventType == hs.caffeinate.watcher.systemWillSleep) then
            local firefox = hs.application.find('Firefox')
            if not (firefox == nil) then
        elseif (eventType == hs.caffeinate.watcher.systemDidWake) then
            local firefox = hs.application.find('Firefox')
            if (firefox == nil) then
                firefox ="/Applications/")
    local mywatcher =

2016-11-29 Firefox on macOS

To have Firefox look a little more at home on macOS, check out the following addons:

I've also noticed that Firefox 50.0.2 sometimes crashes when disconnecting the external monitor from my 2016 MacBook Pro. After restarting, it brings up the Restore Session screen with the "Well this is embarrassing" message. To turn this off, go to about:config, search for resume_from and double-click on the value browser.sessionstore.resume_from_crash so it's set to false.

2016-11-14 Questions when looking for a coworking space

I've heard the figure that every four hours, a new coworking space is created. Personally, I've got a permanent desk in a coworking space, which allows me to put down a decent monitor, some personal stuff, a USB hub with a decent keyboard and mouse, et cetera. If you're also looking for a nice (semi-)permanent desk somewhere, here's a list of questions to get a feel of the place:

  • Who is the day-to-day floormanager?
  • Who has access to this room?
  • Are desks and chairs supplied, or should I bring my own?
  • Do I get an ethernet cable? This is very important because WiFi can be iffy.
  • Is there a lock on the door? What quality is the lock and the door itself? Can I get additional keys? Can I change the lock if necessary?
  • What's the speed of the internet at work times? If they don't know, ask whether you can place high-quality Skype and Facetime calls.
  • What's the level of sound during the day? Are there people here whose main job it is to call around?
  • What kind of businesses are next to this room? Above and below it?
  • Can I enter the building 24/7 or are there limits?
  • Is cleaning included? How often is this done? What's the cost?
  • What's the cost of parking a car? Are their spots to charge an electric car?
  • Any additional costs for internet, heating, et cetera?

Be sure to write down these answers. I've had the unfortunate situation where an office manager would give me a room next to a studio, and forgot to mention this. Luckily a desk was available in another coworking room.

2016-11-08 AutoLayout in a playground

What got me confused today, was how to play with AutoLayout in a Playground. The trick is to first create a main view, akin to the view in a View Controller, that is sized with a frame (without constraints).

After that's set up, add subviews that use AutoLayout. The following works for Xcode 8.1:

    import UIKit
    let view = UIView(frame: CGRect(x: 0, y: 0, width: 500, height: 500))
    view.backgroundColor = UIColor.white
    view.layer.borderWidth = 2.0
    let licensePlateView = UIView()
    licensePlateView.translatesAutoresizingMaskIntoConstraints = false
    licensePlateView.backgroundColor = UIColor.gray
    licensePlateView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
    licensePlateView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
    licensePlateView.widthAnchor.constraint(equalToConstant: 200).isActive = true
    licensePlateView.heightAnchor.constraint(equalToConstant: 50).isActive = true


autolayout in Xcode 2016-11-08.png


Weblog Archive

Weblog entries 2016

Weblog entries 2015

Weblog entries 2014

Weblog entries 2013

Weblog entries 2012

Weblog entries 2011

Weblog entries 2010

Weblog entries 2009

Weblog entries 2008

Weblog entries 2007

Weblog entries 2006

Weblog entries 2005

Weblog entries 2004

All weblog entries


Articles, chronologically (latest first). This is pretty old stuff.


Not yet finished. Maybe will never be finished. Maybe they'll get deleted. Who knows?


System administration: