I'm going to have to make a habit of reading Esther Derby's advice more often. In her blog, Esther Derby gives 10 very good pieces of advice for developers to maintain the appearance of value. I agree with every point in the list.
Being visibly valuable is very important. I've been told that back in the day at Control Data, there was a big sign that read "An ounce of perception is worth a pound of performance." It's absolutely true that real performance is only worth what people perceive.
My own additional advice to people is to be cheerful and make your manager's job easier. The first part is because I think there are enough people who choose to express their negative emotions. Be genuine though. A forced smile is far more unsettling than a genuine scowl.
I think the second part is a little more complicated than it sounds. Making a manager's job easier isn't about being a yes man. It isn't about brown nosing either. Making your manager's job easier is about finding their pain points and removing/lessening them.
One thing I found was helpful is approaching a conversation about a problem with an application. I don't like doing this because it seems like you're coming to your boss with something bad and bringing a lot to the manager without any help on making it better.
One approach people take when communicating a problem with their manager is simply to report the problem. If this is something simple and typical I think it's OK to just fix the problem then report that there was an issue and you resolved it. If there's anything new about the issue though you may come off as a loose cannon.
Another approach is to just fix the problem and report that the problem was fixed. I think that an approach in the middle is best. When I find a problem I try to think of at least one viable solution before I report the problem to my manager. I think this is a nice way to build the perception that you're someone who brings a solution when reporting a problem. The manager may not agree with the solution, but at least you're adding some value to the message.
It's really simple, don't add to your manager's problems and contribute to the things that helps her. If it does come time for your manager to make a tough decision, being the person who makes their job easier is going to help you out a lot more than being the person who makes their job harder.