It is reported that ‘Umar b. Al-Khattāb – Allāh be pleased with him – said:

Whoever exposes himself to suspicion, let him blame only himself for whoever suspects him.
He who covers his secret is in a position to choose [to correct himself].
Assume the best about your brother until what comes to you from him overcomes you [and you have to change your opinion].
You can never pay back someone who disobeys Allāh in his dealings with you with anything better than obeying Allāh in your dealings with him.
Take righteous brothers [as friends]; acquire them in plenty, for they are a beautification in prosperity and an aid during calamity.
Do not ask about what has not yet happened until it actually happens, for what has happened is enough of an occupation to worry about what has not happened.
Let not your speech be given freely except to those who want to hear it and will value it.
Do not seek help in fulfilling a need you have except from someone who wants success for you in that endeavor.
Do not consult except people who fear Allāh, and do not accompany the sinner, [lest]  you learn his sinfulness.
And be humble at the graves.

Abū Dāwūd, Kitāb Al-Zuhd article 89.