You shouldn't wear any socks. Wear bare feet or training shoes. If you need shoes, check with your sensei in advance to make sure you wear what is allowed in the dojo.
Your fingernails and toenails should be clean, and short. Some dojos might also require that no nail polish be worn. No jewellery at all, not even a wedding band.
Bow before entering the dojo floor (is that universal? I do aikido but I've seen it elsewhere too)
I always thought you were supposed to bow before entering. At least, that's how it is at the dojang I go to.
For karate you always bow when you enter the dojo.
If a guest sensei comes to teach a class, bow to her when she enters the dojo as well (if you're already inside).
When working with a partner (sparring or bunkai), bow to him before you start working together and after you finish.
General tip for bowing: copy the senior students. Bow when they bow.
When in doubt, ask for a copy of the dojo rules. When in doubt during class, copy the senior students. The best is to copy the senior brown belt if you're a kyu (coloured) belt and another black belt if you're a black belt. Sometimes etiquette is different for kyu belts and black belts. Black belts should know their own dojo rules of course, but different dojos have different rules.
If a senior student or the sensei corrects you, do it. Do not talk back or question the correction in any way.
Be a good sport when sparring.