1. Keep it under your hat
You may be dying to share your plans, but best button your lip till you have told your boss something concrete. If you need advice, go to family and friends.
2. Be sensitive
When you tell your colleagues, don't wax lyrical about life 'out of this dump'. Explain yourself to everyone in the same way, and be open - you want your team feeling positive towards the move, not bitching about it.
3. Appreciate what you've learnt
Look back to see how the job has helped you develop. Let your bosses know, and explain how things could be better for your replacement.
4. Be a pro
Even if things have panned out badly, resist the temptation to walk off with a company laptop, tell people what you really think or leave a nasty surprise on the boss's desk. That will only come back to bite you.
5. Prepare the handover
Tie up loose ends and log progress on projects. Tell clients and partners you're off, and introduce your replacement, if possible. Train them up too - better than just counting down the days.
6. Ask for a reference
This won't be a problem unless your spell there was an unmitigated disaster. Your new bosses are bound to request it.
7. Don't diss the old place
Slating your ex-boss won't impress your new one. Explaining how your old company couldn't handle your maverick methods will set alarm bells ringing. And they might be golf buddies...