A friend advised composing my obituary beforehand and leaving it in a convenient place. As with any piece of writing, it probably pays to think of one's audience.
For a history book or a genealogical inquiry,
Born:____________
Died:____________
For family and close friends:
Please forgive my insensitivities, my flare-ups and the boring parts. Remember the laughs, the loves and some of the better lines. See you later.
For rivals and enemies:
Sorry I couldn't be more of a pain. Your cleverness and tenacity gave me so many pauses, I didn't take time to reveal my true superiority but you are the better for what you got of me.
For the world:
It's a good planet and we are lucky to have it. Hope it lasts for a long time. Have fun and perspective.