My favorite developer tools for OSX

Macbook Pro

Having the right tools on your computer is the key to work fast and efficient, without having to waste much time on repetitive and boring actions. Here’s a list of the current tools I use on my Macbook:

iTerm 2

The standard Terminal application in OSX is quite limited so we need a better one:

iTerm 2

iTerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with macOS 10.8 or newer. iTerm2 brings the terminal into the modern age with features you never knew you always wanted.

iTerm 2 is simply the standard terminal application for OSX. You can split windows with simple commands (cmd-d and cmd-shift-d), easy copy/paste text (just select select, no copy command needed) and click on hyperlinks without having to copy the text first (hold down CMD when you hover about the link) and many more handy features.




Homebrew installs the stuff you need that Apple didn’t.

Homebrew is literally the first thing you install on a new Mac after installing iTerm2. It’s a command line package manager that you can best compare to yum or apt-get and has about every little piece of GNU and open source software available.

Homebrew in action

Some of the other tools in the blog post will also be installed using Homebrew.



ShiftIt is an application for OSX that allows you to quickly manipulate window position and size using keyboard shortcuts. It intends to become a full featured window organizer for OSX.

I hate having windows that are not using up the full width or half width of my screen. ShiftIt offers me a few simple keyboard shortcuts to maximize or move windows to fill up my whole or part of my screen, without ever having to use my mouse.

  • ctrl-alt-cmd-m: maximize current window
  • ctrl-alt-cmd-ARROWKEY: scale windows to take up half a screen size, attached to the side of the screen which arrow key you press. Then use ctrl-alt-cmd-EQUAL and ctrl-alt-cmd-MINUS to stretch them out a bit.
  • ctrl-alt-cmd-NUMBERKEY: scale windows to 1/4th of your screen in a corner, the corner depends on the number you press


Homebrew install: brew cask install shiftit



I never ever use a password for more than 1 site, and neither should you. But since remembering tons of passwords is nearly impossible we need a password manager. For me that password manager is 1Password: it stores encrypted passwords in a file that you can sync on iCloud, Dropbox, on a network share or just copy around manual.

1Password has native apps for almost all platforms (Windows, OSX, iOS, Android) and a browser extension for all the popular browsers making filling in password forms easy. The latest version of 1Password even includes a 2FA system.

1Password is not free software, but it’s worth every cent.


One year in Sweden

I moved to Stockholm a little over a year ago now, time to have a quick look back at how that went and what I have learned about Stockholm and Sweden.


Stockholm is high-tech

People call Stockholm “The Silicon Valley of Europe”, and I have to agree with that statement. There are hundreds of startups here, with Spotify probably the most famous of them all, who attract a lot of highly educated people from all over the world. If you work as software developer or IT specialist, finding a job in Stockholm really is no problem.

That is only true if you are from inside the EU though. People from outside the EU are currently having a hard time to get accepted to work in Sweden, which is not a bad thing seeing the housing problem we currently have here (see further down).

Pro-immigrant and pro-equality site The Local writes a lot about troubles from immigrants (which I am too), often with an overly sentimental tone on how hard it is for the poor fellows to integrate into the Swedish cities and job market. It’s just as hard as for normal Swedes as well, who pay the same rent price or have to go through 20 years being in a rental queue, but they prefer to quietly ignore that fact.

Stockholm is expensive

While it’s pretty easy to find a job in software development or IT here, the opposite is true for finding a place to live. There is a big shortage of housing in all of Sweden, especially in the bigger cities like Stockholm, which is the result of years of bad planning by the housing administration.

What this means in practice is that rent prices are extremely high, if you even manage to find a place at all. Buying a place is actually quite doable, but that requires you to have saved at least 25% of the purchase price before banks will give you a loan. (The official amount is 15% but in practice you should aim for 25% to get a decent deal from banks).

Stockholm is fit

I don’t think there are a lot of cities that have as much gyms per inhabitants as Stockholm does. In the center of the town there is a gym or a CrossFit box or some other kind of sport place on every street corner. Staying fit is also well integrated into the company culture so starting late or leaving early for a gym class is accepted everywhere.

Stockholm is all about equality

Gender, race, income, religion… Sweden makes a big case about treating everyone as equals, and they love it when the world acknowledges this. Every week there’s at least one newspaper or website in the world writing about Sweden and how equal stuff is here.

But they sometimes push it a little bit too far, like the gender equal snow cleaning. It has something to do with the fact that cleaning snow on the streets for the cars (= mostly men use those) has the same priority as cleaning snow on the pavement next to schools (= mostly women use those). I think it’s more an issue of setting sane priorities in general, but what do I know?

Stockholm is lonely

Swedes tend to be quiet and reserved people and that makes it hard to make new friends here. There are also no casual chats on the subway or bus or in the elevator here, everybody just keeps to themselves. And I, as an introvert technology lover, like that.

But when it comes to dating there are still bars, gyms and Tinder like the rest of the world. Swedish people tend to losen up when they get drunk, that really is the key to meeting new people here.

Happy Swedes

Sidenote: Alcohol is expensive here and sold in government-controlled stores only, where you have to be at least 20 years old to buy stuff.

Stockholm is home.

Yep. I like it here and I’m going to stay.

Deploying a Hugo website to Amazon S3 using AWS CodeBuild

A month ago I blogged about using Bitbucket Pipelines as a deployment tool to deploy my Hugo website to AWS S3. It was a fully automated setup that deployed a new version of the site every time I pushed a commit to the master branch of the git repo.

Lately I’ve been moving more things to AWS, as having everything on AWS makes it easier to integrate stuff, including my Hugo blog. Let me show you how I set up the build process on AWS.


Firstly I moved my git repo from the public, free Bitbucket server to AWS CodeCommit. There really is nothing special to say about that: CodeCommit is simply git on AWS (details on pricing)

The only thing I want to stress, again, is that you should not use your admin user to push code but create a new IAM user with limited access so it can only push code and nothing more. The CodeCommit page will guide you with that, up to the point of creating SSH keys.

The AWS Managed Policy AWSCodeCommitFullAccess should be all the access needed, there is no need to write your own policy.


Secondly, I needed a replacement for Bitbucket Pipelines: AWS CodeBuild. Launched in December 2016, CodeBuild is almost exactly the same build system as Bitbucket Pipelines (and Travis CI, and GitLab templates, and so many other Docker-driven build systems) and there is just one thing you need to create yourself: a build template.

Here’s what I used as buildspec.yml for building and deploying my Hugo blog:

version: 0.1

    HUGO_VERSION: "0.17"
    HUGO_SHA256: "f1467e204cc469b9ca6f17c0dc4da4a620643b6d9a50cb7dce2508aaf8fbc1ea"

      - curl -Ls${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -o /tmp/hugo.tar.gz
      - echo "${HUGO_SHA256}  /tmp/hugo.tar.gz" | sha256sum -c -
      - tar xf /tmp/hugo.tar.gz -C /tmp
      - mv /tmp/hugo_${HUGO_VERSION}_linux_amd64/hugo_${HUGO_VERSION}_linux_amd64 /usr/bin/hugo
      - rm -rf /tmp/hugo*
      - hugo
      - aws s3 sync --delete public s3://BUCKETNAME --cache-control max-age=3600

The Docker image I used was the standard Ubuntu Linux 14.04 one since I don’t require any custom software during my build plan.

For more complex jobs you can provide your own Docker image to run the build process in. Make sure it includes libc, otherwise AWS will not be able to run it. Sadly this will exclude most alpine-based images, but for a build process that probably shouldn’t be a big issue.

Instead of using an IAM user by providing the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in my build template, I used the CodeBuild IAM role to define my access to the S3 bucket. CodeBuild will generate this role for you when creating a build plan, just add this custom IAM policy to that role:

    "Version": "2012-10-17",
    "Statement": [
            "Action": [
            "Resource": [
            "Effect": "Allow"

Replace BUCKETNAME with the name of your S3 bucket.

Some remarks

Right now deployment is a manual action: I log into the AWS CodeBuild site and push the Run build button. CodeBuild has no easy “Build on new commits” option, but you can of course use AWS Lambda to build that yourself. I will do that soon for my blog, and then I’ll update this post with the Lambda I used.

If you are looking for a complete pipeline system like GoCD, AWS CodePipeline is what you need.

Advanced networking on Amazon Web Services video

Watching talks like this one from AWS reInvent 2016 makes me an even bigger fan of public clouds than I already am. It starts with a simple VPC setup and scales out to a multi-region network setup using a Direct Connect connection, managed AWS services and a few Cisco EC2 instances.

You can basically create a multi-region network setup as a single engineer running a few templates and connecting a few services. The license costs for the Cisco’s for the lowest bandwidth setup is a whopping $3000 per month, but that’s still peanuts compared to running your own hardware and managing that.

I admit, it’s not a simple setup and you need a deep understanding of networking, infrastructure and application development, but isn’t that a nice goal to achieve? :)

CloudFormation template for automated EBS volume backups using AWS Lambda and CloudWatch

This is a CloudFormation template that creates a small stack that uses AWS Lambda and CloudWatch to take daily backups of EBS volumes and deletes the snapshots when their retention period has been reached.

It simply looks for EC2 instances with the tag Backup:True and then creates snapshots of all the EBS volumes attached to the.

The original idea for this setup came from these 2 blog posts, I’ve simply created a CloudFormation YAML template to automate that setup:

You can find the YAML template in my Github CloudFormation templates repository.