Get a child lock software and install it. Such software often has functions to limit websites to non-entertainment only.
Depending on your willpower, you might have to set a very long, random password, write it on the paper, and store that password in a place you cannot get to fast.
Depending on your willpower, you might have to set a very long, random password, write it on the paper, and store that password in a place you cannot get to fast.