Skip to main content

Posts

Showing posts from March, 2006

Linux: Verizon Yahoo DSL

I got Verizon Yahoo DSL working on my Dad's Fedora Core 4 box. His modem is a Westell 6100. These directions were very help (which is half the point of this post). Here are some notes:The default username and password for the modem are admin and password. It prompts you to change these once you login.When I called Verizon, they gave me some userid and password, but I don't remember ever needing to use them.The tech support at Verizon was from Alabama and spoke English well.I had problems with the DSL not syncing. The DSL light was just blinking. It turns out my dad plugged the modem into a wall jack that wasn't actually connected to anything. It's strange that they can't work around problems like that in software ;)Since I was helping my dad over the phone, I was really pleased to find out he could give me remote access to the modem. He logged into the modem at 192.168.1.1. He navigated to Maintenance > Remote Access. Once there, he picked a password a…

HTML: Escaping &'s in URLs in HTML

Warning: Failure to ignore the following validation warning may result in lost productivity!Concerning Ampersands (&'s) in URLs, the following is what I wrote in the Aquarium documentation:

The short answer is, if you have a URL with more than one parameter, you should wrap it with $htmlent when you embed it in HTML if you want to pass DTD validation. If you don't care, then it really won't matter. What follows is an explanation of why I can't make it any easier on you.You must escape &'s in URLs in order to pass DTD validation. Per the spec, a browser could look at http://a.com/?a=b©=2 and interpret the ©= as part of value of the a variable instead of a new variable named copy; because © is an HTML entity.
To handle #1, Aquarium use to escape the &'s in every URL automatically.
However, #2 broke redirects if you redirected to a URL with more than one parameter. I so rarely did this, that I didn't know about the bug for a good ye…

Python: Fun with Classes

#!/usr/bin/python

#
# Author: Shannon -jj Behrens
# Date: Fri Mar 3 16:43:43 PST 2006
#
# In response to: http://secretartofscience.com/blog/?p=8
#
# Although Python isn't a prototype-based language, it's possible to do a lot
# of these same wacky ideas in Python.
#
# By the way, Io is a cool, new prototype based language. I've blogged about
# it before. There was also a knockoff of Python that was prototype based, but
# I don't remember the name--email me if you must know.
#


# Ok, let's start by changing our class on the fly.

class Draws(object):

def draw(self):
print "draw"


class DrawsSmall(Draws):

def draw(self):
print "small:",
Draws.draw(self)


obj = Draws()
obj.draw()
obj.__class__ = DrawsSmall
obj.draw()
print


# This time, let's mixin something on the fly.

class DrawsBig(Draws):

def draw(self):
print "big:",
Draws.draw(self)


obj = Draws()
obj.draw()
class MixedIn(DrawsBig, Draws): pass
obj.__class__ = M…