Tuesday, September 15, 2009

 

cvs update: ignoring CVS/Root because it specifies a non-existent repository

I had some trouble re-building a cygwin filesystem with a cvs repository. I got a lot of errors like:
cvs update: ignoring CVS/Root because it specifies a non-existent repository
cvs update: cannot open directory /cygdrive/c/cvs/ppc/memtest/code/drivers/dma_v: No such file or directory
It turned out that some of the files in the CVS/ directory had CR/LF dos mode terminations. When I converted these files to unix mode (LF only), all was well again.
$ find . -name Entries -exec dos2unix \{\} \;
$ find . -name Root -exec dos2unix \{\} \;
$ find . -name Repository -exec dos2unix \{\} \;
I am not sure how these files became this way, nor how it worked before.

Labels: , , ,


Thursday, May 28, 2009

 

Renew US Passport by Mail


My US passport is expiring and I qualify to renew it by mail, so here is what I did.

1. Fill out form DS-82 online.
Then print it on your printer (Adobe Acrobat required).

2. Get picture taken
I used Costco for $5. They take your picture with a digital camera and print it on their one-hour photo equipment. The camera has a passport photo template on the LCD display, and the clerk showed it to me for approval.

Some US Post Offices will take your picture for $15.
Next time I might try Passport photos for free.

3. Mail in form
They suggest using a full sized envelope, so you don't have to bend the form, but I folded it in thirds and used a business sized envelope with two first class stamps. The photo is positioned so it won't get bent when the form is folded in thirds.

Also send in your old passport, two passport photos (one stapled to the form), and a check for $75.
They suggest you use a service with delivery confirmation, but I didn't bother because I figured I would have to do it all over anyway if it was lost.

Furthermore, I didn't find the hints page until I was almost done.

They return your old passport (with holes punched in it to invalidate it), so you get to keep all your old passport stamps.

4. Timeline
On May 20, 2009 I mailed it at the post office.
On May 27, 2009 the US Passport status page says it is currently being processed.
On May 28, 2009 they cashed my check (you agree they will scan and process your check electronically)
On June 18, 2009 the US Passport status page says it has finished processing and gave a Priority Mail delivery confirmation number.
On June 18, 2009 I received my new passport. 4 weeks and one day, as promised.
On June 21, 2009 I received my old passport in a separate mailing.

Labels: ,


Monday, July 28, 2008

 

Building with LEGO


I've always felt that I need to do a LEGO project, but I never got around to it.

LEGO's are very expensive, so I started to look around for sources of cheap LEGO's. They don't seem to show up much at garage sales and thrift stores. People seem to keep them, and I guess they don't take up much room.
Ebay is like a box of chocolates; You never know what you are going to get.

Looking at new sets, the cheapest I found were:
6177 LEGO Basic Bricks Deluxe
This set contains 650 bricks for $25. It was available at my local LEGO store so I didn't have to pay shipping and got instant gratification. The picture above is of the set all put together.
5578 LEGO Basic Bricks Large
500 bricks for $20 looks good too.

Labels:


Friday, January 11, 2008

 

Source Control with git and cygwin

I have been using CVS for years, but I wanted to check in an entire tree like SVN.
I looked at switching to SVN, but ended up switching to git instead.

If you use git on cygwin, you must be sure your disks are mounted binmode or your database will get corrupted!

I had all my disks but one mounted binmode, but I also had a symbolic link that ended up using that one textmode mount. This corrupted the index and I got:

error: bad index file sha1 signature
fatal: index file corrupt

After trying many things, I deleted .git/index and ran git-reset which regenerated the file.

Saturday, August 11, 2007

 

Library Card Barcode

I hate carrying around a lot of plastic cards, so I print important numbers on a piece of paper and carry that around instead.

This works fine except for my library card which has a barcode.

I tried scanning the card but when printed, the barcode wasn't very clear.

So I downloaded a free codabar barcode font and encoded "A12345678901234A" (begin and end with A and 14 digits in between).

The Redwood City Public Library (the Peninsula Library System) uses this barcode format, but many other libraries use it too.

Wednesday, July 04, 2007

 

Hughes HDVR2 Tivo Power Supply Repair

My brother's Hughes HDVR2 Tivo failed.

First, it crashed several times over a month and had to be power cycled.

Then, it wouldn't turn on at all and just made a tick, tick, tick, tick noise.

From visual inspection, I noticed that capacitor C18 in the power supply was bulging slightly. It is in the center of the photo and is very subtle, but you can compare it to the other capacitors and see a difference.

The original was a Teapo SC series, 2200uF 16V, low ESR capacitor. I replaced it with a Nichicon PW series, 2200uF 16V, low impedance capacitor, part number 647-UPW1C222MHD from Mouser Electronics (who have no minimum order).

Just for good measure (and because I bought more than one) I also put a capacitor in C31 which was not stuffed in the original board.

Be sure to use a low ESR (also known as a low impedance) capacitor.
If you don't, it may work in the beginning but will quickly fail.

All electrolytic capacitors have a limited operating life (measured in thousands of hours), so this is an especially weak point for devices that are always powered on.

Be certain that the white ribbon cable between the power supply and the main board is plugged in all the way. It can be misaligned and short contacts causing irreparable damage to the power supply and the main board.

I have only done this with a Hughes HDVR2, but weaknees.com says the same power supply is used in the Hughes SD-DVR40, SD-DVR80, SD-DVR120, the Philips DSR7000, DSR704, DSR708, the RCA DVR39, DVR40, DVR80, DVR120, and the Samsung S4040R, S4080R, S4120R.

WARNING! The power supply includes unshielded contacts that are directly connected to line voltage. THIS CAN KILL YOU. Do not work on a power supply when it is plugged in. Do not work on power supplies if you don't know what you are doing.

This is only a report of what I did to fix a Tivo. It is for educational use only.

Monday, June 04, 2007

 

Large Format Scanner

I have been looking for a way to scan my 12" by 13" scrapbook pages.

The largest consumer scanners I could find were 8.5" by 14". I tried using a camera and a tripod, but I was getting reflections off my glossy prints and having focus problems.

Finally, I tried stitching together several scans of the same page, and it looked great!

I have an HP Scanjet G3010 photo scanner.

I used the included HP Photosmart Premier software which includes a panorama stitching utility. I was worried that you would be able to see the stitch line, especially in high resolution photographs, but I was very pleasantly surprised.

The only place you can see any stitching is on the edge, and I could have cropped that out.

My stitched pages are at April 1985. They were all scanned in two passes.

Labels: , ,


Wednesday, May 02, 2007

 

Lyophilization

Lyophilization was a question on "Who Wants to be a Millionaire" today.
I didn't know that it means freeze drying, so I looked it up.

In the process they freeze the food and put it under high pressure.
The water (now ice) sublimates to a gas and is drawn off.

You are left with food that is 90% smaller by weight and about the same volume.

Monday, February 26, 2007

 

DVD Laser Lens Cleaner

I had two DVD players that stopped recognizing discs. One of them got stuck and wouldn't even let me eject the disc. I actually bought a new player so I could watch movies, but I never got rid of the old player (I could still play CD's).

Today I bought a Radio Shack Compact Disc Laser Lens Cleaner (Cat No 42-227). I didn't have high expectations, but I thought I would try it anyway.

And it worked! Both DVD players work fine now. I wonder what I should do with them.

Saturday, February 03, 2007

 

Satellites and the Earth's Circumference

Geostationary satellites (like DirectTV) orbit the Earth about 36,000 kilometers above the equator. (NB. A geosynchronous satellite can oscillate north or south above a point on the equator. A geostationary satellite is a kind of geosynchronous satellite that doesn't move relative to the Earth.)

The circumference of the Earth is about 40,000 kilometers. Since the signal must go to and from the satellite, it travels the distance of two trips around the Earth!

Incidentally, 20,000 leagues is about 111,000 kilometers, so Captain Nemo traveled just under three times around the Earth (and not 20,000 leagues deep which would be impossible).

Friday, January 26, 2007

 

Apache Log Download

I have been having trouble downloading the Apache access.log via ftp since Apache owns the file and keeps it open. I would have to log into the server, copy the file and then ftp the copy.

But since Apache owns the file, it can read it anytime. So I added the following code to the alias section of httpd.conf:
    Alias /logs/ "C:/Program Files/Apache Group/Apache/logs/"

<Directory "C:/Program Files/Apache Group/Apache/logs/">
Options Indexes
AuthName "Members Only"
AuthType Basic
AuthUserFile "C:/Program Files/Apache Group/Apache/.htpasswd"
Require valid-user
</Directory>
And created .htpasswd using the htpasswd program.

This gives me password protected access to all my log files at http://hostname/logs/.

keywords: windows apache server access.log

Friday, November 17, 2006

 

Windows Fax Machine

Recently I needed to send a fax, but I don't have a fax machine.

I realized I do have a fax modem (that I haven't used since I signed up for DSL), so I went looking for some software. I discovered fax software already installed on my computer as part of Microsoft Windows 2000.

The fax behaves like a printer. You just print to it and it prompts you for the telephone number.

It was very easy.

You can also set it up to receive faxes, but I didn't do this because I didn't need to.

Monday, November 06, 2006

 

Linux 2.6 Block Device Driver

Recently, I had to make an MMC card work under Linux 2.6.

I found a very simple block device driver on this page:
https://lwn.net/Articles/58719/

Source is here:
https://lwn.net/Articles/58720/

The article is about porting a block device from 2.4 to 2.6, but it gave a good description of Linux block devices in general.

The source implements a ram disk, but it is very easy to substitute your own code for your device.

To use the device, find its major_number in /proc/devices and create the device with:
mknod /dev/sbd0 b major_number minor_number

Usually the minor_number is the partition number.
Then you can mount it and use it.

Friday, June 16, 2006

 

Mercury and Gold

I have read that the San Francisco Bay is contaminated with mercury from the 1849 Gold Rush, but I always wondered how mercury was used for gold mining.

Mercury forms an amalgam with gold. An amalgam is just a special name for an alloy (metal mixture) with mercury. Dentists use a gold or silver amalgam for filling teeth.

As an amalgam the gold flakes to clump together, so they are easier to separate from sand and dirt.

Use of amalgam in dentistry is controversial because mercury causes brain damage. Hat makers once used mercury to soften felt. As they absorbed mercury they slowly went insane. Hence the term "mad as a hatter" and the Mad Hatter in Alice in Wonderland.

Saturday, May 20, 2006

 

Caltrain Seats

Caltrain is the commuter train that serves the Penninsula in the San Francisco Bay Area (From San Francisco to San Jose).

Today I discovered that the seats are arranged so they face the center of the car. Since the door is in the center of the car, if you want to ride facing forward, find a seat toward the rear of the car.

Friday, April 28, 2006

 

BART Trains

BART (Bay Area Rapid Transit) train stations in the San Francisco Bay Area, have markings for 20 doors. Each train car has two doors and the doors are 35 feet apart (This is assuming the floor tiles are one foot square).

You never see a BART train longer than ten cars, because it would not fit in the station.

(This is what I do when I am waiting for the train)

Tuesday, April 25, 2006

 

SBC Yahoo DSL Anti-Virus Software

SBC (now AT&T) Yahoo DSL includes free anti-virus software. It is a package from Computer Associates.

I have never had a virus or spyware problem, but I am paranoid and yet too cheap to spend money on anti-virus software, so I installed the free software.

It seems to work okay (How would I know? It's never found anything...), but it runs a whole bunch of programs in the background:

VetMsg.exe
iSafe.exe
CAVTray.exe
CAVRid.exe
yop.exe
ycommon.exe

The DSL modem includes a firewall, so I figure I am relatively safe.

Sunday, April 23, 2006

 

Adware Infestation

My sister recently had a horrible adware infestation. She was running an updated version of Trend Micro PC-cillin which didn't do anything.

I was loathe to have her edit the registry since she lives in another state and I wouldn't be able to fix it if something went wrong.

Eventually we found www.ewido.net that cleaned everything up automatically.

This page is powered by Blogger. Isn't yours?