Shader that is only visible when the face normal points up
As mentioned in the comments on your question, this can be achieved using the Geometry Node and the Separate XYZ Node. Using the Z output will give you a range of black and white values based on how much the normal of the face is pointing along the Z axis. A ColorRamp node could be used to isolate the parts of the mesh that are pointing straight up (completely white) but the math node works a bit better in this case. I used the Greater Than operation and connected the Z output to the top, and put a number just below 1 in the bottom input. Note that a number like 0.99999 will be displayed as 1, but not treated as such. This will then isolate the parts of the mesh that are pointing straight up or down, and the output can be used as the factor for a mix node.

Here's a quick scene showing my setup on an object: