I try to remember the 4 D's (in no particular order).
Distance
Delay
Distract
Decide
Distance - If food is in your house, go outside. If you're at a party, go to a room where the food isn't under your nose. Etc.
Delay - If you can delay yourself by even one hour, you can potentially minimize the amount you eat before bedtime, especially if you're the type who finds it hard to stop once you start (like myself). 2 hours of eating is better than 3 hours of eating.
Distract - Find something else to do. If you don't feel like going outside, paint your nails, take a bath, write a haiku about how much you want Doritos. Maybe prepare a list of potential distractions.
Decide - Sometimes it's that wishy-washy-ness that can get you. Force yourself to make a clear decision, maybe even a plan. For example, I can decide that a binge is inevitable, but at least I'll start with broth, veggies, fruit, or some other low-cal food to help satiate any hunger and then move on to the naughtier foods to address the cravings. I may binge, but I can at least reduce the damage I do.
And of course, always remember there are tons of us here who struggle with the same issues and no one is here to judge anyone else.
