To perk up. Realize that one's own misfortune is another's gain, and to derive happiness from such a realization.

Usually uttered by one who is gaining.