Dodging a bullet

So I go into work, and I'm sick. Can't complete a meeting presentation. Boss makes a big deal about caring about me. I go to see doctor. In the hour I'm gone, boss writes me up for work I haven't done and schedules a meeting about performance with the head of the company. While I'm in the medical waiting room, I get word of all this from a co-worker and contact the head of the company and tell him I'm resigning. Turns out that boss had scheduled a meeting to terminate me while I'm at the doctor's office. Got out by resigning. Within minutes of my verbal resignation, he sends a nasty letter about me to HR. Not thrilled that a memo trashing me is in my file now, but I got out and HR has it on record that I resigned.

When you have the vibe that a firing is coming, act right away--even if you're in the doctor's office. Boss will get you if they can.