How do you demagnetize a nail?

You can bash it on a table to bash the magnetic domains around and they mix around so they can't stick to another magnet. Test it out