When I fall off the low carb wagon (lots of times) I tell myself what I am going to eat when I get a craving for carbs. I decide beforehand and stock up. "I will eat as much bacon and eggs as it takes to stop me wanting cookies." And I do it. Even if I have to eat a dozen eggs and a pack of bacon in a day. In fact I often have to stuff myself with low carb items before the cravings go.
Another thing that helps me is I've noticed a pattern in my cravings. I'm busy at home or work all morning and afternoon and am not thinking about eating. In fact, I often do intermittent fasting by skipping breakfast and just drinking water or tea in the morning until or even after lunchtime. But after dinner, usually an hour or two after, I'm no longer busy; I'm sat down with my laptop or book and suddenly I'm craving carbs. But as I have come to expect it, I also know what to do: get up and fry some eggs and bacon
For what it's worth, it usually takes me a full two weeks of eating strict low carb before the cravings stop. Then it's plain sailing again.
(Edited for clarity)