It's important to figure out why your brain remembers weed (your triggers, one of which seems to be boredom), and exactly what your brain's turning to weed for (the reward it expects, which might be relaxation or just a faster passage of time).
If you can remove the triggers, your brain won't remember it as much, so you'll be less likely to go for it. Like themyththeman said, a hobby would do fine, specially if it's something that takes you away from the environments where you usually smoke at the times when you usually smoke. Anyway, try to make it harder for you to get a smoke.
If you identify what your brain wants the weed for, you can replace it. It might not be just the chemical reactions, it might be the things you do leading up to smoking, or the occupation. It might take some work, but it's worth thinking *AND WRITING* about it. Really dig into it and journal your thoughts. Once you have ideas, start experimenting with replacements that don't make you feel guilty.