Green’s Dictionary of Slang

shit a brick! excl.

also shit a brick and build a house! …and fart a crowbar! shit a pebble!
[shit v. (1a)]

[1950s+] (orig. Aus.) an excl. of extreme surprise, annoyance.