I got the idea to have a secret compartment in a hat from an episode of Survivorman where a guy pulls a hook and line out of the zippered compartment on his hat. I tried looking online to buy one for myself but didn't have much luck finding any so I decided it was time to make one.
Making the hat is very easy, it's deciding what to stash in the zippered compartment that's the hard part. I put all kinds of survival gear in mine like a fishing hook, line, matches, pocketknife, sunscreen packet, etc. I also add a length of paracord around the hat as Stormdrane teaches in his Instructable http://www.instructables.com/id/Paracord-Chain-Sinnet-Fast-Deploy-Boonie-Hatband/ .
Step 1: Materials
-a boonie hat (can be found online or from a military surplus)
-fabric (something sturdy)
-zipper (I salvaged mine from a cd case)
-any other sewing things you like to use like a threader or pins
Cut the fabric down the middle to add the zipper. Sew one side of the fabric upside-down onto the zipper so that it can be folded over to make a nice line and hide where you sewed. Repeat with the other piece of the fabric.
I added the other picture to show that I obviously can't sew but that that doesn't really matter since all stitches will be hidden.