Matthew 6:1-4 (But) take care not to perform righteous deeds in order that people may see them; otherwise, you will have no recompense from your heavenly Father. When you give alms, do not blow a trumpet before you, as the hypocrites do in the synagogues and in the streets to win the praise of others. Amen, I say to you, they have received their reward. But when you give alms, do not let your left hand know what your right is doing, so that your almsgiving may be secret. And your Father who sees in secret will repay you.
Something I've learned is that trying to do good and not get caught doesn't just act to kill vanity and pride, it is also like fertilizer for the virtue of charity. As I attempt to conceal the good that I do, it becomes easier to assume the same in others. Or at least give them the benefit of the doubt.