I think the "to thine own self be true" line could mean to look out for yourself and your reputation above all else. Some people read it as a contradiction to all of the previous cliches about how to be live a good life, but I think it is a logical conclusion to the list.
I tend to agree with those who've mentioned the fact that Polonius really likes to hear himself talk and dispenses more wasted breath than he does useful advice.
I am struck in many ways most deeply by his last line about being true to yourself over all else. Couldn't this be interpreted as simply being selfish over anything else? Of course you could say that it means sticking to your principles, etc., but given Polonius' behavior and his general ineptitude, I tend to lean towards thinking it is the former rather than the latter. And what terrible advice! I think I've seen quite a few who may live by those words, and it doesn't seem to be the path towards success in the sense of having friends and living a happy life!
Polonius is a moron, were that he were a fishmonger!
His advice is nothing but cliches. He lives by cliches and tells his son to live by cliches and he thinks in cliches. He is a pompous simpleton who speaks much and says little. He is more of a jester than an advisor. He is a yes man to Claudius.
Polonius' advice includes: know your friends and choose them wisely; don't speak everything you think; be friendly, but not vulgar; keep your old friends close, but don't be too quick to bring new, unfamiliar, friends into the fold; don't be too quick to be involved in a fight; once you're in the fight, see it to the end; be a good listener, but don't be too quick to speak; be open-minded to all ideas and opinions, but don't be quick to judge; dress as well as you can afford, but don't overdo; don't borrow or lend money; above all else, be true to yourself.
Although Polonius is a talker who rambles much of the time, his advice is decent advice which Laertes would be wise to follow. Of course, Polonius proves that he does not trust his son to follow the advice since he sends Reynaldo to go and ask around about his son's reputation and actions--if he runs with women, drinks too much, etc.
Let's apply one of Polonius's precepts to Hamlet's behavior:
Hamlet does play his cards close to the vest. Outside of his two trusted friends, Horatio and Marcellus, Hamlet keeps his suspicions and thoughts completely to himself. Hamlet recognizes that seeking vengeance against Claudius for the suspected murder of the king would very well be viewed by many Danes as an unproportioned act. Hence his dilemma--take action, risk his own life, ruin his mother's life, or stand by and watch a probable murderer profit from his father's death?
I'll get the discussion started by saying that no, no one lives by that code because the code is incoherent. Polonious is a pompous blowhard (is that one word or two?) who is being made fun of here. He spends most of the speech telling his son how to be careful to cater to everything one could think of (probably a weak summary, but I'm only getting a buck for this!), and then concludes by telling him to be true to himself. He is being Polonius.
His code of behavior is basically, "Do as I say, not as I do." It is one of the most famous hypocritical speeches of all time. He then ends the speech about being oneself after talking about don't be yourself but take all of this advice.