LordKingSquirrel.com

Sponsored Links


From an Undisclosed Location

June 2nd, 2008 · No Comments

Well, not really. I’m down in Georgia for some Army training, which is why I haven’t posted in quite some time now.

I can tell you this - Georgia is HOT, and it’s only the first part of June. But other than being hot, I’m doing Ok and will try to post more often - I now have access to the Internet from my room and that will make things much easier in that regard.

If you liked this post, get free updates by email or RSS.

Posted in General | No Comments

More Computer Surgery

April 1st, 2008 · No Comments

Tagged with:    • 

My wife’s Powerbook has been acting up a bit - not only has it been showing its age performance-wise, the hard drive starting making distressing sounds. We thought about a new Mac Mini for her, but she decided she liked the notebook form factor better. A new MacBook is not in our budget right now, so I decided to be Mr. Fixit and have a go at upgrading it a bit.

I bought more RAM, maxing out the Powerbook at 2GB, and picked up a new Hitachi hard drive. Her old drive was 80GB, the new one is a 160GB, both at 5400 RPM. I followed the directions from iFixit.com for replacing the drive, but it still was a bit of work.

First, my small hex screwdriver’s shaft broke free of the handle - so when I twisted the handle, the shaft stayed nicely in place. Using a pliers to grip the business end, I managed to get the hex headed screws out. Then I had a heck of a time getting the upper case to release. I did get it done, but not without some slight damage to the aluminum case above the optical slot. It doesn’t look too bad, but it’s there if you look for it.

I read some recommendations for the software app “SuperDuper” to create a backup of the old drive. Well, I did that, but not everything seemed to make it over. When I restored that copy to the new drive, some of the applications needed re-registering and all her preferences seemed gone with the wind. Uh-oh. I found all the registration keys except for Photoshop (and I never did find the media for Virtual PC - good luck ordering that antique from the Microsoft website). That just wouldn’t do, as she uses both those applications extensively.

What to do, what to do…

Well, I slapped the old drive into a external case, and used the installers disk utility to make an image (the Image from Folder option) to a second external drive, and then used that image to Restore From Image to the new drive. That worked great, although it took a long time to do.

So my dear wife’s Powerbook has a new lease on life, and all is well.

If you liked this post, get free updates by email or RSS.

Posted in General | No Comments

Another silly email math trick

March 25th, 2008 · No Comments

Tagged with:  

I received the following email today about this “amazing math trick”. The mathematically inclined should see the trick right away, but an explanation follows the puzzle. It is a pretty standard trick, and I find it interesting that many smart people seem memorized by this type of thing. I guess it’s like the easy crosswords in a Dell puzzle book - you knock them out quick like just to prove you can.

THIS IS NEAT, IT WORKS. TRY IT, IT’S FUN.

YOUR AGE BY EATING OUT

Don’t tell me your age; you probably would tell a falsehood anyway-but your waiter may know!

YOUR AGE BY DINER & RESTAURANT MATH

DON’T CHEAT BY SCROLLING DOWN FIRST!

It takes less than a minute. Work this out as you read .

Be sure you don’t read the bottom until you’ve worked it out!

This is not one of those waste of time things, it’s fun.

1. First of all, pick the number of times a week that you would like to go out to eat. (more than once but less than 10)

2. Multiply this number by 2 (just to be bold)

3. Add 5

4. Multiply it by 50

5. If you have already had your birthday this year add 1758. If you haven’t, add 1757.

6. Now subtract the four digit year that you were born.

You should have a three digit number

The first digit of this was your original number. (I.e., How many times
you want to go out to restaurants in a week.)

The next two numbers are

YOUR AGE ! —— (Oh YES, it is!)

THIS IS THE ONLY YEAR (2008) IT WILL EVER WORK, SO SPREAD IT AROUND WHILE IT LASTS

Ok, this “trick” is pretty simple (and so not too “amazing”). If you write out the calculations, you get the formula:

{ [ ( x * 2 ) + 5 ] * 50 } + 1757 - y, where x is the number of times you want to eat out, and y is your birth year

Now, doing some distribution, we can rewrite this as:

50( x * 2 ) + [ 50(5) + 1757 ] - y

50(x * 2) will shift the number of times you want to eat out over two orders of magnitude, so 2 times per week becomes 200.

50(5) + 1757 adds up to 2007 (if you use 1758 you get, of course, 2008), so when you subtract your birth year, you get your age. Then you add your age to the shifted times-per-week, and you get the magic three digit number.

As for only working for this year, true, but just use 1758/1759 next year and it’ll work then too.

If you liked this post, get free updates by email or RSS.

Posted in General | No Comments

Back in the Saddle - sort of

March 13th, 2008 · 3 Comments

Tagged with:    • 

A while back I wrote about the “death” of my iBook. I’ve been getting by by sharing my wife’s PowerBook (which made things tough when we were working on a website or something) and pressing into service our older Dell Inspiron 5100 (ok, but issues with battery life and the fact that the “T” key cap seems to be missing).

Over the weekend I broke down and purchased an HP DV6000 from WalMart. Yes, I would have preferred another Apple, but although I consider them to be about the same price point as a comparable Windows machine, I just didn’t have that much spare change. The HP clocked in at about $550, which I couldn’t match from Apple even with a Military discount. Maybe in a year or two I can re-upgrade to the MacBook Pro or something.

I do have to say that the HP has incredibly sharp graphics, and the AMD dual-core processor does an adequate job with Vista (Home Premium). I’ve been surprised with Vista given all the bad press it has received. I won’t attempt a review right now, but although here are a few annoyances (nothing that I wouldn’t expect moving to a new OS), it’s worked pretty well for me so far.

The biggest problem has been finding replacements for all the OS X software I’ve been using for development. Having SSH and SFTP built into the shell (like OS X) is so convenient, and even though Putty works Ok, I still miss that nice integration. So I’m open to suggestions for things like:

  • SFTP client. Command line or GUI based.
  • Good, free, editor. On the Mac side I use SubEthaEdit. Open Source would be great, but not a requirement.
  • Anything else you all can think of

Remember, even though I use XP at work, I’m a Unix/Linux guy at heart, so I’m behind on my Windows tools knowledge.

If you liked this post, get free updates by email or RSS.

Posted in Programming | 3 Comments

Mod_Rewrite to the rescue

March 4th, 2008 · No Comments

Tagged with:  

My wife and I have a little on-line store and it was being hammered by some sort of spammish attack. As part of this attack, the bot put a domain (e.g. www.whatever.cn) in the query string of the URL. Since our site would never have a string like that as a parameter, I used mod_rewrite to “fix” the problem.

Here’s the pertinent bit from the .htaccess file:


RewriteEngine on
RewriteCond %{QUERY_STRING} .*www.*
RewriteRule ^.*$ - [F,L]

The attackers now get a 403 error. The example I took this from actually redirected the bot to Google, but I wasn’t sure how Google would react to that (would they, for instance, flag our site for referring all that crap to them), so I elected for a simple 403.

If you are interested in a good set of mod_rewrite tips, check out this page on askapache.com

If you liked this post, get free updates by email or RSS.

Posted in General | No Comments