"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.