I don't know, hate to say that but you will just have to keep yourself in check. I don't know if there really is a secret. For example, I'm trying to lose weight, I can get a lot of inspiration or advice but I'm the only one who can stop myself from eating the wrong food. Does that make sense?
One thing I do is avoid the junk food in the first place, but when I can't I pray and remind myself why I'm doing what I'm doing.