|Broken centerboard from her dinghy, Scout|
The basic idea is that if you crack off the plastic case from a USB stick, you're left with a USB connector sticking out of a circuit board. Smother the lot in glue, leaving only the USB connector uncovered, and there's no way for water to get in. It's got no moving parts, so as long as you don't break off the USB connector you can't do much harm to it. Since Margaret lives on a boat, I thought sinking might be a loss mechanism, so I figured I'd hollow out a piece of wood to install it in. So off I went to the local hackerspace. I took a tree branch that came down in a recent storm, cut a segment, cut that into cap and body components, and used a drill press to hollow it out. I also made little holes through the far end and the side, and cut little pockets to hold rare-earth magnets. Finally I drilled a pair of holes on the sides to accommodate little eyelets.
Assembling the USB stick was a matter of coating the circuit board with plumber's goop (actually I think that's Goop™, the official name of the glue) and sliding it into the cavity. I kept wiggling it and adding additional goop to make sure all the voids were filled, including the two channels I had left open. I glued the magnets in place in a similar way. Once it had dried, I unpeeled the tape I had covered the working surface of the USB connector with, tied a cord through the eyelets so it could be attached to a keychain (and so the cap won't be lost) and tested it out.
Not only did the USB stick still work fine, the little channels I had left worked perfectly: the LED on the USB stick shone through the transparent goop and is visible on the side and end of the stick, even though the channels are not obvious when the LED is not lit. The cap fits well and clicks fairly firmly into place magnetically.