Replacing Square Brackets With Sed

Posted by BadReligion Mon, 28 Sep 2009 21:21:00 GMT

For me the following do not work:

sed 's/(\[|\])//g'
sed 's/[[]]//g'
The following do work:
sed 's/[][]//g'
sed -e 's/\[//g' -e 's/\]//g'

Example:

echo '[foobar]' | sed 's/[][]//g'
>foobar

echo '[foo]bar' | sed 's/[][]//g'
>foobar

The environment is Debian 4.0, GNU sed version 4.1.5.

Posted in ,  | Tags  | 1 comment

Setup Amavisd-new

Posted by BadReligion Tue, 15 Sep 2009 09:39:00 GMT

I finally configured amavisd-new with my Postfix configuration. It is a simple setup using only ClamAV and Spamassassin. However I do want to implement DKIM through amavisd-new of course that requires a newer version of amavisd-new than is in the packaging system of the release of Ubuntu I am running.

Further I would like to switch my Linode to Debian over Ubuntu.

It is safe to expect some downtime soon likely tonight as a result of upgrading through two releases.

I will post a part 2 once the upgrade is complete and I implement DKIM with the details of what I did.

Posted in , , ,  | Tags , , , , , , , ,  | no comments

Removing Car Wax From Plastic

Posted by BadReligion Mon, 14 Sep 2009 01:43:00 GMT

My grandpa is fairly old school. Even when I drove junkers he would always make sure I was waxing the car. I would wax them every once in a while, but never gave it much attention, I just got the job done. Now I have a pretty nice car and pay more attention to detail. I also wax the car every few washes, probably about once a month. Waxing is not an easy job, once you've already cleaned the car, waxing just makes the work put into keeping your vehicle nice looking grow enormously. The work is rather tedious and exhausting.

One issue I constantly get into is getting wax on the plastic parts of cars and the rubber that seals the windows when they are up. I waxed my girlfriends car not too long ago and left some wax under the plastic bumper. Now her car is in good shape minus some paint and light body damage along the passenger side. So while getting the damage inspected, a body work professional told her the wax had soaked into the plastic from being in the sun and would need to be re-painted. Although I feel over the appropriate conditions this would happen I smelled bullshit. The bumper is mostly beneath the car and a good deal protected from the sun. I took a long soft bristled brush to the plastic and eventually got the wax off. It took some elbow grease and some persistence but it came off quite nicely.

I just finished washing and waxing my car today and did essentially the same with my rear bumper which is similarly protected from the sun. However, my side view mirrors also have the same pressed type of plastic around them and had previously had wax left on them. The car has seen a good deal of direct sunlight over a period of time. I took an old soft bristled tooth brush to the plastic and the wax came right out. Another great use for the good old used tooth brush, we keep them stashed in a junk drawer because they come in handy for a lot of different things.

Also make sure to avoid scrubbing the wax with water, it does not help at all and will keep the wax from breaking up and coming out of the plastic. I also do not recommend steel brushes or anything that could damage the plastic or surface of the paint on your car.

Update: Apparently the most common home remedy is peanut butter.

Off to drink a little more beer after a long weekend.

Posted in  | Tags , , ,  | no comments