"If you hear the crow of a rooster, ask Allaah for his bounty for it has seen an angel and if you hear the braying of an ass, seek refuge in Allaah for it has seen a devil."  Also "If you hear the barking of dogs or the braying of asses at night, seek refuge in Allaah for they see what you do not." 
أَعُوذُ بِاللَّهِ مِنَ الشَّيْطَانِ الرَّجِيـمِ
I seek refuge in Allah from Satan the outcast.
'A'oothu billaahi minash-Shaytaanir-rajeem.
 Al-Bukhari, Muslim 4/2092.  Abu Dawud 4/327, Ahmed 3/306