Invocation upon hearing the cock's crow or the bray of a donkey

 228. When you hear the cock's crow, ask Allah for His favor upon you for surely it has seen an angel . When you hear the bray of a donkey, seek refuge in Allah from Satan, for surely it has seen a devil.

Reference: Al-Bukhari, cf. Al-Asqalani, Fathul-Bari 6/350, Muslim 4/2092.