Docker/Vagrant on Mac speed tests

So file synching is a pain int he ass on MacOS so I made some tests with "wrk" tool to see what is what and how much request per second can each config handle. I started with install.php on D8 site as it is more about file and less about database and caching. Tool was used with this config (30s of requests) 

Properly setup redirects from www to non-www on nginx

In many online tutorials you will find just few lines like 

server {
    server_name www.example.com;
    return 301 $scheme://example.com$request_uri;
}

but actually you need much more, you need to include SSL certificates, otherwise you will get message about insecure site so you should have this

Auto indent lines with vim

Type this to auto format a messed up file when editing with VIM

So, gg to get the start of the file, = to indent, G to the end of the file, gg=G.

Change FQDN on server

You'll want to edit /etc/hostname with your new hostname, so just go and change it and then update your /etc/hosts with

127.0.0.1 localhost
1.2.3.4 your-new-hostname