Skip to main content

Posts

Showing posts from December, 2006

Linux: Netgear Open Source Wireless-G Router

Summary:I just bought Netgear's Open Source Wireless-G Router, model KWGR614. The setup wizard doesn't work with Firefox. I spent a lot of time fighting with tech support. They told me to use Internet Explorer even though the box says, "Open source code enables router customization for Linux developers and hobbyists". I tried to fix the source myself, but the C code for the admin interface is specifically missing from the source download. I'm quite frustrated.In the setup wizard, I tried to click the "Next" button, and it didn't do anything. I got the error, '"document.forms.MatchSubnet" has no properties'. I'm using the Firebug Firefox extension (which I love) to see such error messages.

I decided to call tech support. It was some woman in India, of course. Here were her suggestions over the course of a 45 minute conversation with her:Use XPPay for premium support (Yeah right! Pay $35 for a problem in their code!?!)Us…

Linux: Coping With Settings on Remote Systems

If you're like me, you probably end up working a lot on remote systems. It can be a pain to manage your settings on them. I think we all have a way of dealing with this. Ideally, we'd all manage our dot files in some publicly accessible source control. If you're a mere mortal like me, though, you just want a way to copy your dot files to the remote system and install your ssh key.

If so, then the following snippit from my .zshrc may be helpful to you. It's been tested with zsh, but probably works just fine in .bashrc. If you add to your .zshrc, remember to re-source that file or re-login. Edit to suit your tastes:# Install my ssh key on a remote system.
ssh-installkey() {
[ -n "$1" ] || {
echo "usage: ssh-installkey username@host" >&2
return 1
}
ssh $1 "mkdir -p -m 700 .ssh"
ssh $1 "cat >> ~/.ssh/authorized_keys2" < ~/.ssh/id_dsa.pub
}

# Install some bas…

Python: Trick of the Day

Let's say you have a function that makes use of a global. (Pretend for a moment that global isn't a dirty word.) Let's say you want to define that global within that function, but only if it doesn't already exist. You can use "globals()" and "setdefault" together in the following, fun one-liner:x = globals().setdefault("x", 0)This will get the value of the global x. If x didn't already exist, it'll be initialized to 0.