Getting Disqus working on localhost

I wanted to see how the Disqus comment block will look in my Ghost installation before pushing it to production, but I couldn't get the localhost setup working. All I got was "Unable to load Disqus" message :-(. There are different tutorials on how to get Disqus working…