Jami` at-Tirmidhi, Book 48, Hadith 90 (Tirmidhi 3543)

Abu Hurairah narrated that:

The Prophet said: “when you hear the crowing of the roosters, then ask Allah of His bounty, for verily they have seen an angel. When you hear the braying of a donkey, then seek refuge in Allah from Shaitan, for, verily, it has seen a Shaitan.”