Write 0 to all, then 1, then 2, then 3, up to 11111111..11 in binary for whatever size you're writing, then 0s again.
If the sequence of numbers written is known then it is possible to figure out the original data that was overwritten (within certain percentages of likelyhood).
For example, if a bit was a 1, and is rewritten to a zero the magnetic field doesn't go all the way to what is identified as a zero. if you read the strength back, and know that it was supposed to be modified to a zero you can figure out which bits were 1's prior to the change and which were 0's. The more passes made the more likely the original field gets wiped. If the bit pattern of the overwritten data is known, it makes it easier to figure out what the original data was and more passes are needed to obliterate the original data.
Your example useses a lot of passes, so it would work, but it would take a long time.
3 passes of reasonably random data would be much faster and most likely just as effective.