Nodejs / npm install global packages as normal user

This guide allows to set up npm/node so that npm install -g can be run as a normal user. This is useful to install command-line tools that should be available across multiple projects.
Based on this stackoverflow answer.

Install more recent version of node and npm

Once the above set up is done, it can be used to install a more recent version of node and npm for the current user, compared to what is available on the system (e.g. from official repository).