How to create a Debian VirtualBox machine with Packer with an additional host-only adapter

For a project I am working on, there is this virtual machine we can use to do our development work in. This machine has grown organically and I want to replace it with something I can reproduce. I wanted to experiment with Packer but had problems with generating a machine with two network adapters where the second one is connected to a host-only network.

Bash set builtin

Shell scripts I come across sometimes have for instance “#!/bin/bash -eux” on the first line. Because I’ve Googled for this too many times now, I’ll record the meaning of these options here for my own sanity.

How does the Django Cross-site request forgery protection work?

Dan Poirier wrote an article on the Caktus Group blog about common web site security vulnerabilities. In it he talked about the CSRF protection in Django. Although he is right about a CSRF token having to be part of the POST request, this is not the entire story.