Ibn ‘Abbas said the Prophet said:
When any one dedicates himself to Allah, Allah takes care of all his needs in this life. And he who dedicates himself to the worldly life, Allah hands him to it.
For anyone who tries to commit an act through disobedience to Allah, it will be farther away from him than he hoped, and it would be closer to him if he tried through piety.
And whoever seeks the praise of people through disobedience to Allah, all those who praised him will turn and dispraise him.
And whoever pleases people through the displeasure of Allah, He will put them under their scorn.
And whoever pleases Allah through the displeasure of people, Allah will protect him from their evil.
And whoever improves his relationship with Allah, Allah will improve his relationship with people.
And whoever improves his mind, Allah will improve his open actions.
And whoever works for his heavenly life, Allah takes care of his worldly life.