The first one is existing product(s) --- Google "magnetic USB cable" for plenty of examples --- probably all made by the same small set of factories in China.
http://www.aliexpress.com/store/product/1-Piece-Moizen-Micro...
http://www.aliexpress.com/store/product/1-Piece-Moizen-Micro...