Dua Waking Up from a Bad Dream

"If any of you saw a dream which he liked, then that was from Allah, and he should thank Allah for it and tell it to others. But if he saw something else, i.e. a dream that he did not like, then that is from Satan and he should seek refuge with Allah from it and should not tell it to anybody for it will not harm him." (B)
"A good dream is from Allah and a bad dream is from Satan. So whoever has seen (in a dream) something he disliked, then he should spit without saliva thrice on his left side and seek refuge with Allah from Satan by saying:
اعوذ بالله من الشيطان الرجيم
'A'oothu bilahe minashaitan arajeem.'
(I seek refuge with Allah from the accursed devil.)
Then it will not harm him, and Satan cannot appear in my shape.' (B & M)