Magnets are a pretty useful way keep things organised and out of the way, and we've talked before about different ways of attaching and using them. If you need to attach a magnet securely to an object where other methods might not work, heat shrink tubing may be just the thing.
As Instructables user WilliamH11 points out, it couldn't be simpler. Just get the heat shrink tubing in place, insert the magnet, and heat the tubing to shrink it down and secure the magnet in place. Simple? Yes, but simple can be pretty effective.
Fasten Magnets with Heat Shrink Tubing [Instructables]