Stoic Meditations
Just like a catchy tune won't leave your mind easily, once it has gained access, so with thoughts of unvirtuous actions. So don't grant them entrance in the first place.
En liten tjänst av I'm With Friends. Finns även på engelska.