Create self signed certificate

Today i started a project what utilized IdentityServer and for that i needed a signed certificate. This post might not be the best explained, but more like a reminder for my self.