Reset and sync local git repository with remote branch

Messed up your local files and git repo?
Just clean up the mess and make it like the remote master branch again:

git fetch origin
git reset --hard origin/master
git clean -f -d

Your local branch is now an exact copy of the remote branch.

How to create a MySQL/MariaDB database and user

When you want to create a new Database for MySQL or MariaDB and an extra DB user for it:

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON MYNEWDB.* TO 'newuser'@'localhost';

This will create a general purpose database user, that can not only read and write data, but also modify the structure of the database, like ALTER or DROP tables.