Nawawi Hadith #19: Be Mindful of Allaah and Allaah will Protect You
(English Translation of the meaning)
On the authority of Abu 'Abbaas 'Abdillaah bin 'Abbaas (radiAllaahu anhumaa) who said:
One day I was behind the Prophet (sallAllaahu alayhi wa sallam) [riding on the same mount] and he said:
O young man, I shall teach you some words [of advice]: Be Mindful of Allaah and Allaah will protect you. Be Mindful of Allaah and you will find Him in front of you. If you ask, then ask Allaah [alone]; and if you seek help, then seek help from Allaah [alone]. And know that if the Nation were to gather together to benefit you with anything, they would not benefit you except with what Allaah had already prescribed for you. And if they were to gather together to harm you with anything, they would not harm you except with what Allaah had already prescribed against you. The Pens have been lifted and the Pages have dried.
(It was related by at-Tirmidhee, who said it was a Good and Sound Hadeeth.)