Archives for November 2008

A simple “google for” Tcl script

I make extensive use of Google throughout the day and I’ve always got “g” set up as the keyword for a Quick Search in Firefox. However, I also spend a lot of time at shell prompts, and sometimes I don’t want to bounce to a browser just to Google for something.

So, tonight, I wrote a small Tcl script that lets me “google for” at the prompt. Just save the previous link and rename it to “google” and move it somewhere in your PATH like /usr/local/bin, then make it executable with chmod 755.

The script requires Tcl with tDOM installed, as well as Tidy–both of these things are installed out-of-the-box on MacOS X 10.5 Leopard.

Once you get the script installed, you can do something like this:

'google for' screenshot

If you notice, for Google search queries that have a special result like the one above, the script displays it separately before the results. The script also emits the search query URL so you can just Control-click on it in Terminal and then select “Open URL” and have it pop up in your browser, which also works for any of the search result URLs.

I don’t know if anyone else would find this script useful, but it’s already saved me a ton of time–especially when I’m on a slow 64 kb/s GPRS connection like I am this evening. Either way, I’m releasing this script into the public domain.

Tags: , ,

SAA’s in-flight entertainment runs on Linux, apparently

Apparently, South African Airways runs some kind of Linux for their in-flight entertainment system.

In-flight entertainment FAIL

Of course, on the leg of the trip from New York to Senegal, the flight staff kept rebooting the system trying to get it to work, with very little luck. Most of the time we just stared at the Linux boot process hanging, trying to talk to the NFS server. Fortunately, they got it working for the Senegal to South Africa leg of the trip.

Tags: , ,

Vodacom 3G speed tests in Johannesburg and at Sun City

Just a quick post with a few speed tests captured at Cresta Shopping Center in Johannesburg and at Sun City near Pilanesburg.

Cresta Shopping Center

Vodacom 3G speed test at Cresta Shopping Center

Sun City

Vodacom 3G speed test at Sun City

Tags: , , ,

Vodacom 3G with Huawei Mobile Connect E172 in South Africa

This morning I stopped into the Vodacom store in Cresta Shopping Center, where I picked up a Huawei Mobile Connect E172 USB adapter for around R2,400 (roughly USD $240) without a contract. I purchased a SIM card for another R12, and signed up for a 5GB/mo data bundle for R980.

Vodafone E172 (Huawei Mobile Connect) USB adapter

First impression: If this is 3G, then 3G just isn’t that impressive. Right from the shopping center, my speed tests were showing 82 ms pings (nice!) but only 1,075 kb/s down and 324 kb/s up. It’s very usable, but nowhere close to the “7.2 mbit/s” sales pitch of 3G. Still, the low latency makes it suitable for VoIP calling which is great.

What does impress me is the fact that right now I am sitting in Pilanesburg at Kwa Maritane and I’m able to get a GPRS connection, 539 ms ping with 47 kb/s down and 28 kb/s up. I’m practically “in the middle of nowhere” and I can still get GPRS. Back in America, this would almost certainly be a dead spot with no reception at all.

I’ll be here for the week, trying to survive on this slow connection–it’s okay for pushing and pulling emails without attachments and simpler web pages, but it’s going to make doing most of my work really challenging. I might have to pop down to Sun City to see if I can get better speeds to work with.

Tags: , , , , ,

Oh, that first cigarette always tastes SO good

Arrived in South Africa safe and sound as well as all our luggage. The kids were freaking awesome–they’re really cut out to be world travellers. I even survived the 18 hour stretch without a cigarette, without being all cranky and stuff.

Now, we’re at my mother- and father-in-law’s house in Victory Park, Gauteng and for now I’m using their ADSL connection. Here’s the speedtest.net results:

Speed test of Telkom SA ADSL

Tomorrow, we head into Cresta Shopping Center so I can pick up a HSPDA/3G card for my MacBook Pro and a few SIM cards for our BlackBerry phones so we can make local calls.

I’m being called downstairs for dinner, but I’ll try to fill in some more details when I get a chance.

Tags: , ,

The great voyage of 2008

High-level map of South Africa.

I haven’t blogged about this yet, but tonight, we leave for South Africa for six weeks. We’re taking the kids with us, and they’re going to miss a few weeks of school in exchange for what will hopefully be an invaluable learning experience.

We will be visiting my spouse’s fairly large family all over the place. There will be places to go and people to see. We’ll be there through the holidays, returning in the new year.

I will be online as much as I can be through various connectivity methods–it’ll be interesting to see where and how I can get connected around the country.

If there are any South Africans reading this blog, feel free to share any tips or suggestions you might have. Thanks.

Tags: , ,

My Mongolian ball-in-cage puzzle, solved!

I love problem solving and puzzles. My friend Christina brought me back a fun one from her trip to Mongolia. Here it is, solved:

Mongolian ball-in-cage puzzle, solved

Apparently this puzzle type is what Stewart Coffin calls “Locked Nest.”

It may not look like much, but the challenge is to assemble it from a completely disassembled state. It’s not only geometrically challenging, having to visualize the pieces in their final states, but physically challenging, having to hold the thing together as you put it together. Several times, while I was working on the puzzle, a pin would slide out or a rod would be out of alignment and the pin would miss it.

This is definitely a puzzle I’ll enjoy solving many times over. It’s quite challenging.

Tags: , ,

The world would be better off without you!

Can you believe this crap? I mean, look:

Prosecutors say Drew, 49, of O’Fallon, Missouri, helped create a false-identity MySpace account and harassed Meier with cruel messages.

Meier, who was being treated for depression, hanged herself after allegedly receiving messages saying the world would be better off without her.

So, some kid becomes an hero and they want to prosecute using the Computer Fraud and Abuse Act? That is absurd.

Sure, what Lori Drew did to Megan Meier–sending cruel messages–wasn’t nice. But, “not nice” in this case is in no way criminal! Otherwise, there’s crimes being committed every day in school yards, offices, customer service departments, etc., across the country. Seriously, where do we draw the line?

I’m sure it doesn’t need to be asked, but where were Megan’s parents in all of this?

I hope the trial jurors are smart enough to figure out how ridiculous this whole thing is. Case law really needs to be established here so no one else can get crucified like this.

Before you go flying into a rage in my comments section about how insensitive I am, or how I’ve got it all wrong … listen carefully: the world would be better off without you! Go hang yourself, now.

Tags: , ,

Could Obama be the new Pragmatic Party?

In May 2006, Scott Adams described what could be called the “Pragmatic Party” (sadly, his blog archives were nuked, but you can still read my entry). Last Tuesday, Barack Obama was elected President. Two days later, we have this website, change.gov:

change.gov website screenshot

Could Obama really be doing what Adams suggested? I was skeptical about Obama’s rallying cry for change, but this is incredibly hopeful looking.

Tags: , ,

Opening up Windows Firewall for File and Printer Sharing

By default, Windows Firewall’s setting for File and Printer Sharing is set to “subnet” scope: only allow requests from the same subnet as itself. This is generally a good default security policy that balances safety with convenience, but on my home network, I run several different subnets (wired, wireless, VPN, etc.) and this tends to be an issue.

Here’s a very simple VB script that can be run with Windows Scripting Host to expand the scope from “subnet” to “any”:

Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile

Set colServices = objPolicy.Services
Set objService = colServices.Item(0)
objService.Enabled = TRUE
objService.Scope = 0

I stick that in a file named winfw-smb-scope-any.vbs and run it from a DOS prompt with cscript.exe. Done!

Do you have any other handy scripts you think are really useful? Tell me about them in the comments … thanks!

Tags: , , ,