I usually give a couple weeks notice, I've occasionally gotten counter-offers but never accepted. When asked I have given feedback.
For a couple of companies where I truly loved working for I gave them as much notice as possible and turned over 100% of what I knew. I couldn't give them my experience but I did give them knowledge. At one company I was contracting for, by doing this I amazed my boss at how much information I had collected over the years. She did try to arrange my employment either as a direct hire or another contract house (with the company absorbing the penalty) but neither could come close to match the learning opportunity that I was being given. If either of those places had an opening that would support what I need to make I would go back in a hearbeat, and I know they would love to have me.
I do love the company that I work for now (I might be a contractor but the company I am at now treats us as employees).