Securely Wiping a Hard Drive

When getting rid of a hard drive, I, like everyone else like to be secure about it. After collecting my data I usually like to overwrite the drive with garbage. In the past I used to just use the basic DD approach to zero the drive out.

dd if=/dev/zero of=/dev/sd<DRIVE>

This works fine but I started hearing rumors of being able to recover data from a zeroed out drive. Indeed this is partially true. Zeroing out is probably sufficient in most cases.

Ideally, I would write data out from /dev/random or /dev/urandom (whatever your system has) but the amount of entropy that is harnessed here is not enough to saturate the write speed of the drive meaning that it will take forever a very long time. Never the less I was curious to find out about another option to wipe a drive.

This approach uses OpenSSL with seed data from /dev/urandom. Supposedly it is possible to generate about 1.5gbps of garbage data with this technique… I’ll never know though because the write speed of my drive is nowhere near that.


Use the following command to randomize the drive/partition using a randomly-seeded AES cipher from OpenSSL (displaying the optional progress meter with pv):

# openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt </dev/zero \
    | pv -bartpes <DISK_SIZE> | dd bs=64K of=/dev/sd"X"

where the (optional) total disk size in bytes (DISK_SIZE) may be obtained via:

# blockdev --getsize64 /dev/sd"X"

Sidenote: I love the use of PV here, this is an underloved utility that is truly awesome; I’ve only ever used it in one other place. TARing a remote file over SSH for delivery on my local machine (shown below).

ssh –c blowfish user@host  "tar cjpf - /home/user/file" | pv | cat > ./file.tar.bz2

Installing A New Car Stereo in 2007-2009 Hyundai Elantra

This guide should apply to all Hyundai Elantras from 2007-2009.

From stock to Awesome!

This slideshow requires JavaScript.

Parts required:

Materials Required:

  • Soldering Iron and Solder
  • Electrical Tape


Here is the starting point.

Step 1). Loosen the Surrounding Fascia

Showing the fascia that is going to be removed.

Note the location of the gray clips below on the backside of the fascia, prying up around these points easiest. I had the most luck working on the lower left and right corners as a starting point.

This picture shows the bac side of the fascia. You can see the 8 gray clips along the top and bottom. At this point I had lost two of them in the dash in the lower right corner of the picture.

Step 2). Remove Wire Harnesses from Fascia

Once the fascia itself is loose the 3 cables that connect to it need to be removed. Start by depressing the clip which connects to the back of the hazard lights. Shown in the photo below.


You can see the wire harness connecting to the back of the hazard lights here.

Next remove the two wiring harnesses that connect to the clock (black wires) and passenger airbag sign (yellow wires) above the radio.


This picture looks up from the bottom of the radio with the fascia loosened. Notice the two wire harnesses above the radio.

Step 3). Remove the Stock Radio

Unscrew the four screws which surround the unit.

Here is the radio with the fascia removed.

Disconnect the wire harness and the antenna cable from the back of the radio.

Looking at the cables from the right side of the radio.

Step 4). Prepare the Adapter Cable

At this point I took the Metra Wire Harness adapter cable and started soldering the wires to the new wiring harness provided by the new headunit. Which wires will need to actually be connected will vary based on the capabilities of your headunit.

When looking at the photo below you can see the adapter cable beneath the stock wiring harness that stretches over the black adapter which plugs into the back of the new headunit. I took the liberty of wrapping all my wires in the harness together with a little electrical tape but you don’t HAVE to do that, it’s just a nice touch.

Showing the stock wiring harness and the adapter from metra along with the wiring harness provided by the headunit.

Step 5). Install the New Headunit

Connect the wiring harness adapter from metra into the stock wire harness. Then screw in your mounting bracket from metra using the four screw which previously held the old radio in place.

I choose to mount my new head unit using the ISO mount technique which is a bit simpler than the classic DIN method (which employs the metallic cage surrounding the headunit which needs to have some pins bent down to hold it in place). Using the ISO technique requires the removal of the DIN cage from the new headunit and attaching the side rails included in the metra mounting bracket kit. At this point, connect the cables to the back of the new headunit and slide it into place.

I choose to run an additional microphone cable that was included with my headunit for handsfree calling but don’t have any pictures of that step.

At this point you can replace the fascia and then add the trim bracket which surrounds the headunit.




Hydrogen Peroxide Mouthwash on the Cheap

The cost of mouthwash is too damn high. Jimmy McMillan may not have said those exact words, but he might as well have. The cost of two 32oz. bottles of Crest 3D White mouthwash (if you can tell me what is 3D about mouthwash you get a prize) is a few cents short of $10.00 at Sam’s Club as of this writing.  About a year ago I said enough with this nonsense and started making my own and haven’t looked back.

Hydrogen Peroxide Facts

Why do I bother?
1) Price

This stuff is basically hydrogen peroxide and some potentially carcinogenic sweeteners in a pretty bottle. I think I can get a similar result for way less.

2) Flavor

Have you ever seen a bottle of cinnamon mouthwash? Me neither — don’t let the man tell you what flavors to cleanse your mouth with. Personally I’m a spearmint man but almost all mouthwashes seem to be peppermint flavored. Mine is no different though; my wife hates cinnamon and prefers peppermint to spearmint, so guess which flavor of mouthwash I make — correct — peppermint. Someday I will taste the rainbow of other flavors… but not today.

3) Health

In a recent NIH study, hydrogen peroxide “markedly reduced the amount of plaque formed and significantly retarded gingivitis development.

Ingredients in my Crest 3D Mouthwash.


Here are a few of the ingredients that you’re avoiding by making your own H2O2 Mouthwash…

4) Simplicity

Easy ingredients you may already have around or a few clicks away on Amazon. As a matter of fact, the back of your hydrogen peroxide bottle already mentions use as a mouthwash. Here’s mine:

The back of my H2O2 bottle.

What You’ll Need:

I like to add my flavoring to the hydrogen peroxide first and then add the sweetener to make sure I get just the right flavor. For me that comes out to about 11 drops of flavor and about 1 tsp of stevia for an EXTRA punchy peppermint that is not overly sweet.

Give it a shot and leave your suggestions for other flavors or modifications in the comments. I’m sure I’ll continue to tinker with this recipe in the future.