It's hard. I've been sober for 6 months now from my most recent bad habit, weed; and over two years now from my hate/love relationship with cocaine(I was a user for about3-4 years, not continuously, with periods of up to a 5-6 months at a time without it).
While most days I don't think about it smoking weed, sometimes I think it would be easier to just go buy some. But then I remember how it affected me, made me paranoid more than having a good time; I would binge eating uncontrollably most of the time as well-
I would never get anywhere in terms of motivation to improve my life, just numb myself.
As for the other; the few times I think about it I remember the bloody noses, the constant being 'sick,' the not being able to sleep, the crankiness of coming down, etc.
It all keeps me from wanting to go near it again. And while the psychological addiction of it is strong (I think I have a oral fixation a bit), I know that the good of staying sober outweighs any imagined benefits I might get from using again.
So I guess what's helped the most is remembering all the negative aspects of my using to make me not want to go back to it. I hope this helps.