From Mostly Harmless, the final book of the five-part Hitch-Hiker's Guide to the Galaxy Trilogy:
'It says in the brochure,' said Arthur, pulling it out of his pocket and looking at it again, 'that I can have a special prayer, individually tailored to me and my special needs.'
'Oh, all right,' said the old man. 'Here's a prayer for you. Got a pencil?'
'Yes,' said Arthur.
'It goes like this. Let's see now: "Protect me from knowing what I don't need to know. Protect me from even knowing that there are things to know that I don't know. Protect me from knowing that I decided not to know the things that I decided not to know about. Amen." That's it. It's what you pray silently inside yourself anyway, so you may as well have it out in the open.'
'Hmmm,' said Arthur. 'Well, thank you-'
'There's another prayer that goes with it that's very important,' continued the old man, 'so you'd better jot this down, too.'
'It goes, "Lord, lord, lord..." It's best to put that bit in, just in case. You can never be too sure. "Lord, lord, lord. Protect me from the consequences of the above prayer. Amen."
Man, I love those books...