Brainfart (n.) - a period of fuckwittedness during which a task requiring non-fuckwittedness was attempted.

eg/ "I must have had a complete brainfart when I laid those pipes."