Review: PaperbackSwap.com

PaperBackSwap.com is a website for people who want to trade paperback (and other) books. It allows you to post the list of books you have available to send. When somebody sees a book they want, they send you a "credit" to mail it to them. You can then use the credit to order a different book from any other member. (You also get a few free credits when you sign up and post your first nine books.)

I've been using this service for two months and have been quite happy with the process. They make sending books very easy with ready-to-print address labels (that double as book mailers). They will soon be adding the ability to print postage directly on the address labels, which will make sending books even easier.

Refilling laptop batteries!

The Li-Ion battery in my IBM Thinkpad X31 laptop has been getting a bit long in the tooth. Rated at a 4.4 AH capacity new, /proc/acpi/battery/BAT0/info told me that it was only holding 1.8 AH now that it was a few years old. (This is normal for Li-Ion batteries, which degrade over time, even without multiple charge-discharge cycles.)

X31 laptop battery

 A brand new IBM (or Lenovo now) battery costs over a hundred dollars, but by shopping around I was able to find a "compatible" battery for as low as $50. It was only rated at 4.4AH, but that is relatively close to the 2nd generation 4.8AH batteries that IBM/Lenovo sell for twice as much. I started to wonder if it might be cheaper to buy  OEM li-ion cells and simply replace the cells (keeping the case, and charge/discharge electronics). The first step would be to determine what type of Li-Ion cells I'd need to buy, so I decided to open up my old battery.

Continue reading

Search and Replace a string in many files recursively on unix

find /net/hc287/summetj/research/dist1 -name "Root"
-exec perl -pi.bak -e's/summetj\@flux.cc.gatech.edu:/summetj\@wilks1.cc.gatech.edu:/g' {} \;

The above command line will find all files named "Root" recursively under the  /net/hc287/summetj/research/dist1 direcotry and execute perl to replace the string "summetj\@flux.cc.gatech.edu:" with the string "summetj\@wilks1.cc.gatech.edu:"  It also keeps a backup of all the changed files as Root.bak, just in case….

The {} is replaced by the find command with the name of the file, while the \; tells find's -exec command where the program arguments end. The @ signs are escaped by \'s.  This is useful if you need to search and replace a string in many files in a directory tree to update some settings, for example, if the CVSROOT machine has been changed from flux to wilks1 and you don't want to do a full new checkout of 45MB over a slow link.

Google error message

This is the first time I've ever seen an error message from any google service. I was browsing Google News and opened a news story in a seperate tab. Aparently, the google click-tracking (that forwards you to the news story) was having problems. As you'd expect from their homepage, the error message is very simple and to the point.

google Error Message