Nearing the End

blog

bash/ssh Timeout

How to ssh to a machine where I run bash and not have the session timeout after an hour of inactivity???!?

Just Unset TMOUT? Nope, it wasn't set and I Still Timeout.

$ ssh ud00
Last login: Wed Aug  2 13:43:47 2006 from dsl027-167-091.atl1.dsl.speakeasy.net
$ set | grep TMOUT
$ Read from remote host ud00: Connection reset by peer
Connection to ud00 closed.
$

ssh KeepAlive Option? Nope!

$ cat /home/mudd/.ssh/config
KeepAlive yes
$
$ ssh ud00
Last login: Wed Aug  2 13:43:47 2006 from dsl027-167-091.atl1.dsl.speakeasy.net
$ Read from remote host ud00: Connection reset by peer
Connection to ud00 closed.
$
$ rm  /home/mudd/.ssh/config
$

Ignore Signals? Nope!

$ ssh ud00
Last login: Wed Aug  2 10:43:40 2006 from dsl027-167-091.atl1.dsl.speakeasy.net
$ trap '' 1 2  # Ignore SIGHUP and SIGINT
$ date
Wed Aug  2 14:43:42 EDT 2006
$ Read from remote host ud00: Connection reset by peer
Connection to ud00 closed.
$

Xclock works, I just wish there was a simpler way.

$ ssh ud00
Last login: Wed Aug  2 16:28:22 2006 from dsl027-167-091.atl1.dsl.speakeasy.net
$ xclock
[1] 5835
$

ssh_config - OpenSSH SSH client configuration files. It works!!

From "man ssh_config":

     ServerAliveInterval
             Sets a timeout interval in seconds after which if no data has
             been received from the server, ssh will send a message through
             the encrypted channel to request a response from the server.  The
             default is 0, indicating that these messages will not be sent to
             the server, or 300 if the BatchMode option is set.
             ProtocolKeepAlives is a Debian-specific compatibility alias for
             this option.



Before adding option:

$ ssh od00
mudd@od00's password:
$ Read from remote host od00: Connection timed out
Connection to od00 closed.



After adding option:

$ ssh -v
OpenSSH_4.2p1 Debian-7ubuntu3, OpenSSL 0.9.8a 11 Oct 2005
$
$ cat ~/.ssh/config
ServerAliveInterval 300
$


$ ssh od00
mudd@od00's password:
$

No timeout after being connected and idle all night long!!!  

Infogami Lives

I was being to think infogami was shutting down. The blog stats page hasn't been updated for weeks. And the graphs that where there show a couple days when there where no hits on my site at all. Presumably that was a period when infogami was down. I guess. I'm not sure.

Anyway, infogami is back now. At least the Blog Stats page is being updated again. I like that feature the best. I get some goofy hits and the stats page lets me see exactly where some of them come from. My favorite was a hit from Google. I don't recall from which country but the search criteria was something like "drill holes in forehead". And that led to a hit on my blog. Funny.

Twiki sucks

The archive file is weird. Gzipped twice apparently. And unloads all the files in the current directory. This is so unusual. I'm only trying to install twiki because of a friend's recommendation.

$ tar tvfz  TWiki-4.0.4.tgz | head
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Error exit delayed from previous errors
$ gzip -d < TWiki-4.0.4.tgz > junk
$ file junk
junk: gzip compressed data, from Unix
$ mv junk TWiki-4.0.4.tgz
$ tar tvfz  TWiki-4.0.4.tgz | head
-r--r----- apache/apache  6110 2006-06-25 12:19:09 AUTHORS
drwxr-xr-x apache/apache     0 2006-06-25 12:19:20 bin/
-r--r----- apache/apache  4162 2006-06-25 12:19:11 bin/.htaccess.txt
-r-xr-x--- apache/apache  1055 2006-06-25 12:19:09 bin/upload
-r-xr-x--- apache/apache  1051 2006-06-25 12:19:09 bin/rdiff
-r-xr-x--- apache/apache  1042 2006-06-25 12:19:09 bin/rest
-r-xr-x--- apache/apache  1059 2006-06-25 12:19:09 bin/changes
-r-xr-x--- apache/apache  1051 2006-06-25 12:19:20 bin/rdiffauth
-r-xr-x--- apache/apache  1077 2006-06-25 12:19:20 bin/viewauth
-r-xr-x--- apache/apache 124304 2006-06-25 12:19:09 bin/configure
$


Install is a nightmare. Best to hire a consultant. The following notes won't help.

$ mkdir  twiki
$ cd  twiki
$ tar xfz ../TWiki-4.0.4.tgz
$ cd ..

# Don't follow instructions and change file ownership yet.  
# There's still stuff to edit.

$ ls twiki/bin/LocalLib.cfg
ls: twiki/bin/LocalLib.cfg: No such file or directory
$ cp twiki/bin/LocalLib.cfg.txt twiki/bin/LocalLib.cfg
$

$ vi twiki/bin/LocalLib.cfg
# Edit twikiLibPath, set to /home/mudd/pkgs/twiki/lib/
# The file is read-only by default?!?!




Tried: http://localhost/twiki/bin/configure

Forbidden
You don't have permission to access /twiki/bin/configure on this server.



$ ls -l /var/www/twiki/bin/configure
-r-xr-x--- 1 www-data mudd 124304 2006-06-25 12:19 /var/www/twiki/bin/configure
$


$ chmod u+w  twiki/twiki_httpd_conf.txt
$ vi twiki/twiki_httpd_conf.txt


$ sudo /etc/init.d/apache2 restart
Password:
 * Forcing reload of apache 2.0 web server... Syntax error on line 68 of /home/mudd/pkgs/twiki/twiki_httpd_conf.txt:
Invalid command 'php_admin_flag', perhaps mis-spelled or defined by a module not included in the server configuration
                                                                         [fail]
$


$ sudo cpan
> install CGI::Session


Notes on Security

    * If you don't set a password, or the password is cracked, then configure could be used to do very nasty things to your server.
    * If you are running TWiki on a public website, you are strongly advised to disable saving from configure by making lib/LocalSite.cfg readonly once you are happy with your configuration.

Ubuntu on MacBook Pro

Wow, I didn't realize there are so many VM choices.

I have a MacBook Pro (Intel) now. I loaded Parallels and it's easy and works well but... cost $50. That's fine with me if it's perfect but... it's not perfect. It stopped responding to the mouse after putting the VM (running Ubuntu) in full screen mode, run VNC in full screen mode to access a Fedora box, leaving the MBP idle and letting the Mac screen saver run. It's an early version of Parallels and my first experience with a VM. Even so, I'm impressed. But it has to be more stable before I can use it.

The chart reminded me that VMWare has a free version. Good idea for them considering how good Parallels is already. Maybe I'll try VMWare some day.

It's "possible" to dual boot with Ubuntu on the MBP but it's messy and not perfect. Plus I don't like giving up some fine points of the Mac: the auto-sleep mode I get just by closing the lid, the auto-lighted keyboard if it gets dark, etc. I also have MS Word on the Mac which is the official reason I have the MBP to begin with. I haven't needed it yet but I might need it in the future.

Links

Ubuntu on PowerBook G4 (PowerPC, PPC)

lspci
(dowload zip file)
unzip bcm43xx.zip
(alternative) zless /usr/share/doc/bcm43xx-fwcutter/README.gz
sudo bcm43xx-fwcutter -w /lib/firmware bcmwl5.sys
sudo modprobe bcm43xx
iwconfig
sudo iwlist eth1 scan
sudo iwconfig eth1 rate 11M
iwconfig eth1
sudo iwconfig eth1 ap any
dmesg

mudd@mudd-laptop:~/Desktop/bcm43xx$ cd /lib/firmware mudd@mudd-laptop:/lib/firmware$ ls 2.6.15-23-powerpc bcm43xxinitval05.fw bcm43xxmicrocode2.fw 2.6.15-25-powerpc bcm43xxinitval06.fw bcm43xxmicrocode4.fw bcm43xxinitval01.fw bcm43xxinitval07.fw bcm43xxmicrocode5.fw bcm43xxinitval02.fw bcm43xxinitval08.fw bcm43xxpcm4.fw bcm43xxinitval03.fw bcm43xxinitval09.fw bcm43xxpcm5.fw bcm43xxinitval04.fw bcm43xx_initval10.fw mudd@mudd-laptop:/lib/firmware$ python Python 2.4.3 (#2, Apr 27 2006, 14:44:20) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

> mudd@mudd-laptop:/lib/firmware$ <\pre>


From: http://www.ubuntuforums.org/archive/index.php/t-187407.html

n00bWillingToLearn June 3rd, 2006, 05:12 PM I have a 17'' powerbook with Airport Extreme and I just got it working.

I followed these instructions using the link given to download the drivers and wifi-radar as opposed to Network-Manger ( you don't need either but they automatically detect / connect to wireless networks );

http://www.ubuntuforums.org/showthread.php?t=185174

Extra info if you want it:

The howTo is not meant specifically for Airport cards, or PPC but it worked for me ( with Airport Extreme on PPC I don't know about plain Airport ( the older version ) or using it on intel based macs) basically Ubuntu already has the drivers to use Airport ( and all other broadcom based cards ) but for legal reasons are not allowed to have the firmware to use those cards installed by default so you are getting the firmware from the windows driver ( you are not using the windows driver like you would with NDIS wrapper ) and using the drivers Ubuntu already has to do the rest.


General 6.06 - How to: Broadcom Wireless cards without Ndiswrapper This Should work with Apple hardware as well as PC's. If BCM4318 that this guide is VERY unlikly to work for you. http://www.ubuntuforums.org/showthread.php?t=185174

Since my laptop is powerpc, not x86, ndiswrapper is not an option. http://www.archivesat.com/UbuntuLinuxHelpandUser_Discussions/thread770953.htm --->https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx/Dapper#head-2d0c63404ca00426255ef1158a8afffc67925ef6

--- ndiswrapper solution --- First of all, thanks to all the posts on these forums I'm posting from a wireless connection, and I have a Broadcom 4318 "AirForce One 54g". Here's how I did it, maybe it'll help someone. You don't even need an internet connection. http://ubuntuforums.org/showpost.php?p=1105667&postcount=218

make ndiswrapper work with ubuntu 6.06 PPC!! NO... ndiswrapper can't works on ppc since it use x86 binary dll. It could compile but dll can't be used. http://www.ubuntuforums.org/showthread.php?t=190248

Broadcom built a software radio http://www.andrewsavory.com/blog/archives/000607.html

Compatible wireless network card http://www.ubuntuforums.org/archive/index.php/t-36505.html

The Gentoo forums topic on Native Airport Extreme Drivers for Linux (http://forums.gentoo.org/viewtopic-t-409194.html) is the best place for getting the Airport Extreme to work. If your firmware isn't compatible with the fwcutter utility, you can grab a copy of the AppleAirPort2 driver here. http://www.andybotting.com/mediawiki/index.php/Linuxona15%22Powerbook_1.67Ghz

Upstairs

There's something in the ceiling. No, in the crawl space above the ceiling. A thump. I hear something move once, maybe twice a day.

It started after I had a colossal set of repairs. Insulation removed, termicide spayed, central air ducts repaired or sealed off completely, insulation replaced. The most important repair to me though was closing off the central air closet from the craw space. For 20 years I've been able open the closet that houses the blower unit, cram my head around the green metal tower and see into the blackness above. I always retracted quickly, not wanting to stare. I only looked long enough to recalibrate the true size of the gap. In between visits the gap had a habit of growing in my mind, becoming more threatening. My occasional visited were both frightening and reassuring. It was really only big enough for a large rat to pass at the most.

...

Quick Regular Expression Test

I wrote a regular expression and it didn't work as expected on the first try. So here's a little Python program I used to determine where it broke down.

Source Code

import re

line = '# 1 "SfmexDeclarations.h" 1'                                                                             
pattern = '^\s*# \d{1,6} (?P".+?")( \d){0,1}$'

for i in range(1, len(pattern)+1):
    p = pattern[:i]
    try:         m = re.match(p, line)
        if m:
            print '[%s]\t[%s]' % (p, line[m.start(): m.end()-m.start()])
    except re.error, e:
        print '[%s]\tError: %s' % (p, e)
        pass

Output

pattern = '^\s*# \d{1,6} (?P".+?")( \d){0,1}$'

[^]     []
[^\]    Error: bogus escape (end of line)
[^\s*]  []
[^\s*#] [#]
[^\s*# ]        [# ]
[^\s*# \]       Error: bogus escape (end of line)
[^\s*# \d]      [# 1]
[^\s*# \d{1,6}] [# 1]
[^\s*# \d{1,6} ]        [# 1 ]
[^\s*# \d{1,6} (]       Error: unbalanced parenthesis
[^\s*# \d{1,6} (?]      Error: unexpected end of pattern
[^\s*# \d{1,6} (?P]     Error: unexpected end of pattern
[^\s*# \d{1,6} (?P<] Error: unterminated name
[^\s*# \d{1,6} (?P<p]        Error: unterminated name
[^\s*# \d{1,6} (?P<p1]       Error: unterminated name
[^\s*# \d{1,6} (?P<p1>]   Error: unbalanced parenthesis
[^\s*# \d{1,6} (?P<p1>"]  Error: unbalanced parenthesis
[^\s*# \d{1,6} (?P<p1>".] Error: unbalanced parenthesis
[^\s*# \d{1,6} (?P<p1>".+]        Error: unbalanced parenthesis
[^\s*# \d{1,6} (?P<p1>".+?]       Error: unbalanced parenthesis
[^\s*# \d{1,6} (?P<p1>".+?"]      Error: unbalanced parenthesis
[^\s*# \d{1,6} (?P<p1>".+?")]     [# 1 "SfmexDeclarations.h"]
[^\s*# \d{1,6} (?P<p1>".+?")(]    Error: unbalanced parenthesis
[^\s*# \d{1,6} (?P<p1>".+?")( ]   Error: unbalanced parenthesis
[^\s*# \d{1,6} (?P<p1>".+?")( \]  Error: bogus escape (end of line)
[^\s*# \d{1,6} (?P<p1>".+?")( \d] Error: unbalanced parenthesis
[^\s*# \d{1,6} (?P<p1>".+?")( \d)]        [# 1 "SfmexDeclarations.h" 1]
[^\s*# \d{1,6} (?P<p1>".+?")( \d){0,1}]   [# 1 "SfmexDeclarations.h" 1]
[^\s*# \d{1,6} (?P<p1>".+?")( \d){0,1}$]  [# 1 "SfmexDeclarations.h" 1]

Critical Programming Skills

Know this stuff if you want to pass my interview.

  • Python or Ruby
    • You have to know one of these no matter what the job calls for. It's a sign you can discriminate and have the good sense to use the best tools even if nobody pays you to do so.
    • I only include Ruby because of all the Ruby on Rails hype. Be ready to justify your choice.
    • While you're at it, give me a concise explanation why "C" was/is valuable.
  • Multi-threaded Programming
    • And I don't mean green or micro threads!
    • I hear too many programmers say the best solution to multi-threaded programming is to just avoid it. Good! Say that in front of me so I'll know who I want to avoid.
  • Regular Expressions
    • Same as multi-threaded programming. Too many "programmers" pride themselves on being unable to get regular expressions right.
  • Pros and cons of the following. Be brief.
    • OOP
    • XML
    • Patterns

I don't care what the job requires, I only want competent programmers. If you know this stuff then I won't get stuck baby sitting you while you learn a little more.

rdate versus ntpd

I've had trouble getting ntpd to start correctly on my Linux box. It's pathetic because I've made a couple of attempts and this has gone on for years.

Today I found a suggestion to use rdate instead. Here's how I did it. I don't know if it's perfect but it's fast, easy and my clock is reasonable accurate now. I'd rather have sophisticated ntpd than crude rdate because ntpd is careful to only make smooth gradual changes to the clock. I'm only suggesting rdate if you're like me, unable to get the ntpd process to start properly and remain running.

  1. Login as root
  2. Run "crontab -e"
  3. Enter the following. The top section is just a block of comments describing the file format. The last line is all you really need.
  4. Save the file.
#   FIELD    VALUE
#   ------------------
#   minute   00 to 59
#   hour     00 to 23 (military time)
#   day      1 to 31
#   month    1 to 12
#   weekday  0 to 6 (0=Sunday) Note: Linux uses sun, mon..

0 3 * * * (rdate -s clock.psu.edu || rdate -s ntp.nblug.org || rdate -s sundial.columbia.edu) > /tmp/rdate.stdout 2> /tmp/rdate.stderr

This will run the rdate command to reset the system clock once a day at 3 am.

This is a sequence of three rdate commands. If the first one fails then the second one will be tried. Same for the third.

I got these three host names from the official list of ntpd hosts that are (1) in the US, (2) don't require notification and (3) support the rdate protocol.

The output of the command goes to files in /tmp. Both files will normally be empty. The time stamp on the files will confirm that cron is executing the command each day.

  • /tmp/rdate.stdout
  • /tmp/rdate.stderr

Links

Send Bush a Message He Can't Ignore

I keep hearing Dems say they object to the war, hate Bush and Cheney and despise Republican greed, corruption and hate mongering. But I don't see them taking any action. At least not action that has any significant effect.

Maybe they're sincere. They're just too busy holding down two or three jobs trying to keep their heads above water in the Winner-Take-All Society crafted by the elite right. Too busy to drive to Washington. Too common and lowly to warrant a meeting with Bush.

Here's a quick way to do more than bitch and moan. Even do more than protest on street corners or quit your job in disgust. All that's required is a phone call or click a few buttons on a web site. Whatever it takes to transfer any saving, especially a 401K account, from investments in USA companies to (almost) any alternative foreign nation. Much easier than moving your family to Canada. Just move your money.

Here's how it works.

  • Dems transfer savings and 401K account from US investments to foreign alternatives. As money pours into foreign investments the values will rise. Dems get a little richer.
  • As money moves out of US stocks and bonds the values will drop. Stubborn Republicans, too dumb to take action, will be be left holding the bag (of US stocks and investments) as the domestic values fall. They get a little less rich.
  • An added bonus: As the dollar falls (and it will) people (Dems) holding foreign investments will benefit. Then it might even be possible to drop back to one or two jobs instead of three. On the other hand, Republicans will see the value of their investments drop still further.

What will this do? For starters, bring Bush to his knees. Isn't that a good place to start?

Here's the time line. Do it be before July 4, 2006. I just picked that arbitrarily but wouldn't that make July 4th just that much more of a celebration of true independence?

Will it work? I doubt it. I frankly think that the vast majority of Americans, maybe 98%, fully support Bush, wars for oil and corporate greed. If you don't agree with me then feel free to prove me wrong. Move your investments.

The other big problem with this plan is that it has yet to be blessed by George Clooney. Dang that man is good looking. What power he wields!

What do you do if you don't have any money, saving or investments that can be liquidated and moved overseas? Call a friend or family member that does. It still just requires a phone call. Maybe not a completely private conversation thanks to AT&T and the NSA but it's still just a phone call.

Note: Try to avoid shifting money to countries as screwed up as the US. That includes England and Australia.

By July 4th I expect everyone who means what they've been saying (and saying, and saying) to take action. Either that or do nothing and come to the realization that you support Bush, et. al. just as much as any cold blooded Republican. After July 4th all I ask is that anyone who's still sitting on their hands to please SHUT UP for the next two years. Either way I'll have good reason to celebrate on 7/4/06. Kinda like the finale of V for Vendetta. You know, the fireworks.

Links

Smucker's Peanut Sauce

A simple, symmetrical recipe from the lid of a Smucker's Natural Peanut Butter jar. Remember, "With a name like Smucker's, it has to be good".

Combine the following in a large bowl. I suggest "large" because it requires a lot of stirring and it's a mess if any is spilt.

  • 1/3 cup
    • Natural peanut butter
    • Water
  • 2 Tablespoons
    • Soy sauce
    • Lemon juice
  • 1 Teaspoon
    • Powdered garlic
    • Sugar

Microwave for 30 seconds. Stir until smooth.

Use as a dipping sauce for boring chicken white meat. Or on noodles, salad or whatever.

Make it a day in advance. It taste better with age.

Python assert bug?

Why didn't the assert statement print the value of row?

$ python
Python 2.4.1 (#1, Aug 14 2005, 18:43:28)
[GCC 3.3.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> row = None
>>> assert len(row) > 0, 'row=%s' % `row`
Traceback (most recent call last):
  File "", line 1, in ?
TypeError: len() of unsized object
>>>

Verizon Sucks (less)

Replaced phone for free

Well, I had to buy the replacement phone on eBay. But the lady at the Verizon store was very nice. She transferred my phonebook to the new phone and waved me away instead of charging the normal $10 fee. She also told me I could activate the new phone myself on the internet, which I did just now, which saved me an additional $20 fee. She should be running the rest of the company.

Try to email text msg to Verizon cell phone

This is the way toooo common result.

1235551212@vtext.com
550 SMTP connection refused

Gmail + Verizon = Failure

I used to forward my gmail to my Verizon cell phone. But almost half of the mail was being lost. This is above and beyond the "550 SMTP connection refused" error listed above. Fortunately I'm able to use Teleflip instead.

Mail forward to my phone via Teleflip is fairly reliable. Only about once a week do I get the "550 SMTP connection refused". Even then, Teleflip is good enough to inform me that Verizon is down again. That little bit of feedback eliminates a lot of frustration. What is frustrating is why do I have to route mail via Teleflip in order for it to arrive at my Verizon phone???!?

Google Calendar

Unlike gmail, I can't ask Google Calendar to send event notifications to Teleflip. I can send notifications to my gmail account. I do that in order to forward a copy to Teleflip and on to my Verizon phone. That works but I end up with extra clutter in my gmail Inbox.

Google Calendar supports SMS to cell phone directly. Great! Oh, but initially Verizon was one of the few unsupported carriers. I can only guess Google is smart enough to steer clear of Verizon's technical problems.

Verizon is now on Google Calendar's list of supported vendors. I'm testing it now...

Bought a new phone

A Christmas present for my son. He rarely makes any calls and just a couple of text msgs per day.

  • Automatically lost my old plan and got a new one.
  • Old plan: $10/month
  • New plan: $35/month
  • Verizon: "This was fully explained to you."
  • Me: "Why the hell would I agree to more than triple my monthly phone bill??!?"

Reset This!

I just tried to get access to my Verizon on-line account. Apparently I forgot my password so I clicked on "reset my password". I entered my cell phone number, social security number and this is what I got back.

Our records indicate that you requested an additional account password to prevent unauthorized access to your account.

Please enter the account password below to continue.

If you have forgotten your password or wish to have your password removed please contact us at 800-922-0204.

I waited 6m 30s for someone to answer the phone. Once I talked with someone it went about as smoothly as I could expect. She said I need a second four digit password. She reset that for me, I enetered it and it took me back to the original screen asking for my passowrd. I had to try that again, let it fail, ask again to reset it, enter my phone number, soc sec number again, then I was asked for my mini password again!! I entered it and was taken to a screen asking for my password again! But... at the bottom of the screen there is now a button to "Reset Password". I pressed it and received a text msg with my new password.

Once I logged in I was taken to a screen to reset my password. That makes sense. I filled out the form and... got this.

The information you have entered is not in a valid format. Please check the information and re-enter.

As my "security question" I entered "Name of least favorite wireless carrier?". I can't print the answer here because that would defeat the security but you can guess. Is that considered "an invalid format"??

I finally got logged in. I feel less retarded now.

There's a link on my Verizon home page saying "Upgrade to a new phone". I'm careful not to click it. I'm not sure where it will take me but I'm almost certain I can't afford whatever it is.

Net Non-Neutrality

Verizon is one of the big telcos behind this propaganda cartoon.

Links

Gmail as ToDo List

A lot of my work is done via email. I use gmail's Star option for items that require further attention. My Starred folder is my ToDo list.

Here's a shortcut to add new items to the Starred list. Add the following filter under Settings/Filters and then any email send to yourself is automatically added to the Starred/ToDo list.

Matches: from:(myself@gmail.com) to: myself@gmail.com)
Do this: Skip Inbox, Star it, Apply label "ToDo"

I skip the Inbox for two reasons. First, to avoid cluttered. I don't want to see ToDo items mixed in with new mail. I also forward new mail to my cell phone. Skipping the Inbox avoids having my cell phone beep every time I add a new ToDo item.

Usually these emails are just a few words on the Subject line. Because that's unusual, gmail will ask, every time, "Send this message without text in the body?". I've asked Google for help with this and other issues but, so far, no response. For now I just click "OK". Let me know if there's a better way.

When I select the Starred folder I see my ToDo items, sorted by date. I can reply to items to add extra info or just to move the item to the top of the list.

As I complete items it's easy to turn off the Star. That feels great. It even feels better to select the ToDo folder to see the full history of all of completed ToDo items, with and without stars. Until I used this method I didn't realize how much I accomplish.

Because my ToDo list is integrated with my email I can easily turn emails into ToDo items. I can also create new ToDo items as easily as sending email. Because it's a web app I can take it with me wherever I go.

Gmail as Notepad

My drafts folder is full of emails I never intend to mail. These are just a collection of notes that I often refer to and/or need to update. I know there are specific sites on the web that offer this sort of functionality but I try to keep my life simple and do as much as possible in gmail alone.

There's the risk of me accidentally pressing "Send" instead of "Save Now" on these items. But I'm safe because I never put an address in the "To:" field. If I press Send then Gmail just responds with "Please specify at least one recipient" which gives me a chance to cancel.

Personal Efficiency Links

Twisted/Nevow web framework

Twisted is an event-driven networking framework.

Glyph notes from The Twisted-web Archives

  • nevow.livepage has been deprecated in favor of nevow.athena. I don't think anyone is maintaining nevow.canvas any more.
  • Pollenation's "Formal" seems to be replacing [formless] as a de-facto standard in the community for people who want form generation. It may even be distributed with Nevow at some point. However, formless itself is somewhat of a dead end; while it contains some handy convenience utilities to slap a form on a page, you end up having to do almost as much work to get a decent-looking form with formless as just writing the HTML by hand yourself, and the rules are often implicit and undocumented.

irc://irc.freenode.net/#twisted.web

--> You are now talking on #twisted.web
--- Topic for #twisted.web is Nevow 0.8.0 download, documentation, and other useful links:
 http://divmod.org/trac/wiki/DivmodNevow ||
 Nevow SVN moved to http://divmod.org/svn/Divmod/trunk/Nevow |
 Nevow + XUL? http://nufox.berlios.de ||
 Athena Tutorial: http://divmod.org/trac/wiki/DivmodNevow/Athena

Links

IBM's AJAX article, Part 1

Has USA Jumped the Shark?

Selenium Confusion

Selenium-RC

I just want to write a Python script to test a web site. I would use twill but it's a Javascript-enabled site so I'll need Selenium instead.

I know a little bit about Selenium already. I tried it weeks ago. It's a Javascript librray that runs under a browser. The mode I tried allows for tests to be created interactively via the web interface. That much worked and was impressive. But now I want to go to the next level, to write a Python script to perform the same sort of testing. Now I will need Selenium-RC (Selenium Remote Control, formerly known as "Driven" Selenium).

I got the latest Selenium-RC code from the official page. The good news is that the selenium-remote-control-0.7.1.zip file unzips and I see that it contains directories of code for Python (as well as dotnet, Java and Ruby).

The python/ directory contains

  • selenium.py - Selenium-RC API
  • doc/ - API doc extracted from selenium.py
  • test_google.py - Example test case against google.com
  • a few other example scripts

The test_google.py script is exactly what I need. If I can just get this to work then I'll be in business.

Selenium Server

From the Selenium-RC page:

Selenium Remote Control provides a Selenium Server, which can automatically start/stop/control any supported browser.

Hmm, Selenium Server? It does! There's a selenium-remote-control-0.7.1/server/ directory that contains a jar file. Wow, I had heard that Selenium-RC required a local web server (e.g. Twisted, specifically Twisted 1.3.0) but maybe this is all I need.

Yes, this seems to eliminate the need for using Twisted. There's a large section of javadoc generated documentation. Here's a high level description of the "server" from the docs.

SeleniumServer: Provides a server that can launch/terminate browsers and can receive Selenese commands over HTTP and send them on to the browser.

Selenium Core

Again, from the Selenium-RC page:

It works by using Selenium Core, a pure-HTML+JS library that performs automated tasks in JavaScript.

"It" is either the Selenium Server and/or Selenium-RC. In either case I should expect to see some js code. As advertised the js is in the Selenium Core archive, selenium-0.6.0.zip.

The install-readme.txt says

Copy the "selenium" folder to a web accessible directory in the same web server as the application you want to test. In Apache, this would mean a subdirectory of "htdocs".

That's simple enough. But I'm not interested in testing apps served by my local Apache server. I want to test web apps running on remote servers such as google.com.

These instructions seem to be for the non-RC mode of Selenium. How do I make Selenium Core accesible to Selenium-RC??

Blog to the Rescue?

I found Grig Gheorghiu's blog entry: Running the Selenium Twisted server on Linux.

This is a revised explanation of how to install and run Selenium in "Driven Mode"... oh, but with Twisted. That might be a step backwards. Plus, I had to leave a comment for Grig saying that I ran into a dead end.

Help!

I just found these links in the left margin of the Selenium-RC page.

Using Selenium Remote Control

It looks impressive but both links take you to the same tutorial page. Still, I'm grateful for the help.

Finally, How To run Selenium-RC, on Linux with Python and Firefox

Interactive mode:

  • Install the JRE
    • Verify: java -version
  • Add the Firefox directory to your PATH and LD_LIBRARY_PATH
    • PATH=$PATH:~mudd/pkgs/firefox
    • LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~mudd/pkgs/firefox
  • Start the Selenium Server
    • cd selenium-remote-control-0.7.1/server
    • java -jar selenium-server.jar -interactive
    • Be patient. You'll get the following exception if you enter a blank command, or even any leading whitespace in front of a valid command. And it's very easy to get an extra leading blank when the command is copied from the Selenium Tutorial page via cut-n-paste.
---> Requesting http://localhost:4444/selenium-server/driver?
java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:4444/selenium-server/driver/
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at java.net.URLConnection.getContent(Unknown Source)
        at org.openqa.selenium.server.SeleniumServer$3.run(SeleniumServer.java:263)
        at java.lang.Thread.run(Unknown Source)

Note: Selenium Server uses 3.3 GB of memory on my PC. Thanks, Java!

Python driven Selenium-RC

Switch to the python/ directory. Run the same test of google.com by executing the test_google.py script. Here's what I got back.

======================================================================
ERROR: test_google (__main__.TestGoogle)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_google.py", line 24, in setUp
    self.selenium.start()
  File "/home/mudd/pkgs/selenium-remote-control-0.7.1/python/selenium.py", line 110, in start
    result = self.get_string("getNewBrowserSession", [self.browserStartCommand, self.browserURL])
  File "/home/mudd/pkgs/selenium-remote-control-0.7.1/python/selenium.py", line 139, in get_string
    result = self.do_command(verb, args)
  File "/home/mudd/pkgs/selenium-remote-control-0.7.1/python/selenium.py", line 127, in do_command
    conn.request("GET", commandString)
  File "/usr/local/lib/python2.4/httplib.py", line 801, in request
    self._send_request(method, url, body, headers)
  File "/usr/local/lib/python2.4/httplib.py", line 824, in _send_request
    self.endheaders()
  File "/usr/local/lib/python2.4/httplib.py", line 795, in endheaders
    self._send_output()
  File "/usr/local/lib/python2.4/httplib.py", line 676, in _send_output
    self.send(msg)
  File "/usr/local/lib/python2.4/httplib.py", line 643, in send
    self.connect()
  File "/usr/local/lib/python2.4/httplib.py", line 627, in connect
    raise socket.error, msg
error: (111, 'Connection refused')

----------------------------------------------------------------------
Ran 1 test in 0.242s

FAILED (errors=1)

This only failed because I didn't already have the Selenium Server up and running. Once I started it back up the Python script worked as expected.

$ python test_google.py
.
----------------------------------------------------------------------
Ran 1 test in 42.870s

OK
$

Amazing. No Selenium Core required. No Twisted required. (Not that there's anything wrong with Twisted! IMO, Guido missed the boat when he passed over Twisted Web + Nevow.) I have arrived at web testing nirvana.

Note: The sample .py files are formatted with \r\n at the end of each line. This may cause some confusion if you're running on Linux.

FAQ

How to open a URL with subdirectories?

Example URL: http://10.41.29.72:9001/console

First, open the main url by instantiating the selenium class.

sel = selenium('localhost', 4444, '*firefox', 'http://10.41.29.72:9001')

Then, use the open() method to open pages relative to the main url.

sel.open('/console')

How to click a button without an Id?

Example HTML for button labeled as "Sign In":

<TD>&nbsp;</TD>
<TD align="right" nowrap><input type="submit" class='buttons' value="Sign In"></TD>
<TD width="100%">&nbsp;</TD>

Selenium-RC code:

sel.click("//input[@value='Sign In']")

From Selenium-RC User Forum.

getbodytext()

getbodytext() doesn't give me what I expect. I was hoping for the same thing I get from the browser when I select View/Page Source. In some cases getbodytext() returns just an empty string. Is there a way to get the real page source?

The only reason I want the page source is so I can parse it and manually navigate the frames. Any suggestions on how to use Selenium-RC to navigate frames? I just need to select the second frame so I don't mind a hard coded solution.

Frame support isn't officially available in Selenium Core or Selenium RC, but any workaround you can devise may be good enough.

In this case, you may be encountering a problem with long command results, e.g. SRC-43. http://jira.openqa.org/browse/SRC-43

We've fixed SRC-43 for 0.7.2, which I hope to release as soon as I have the time. In the meantime, you might try using the nightly snapshot build available here.

-Dan

Links

Cold Treatment

The weather has been great here. I have a cold so I mostly stay home but I had the front door open yesterday. I got to use my newly re-installed screen door. My main PC is on the coffee table in the living room and I sit in a Lazy Boy recliner with wireless keyboard and mouse. I just have to look over the monitor to see outside. If I have to be sick this is the way to do it.

How I handle a cold

  • Cold-Eeze tablets on the first day
  • Sore Throat Treatment
    • Lots of hot, slightly sweet, tea
    • Hot cinnamon candy
    • Popsicles
  • Lots of hot showers with maximum heat on eyes, nose and throat

Seafood Slop

A complete three-minute meal in a bowl.

Directions

  • In a large soup bowl.
  • Start with a mix of brown rice and canned black beans. I use a pile the size of my angry clenched fist.
  • Cover with a can of Manhattan-style clam chowder. I like Progresso or Campbell's Chunky brands.
  • Stir, cover and microwave for two minutes.
  • Enjoy.

Option: Substitute banana and peanut butter in place of rice and beans. Not in the soup. On the side.

Diet Log

Notes regarding my diet.

My weight range for 20 years: 185-195 lbs. Below I list my current weight. I weigh myself on the same scale at the grocery store in the evening after yoga class. If I don't list it here that only means I didn't stop by the store after yoga or forgot to step on the scale.

Changes since starting diet

  • Water goes right through me
  • Hot flashes
  • Less sleepy during the day and early evening
  • Muscles no longer ache when cold
  • Regaining strength while exercising
  • Save money on food
  • Save time by eating less
  • Trips to the grocery store are likewise simplified

B=breakfast, L=lunch, D=dinner, _=deviation

Sun 7-9-06 [ ]

Back from vacation.

Sat 7-1-06 [B _ ]

McD lunch and Snickers while watching Akeela and the Bee.

Fri 6-30-06 [B L D]

Thu 6-29-06 [B L D]

Finally, did dinner right.

Wed 6-28-06 [B _ _]

Lunch at First Watch (salad).

Fluffer Nutter for dinner. Chris chose a "peanut butter" sandwich over Hungry Howie's three cheeser bread!?!

Tue 6-27-06 [B L _]

Storm hit after yoga. Hid in Chinese restaurant.

Mon 6-26-06 [B L D]

Sun 6-25-06 [B L _]

Extra beer.

Sat 6-24-06 [B L _]

Extra beer.

Fri 6-23-06 [B L D]

Thu 6-22-06 [B L _] 189

Extra beer with dinner.

Wed 6-21-06 [B L _]

McD & Snickers dinner while watching Ice Age.

Tue 6-20-06 [B _ _]

Agh, bagel pizza for lunch and dinner. Makes me sleepy. Tosed out the last one. I'm through!

Mon 6-19-06 [B _ _]

First day, splitting one banana between breakfast & lunch. More bagel pizzas for lunch. Sooo sleepy later.

FN and peanut M&Ms for dinner.

Sun 6-18-06 [B _ _]

Cheesburgers, fries and candy while watching Al Gore. Green olive bagel pizzas at home for dinner.

Sat 6-17-06 [0 B _]

No breakfast. Tired all day. Fried chicken, fries and potato salad for dinner.

Fri 6-16-06 [B L D]

Thu 6-15-06 [B L _] 187.5

Extra beer and watermellon with dinner. I was celebrating.

Wed 6-14-06 [B L D]

Feeling hungry after dinner. Filled up on watermellon!!

Tue 6-13-06 [B L _] 188.5

Fluffer Nutter for lunch. Whew, can't do that everyday.

Extra beer for dinner in place of soup, rice & beans.

Mon 6-12-06 [B L _] 187.5

Extra beer for dinner in place of chicken and peanut sauce.

Sun 6-11-06 [B L D] 187.5

Added seven natural almonds to my breakfast. They were on sale!!

Sat 6-10-06 [B L D]

Fri 6-9-06 [B L _]

New lunch alternative: (Super Fluffernutter) Natural peanut butter, sliced banana, Ricemellow Creme (better than Marshmallow Creme!!) and a sprinkle of chocolate chips on lightly toasted whole wheat. Wow! And milk.

Extra beer and milk chocolate covered milk balls instead of chicken and peanut sauce for dinner.

Thu 6-8-06 [B L D] 188

Wed 6-7-06 [B L D]

Tue 6-6-06 [B _ D]

Sushi and Coke in place of applesauce sandwiches and milk at lunch.

Mon 6-5-06 [B _ _] 190

Pizza Hut Buffet lunch with cherry pizzert! Ugh!!

Soup, rice & beans plus beer for dinner... and Keebler chocolate mint cookies. Forgot all about these. Found them deep in the freezer.

Must... get... serious about diet!

Sun 6-4-06 [B L _] 188.5

McD cheesburgers while watching Da Vinci Code.

Sat 6-3-06 [_ _ _]

No breakfast. Leftover pizza for lunch. Fried chicken & extra fries for dinner.

Fri 6-2-06 [B L _]

Big sushi dinner.

Thu 6-1-06 [B _ _]

Lunch at Mac Grill. Only ate half a salad due to fetta chees contamination. Gross. Later ate regular lunch plus lots of watermellon. Extra watermellon and chocolate chips with dinner and a movie.

Wed 6-1-06 [? ? ?]

Tue 5-30-06 [_ L ]

Raw food "cheesecake" and chocolate mint sauce with my usual breakfast.

Mon 5-29-06 [B _ D] 187.5

Sonny's with Dave for lunch. After lots of junk food over the holiday, just 0.5 lb increase.

Fri 5-26-06 [B ]

No cheese for my omlete today. Dang! Also, tried a new organic salsa. Too much vinegar.

Thu 5-25-06 [B L _]

I was sooo close to going to Pizza Hut buffet for lunch. I felt the need. But once I ate my diet lunch at home the need was gone. Thanks goodness I dodged that bullet.

Dinner at Olive Garden. Wine, salad, bread sticks with extra butter, ravioli and chocolate cheesecake. But... no little chocolate mints at the end. That's good, right?

Wed 5-24-06 [B L _]

Two plates of salads at Sweet Tomatoes. That wasn't too bad but I finished with soft-serve chocolate ice cream. Or maybe it was yogurt? Doesn't matter because it was covered with chocolate syrup and chopped peanuts and toffee bits. About half ice cream and half toppings. Like a bowl full of partially melted candy bars.

Tue 5-23-06 [B L D] 187

Finally made it back to regular yoga class and stopped by the scale. No damage after all those deviations.

Mon 5-22-06 [B _ _ ]

Ate peanut butter after the banana was gone for lunch. Long after. I'm amazed that I now like natural peanut butter.

Sushi and a chocolate soft server ice cream cone for dinner. I wanted that cone on Thursday at Sea world but they apparently now only serve vanilla. I guess that makes the line move just a little bit faster since there's only one flavor. I passed and it was worth the wait!

Sun 5-21-06 [B _ _]

Lunch included a Boar's Head hot dog sold outside the grocery store. Dinner was sushi, chicken w/ peanut sauce but also some Reese's peanut butter cups.

Sat 5-20-06 [B _ _]

Had breakfast at noon in place of lunch. Dinner was fried checken, potato salad, black eyed peas and Reese's peanut butter cups.

Fri 5-19-06 [B L _]

Fried cat fish, gator and frog legs for dinner.

Thu 5-18-06 [B _ _]

Vacation.

Wed 5-17-06 [B L D]

Tue 5-16-06 [B L D] 187.5

Did it. Didn't "taste" the peanut butter as soon as I opened the container today. And I didn't lick the knife when I was done. I don't know if this explains why my weight was down last night. It's too soom from me to draw a big conclusion. I do feel a little empty between meals. That's what I was after. I think it's more mormal to cycle between being full and empty rather than feeling full most of the time.

I felt something was missing after eating my soup and getting the chicked and peanut sauce ready. I thought, this just isn't going to satisfy me. Then I remembered that I can have a Miller. Problem solved.

Weight was up but I wasn't surprised. I had the urge to pee during yoga but I never took care of it.

Mon 5-15-06 [B L D] 186.5

Sun 5-14-06 [B D _] 187.5

Okay, today's the last day I give myself credit for not deviating on breakfast while eating peanut butter straight from the jar long after the banana is gone. Part of the problem is that I eat the banana while browsing news on the web and I'm reluctant to get up and cook the omelet. That and I'm surprising addicted to the natural style peanut butter. Yesterday I found the best deal in town, 18 oz. of deli-fresh peanut butter for only $2 at Chamberlin's Market & Cafe. Starting with lunch today I either stick to peanut butter on the banana or I'll mark the meal as a deviation.

Managed to get by with just a few grapes & grape tomatoes while watching American Dreamz (B). A comedy that's enjoyable unless you happen to be a Republican seething with hate or a vengeful Muslim extremist. Funny how those two groups keep showing up side by side.

Up half a pound. Hardly significant. Probably due to eating dinner in place of lunch. I just did that because I was out of bread and bananas.

Sat 5-13-06 [B L D]

Fri 5-12-06 [B L _]

Did it. Added Peanut Sauce to the dinner portion of the recipe. I don't use it so much for dark meat but I really like it for otherwise boring white meat. Even my teenage son likes it. Plus, it's simple to make. Last night I ran out so I made a double batch for tonight.

Also moved optional juice from dinner to breakfast as a standard item. I've rarely exercised the option to have juice with dinner, I miss it, I have about six jugs (bought on sale) and I'm concerned I'm not getting enough fruits and vegetables. Plus, I like the extra liquid in the morning best.

Chinese buffet dinner. Oh, well. At least I had a good appetite. I really enjoyed the food and didn't eat more than usual.

Thu 5-11-06 [B L D] 187

Dropping the fancy table format. Too much trouble, especially entering links in HTML. It goes against the simplicity of infogami so I'm switching to this format for now. I'll leave the old table entries for now.

Wed 5-11-06 [B L _]

Chinese for dinner, plus almost a whole package of Andes choclate mints. Tasted great while I was eating all of it. Only uncomfortably full afterward. Ugh, I had grapes and grape tomatoes in the fridge. Good reason not to keep candy in the house.

Watched The Weather Man (C).

Day Date Meals Lbs Comments Movie
Tue 5.9.06 B L D
Mon 5.8.06 B L _ 187 Ate some cake a friend brought me. It was her anniversary with her boyfriend so it was special. I had to eat some, right? Plus it was chocolate with raspberry in between layers and butter cream frosting. So I ate a third of what she gave me and the rest went to my skinny son. Then something weird happened. I lost consciousness and he wasn't much better off. I woke up alone on the couch. The TV was off and my son was in bed. I struggled to walk. Maybe it was the cake or maybe it was the yoga earlier. I was so into the yoga class, it was a very intense workout. Then, on the morning after, I noticed a large soup bowl was missing. My son had collected all the "garbage" from our meal. We eat on the floor, picnic style on a sheet of plastic made from a 39 gallon black yard bag, cut open and spread over the expensive rug. I knew what happened. I found the soup bowl, wrapped up with napkins, chicken bones and other trash in a big black wad in the trash. I asked my so and he has almost no memory of the evening. All he could piece together was that he made it to bed but skipped his shower. I think it was the cake that affected us both.

No swim today. Pool being used to teach babies, yikes! I've gotten sick swimming after baby training classes before. I don't think it was a coincidence! Plus I don't think the classes are effective. When my kids were small I was the one to get training, in how to properly teach my kids to swim to swim with me.

Weight is bake to 187. I think I was dehydrated yesterday. I felt unusually thirsty after yoga. Plus, on Sun, it's an extended two hour class.

Sun 5.7.06 B L _ 185 I think I know what's upsetting my digestion. I ate 1/2 of the jar of natural peanut better in only two days. That's half a pound! So, what do I do next? Today I bought more natural peanut. This time in a plastic tub at the grocery deli. Ground fresh, this has the advantage that it does not require the initial vigorous stirring to mix Smucker's oil and peanut butter. The disadvantage is that it has even less taste and has the consistentcy of wet sand. My response... I ate even more today. I hope it's healthy.

Soemthing unusual at the end of my swim today. Part of my ritual is to swim the last length of the pool, 25 yards, underwater while holding my breath. I don't even make it all the way. It's more of a quick test to get some objective feedback on my condition. I usually surface 3/4 of the way, before I become uncomfortable. Today was different though and I could feel it the moment I put my head underwater. I swam all the way in one breath! So... right away I start mentally listing all that has changed... Sky Line Chili, I just recovered from my cold, yesterday was my first day back at yoga, the Coke or... is it my new diet?!?!

Desperate for a movie I saw a man burned alive and finger hacked off in The Hills Have Eyes. And those aren't the worst parts. Disturbing.

Peanut sauce on chicken. I may add it to the diet but I still deviated tonight, ate last of the Easter candy.

Finally weighed myself after yoga. Only 185? Makes me wonder if the scale is off.

C
Sat 5.6.06 B L _ My stomach was a little upset yesterday. Was it all the natural peanut butter? Or the bitter beer I had with dinner? I'm still eating the new peanut butter today. I have to keep moving forward.

Coke on the way to Clearwater, Florida. I stopped to take a nap and bought the soda at a Burger King drive-thru partly out of an old habit of using a Coke to keep me awaye on long drives. There was some internal struggle though. I had the perfect 12.5 minute nap so part of me knew I would be fine without the drink. But any one sided behaviour like this diet seems to involve some back slidding, just to verify there isn't a better way. As soon as I got the Coke, drank a little then I was pretty disgusted and was tempted to toss it out the window while driving on the interstate. But there was too much traffic, it was broad daylight so I kept it and, natuarally, eventually finished it all. Hopefully this will now be something to remember that I don't need to repeat.

Dinner on the balcony at Sky Line Chili with a beautiful view of the beach, the sun sparkling off of the Gulf of Mexico and lots of women in bikinis. Just one more reason why I had the Coke earlier. I knew where I was heading. Deep into my past.

Fri 5.5.06 B L D Switched to Smucker's Natural creamy-style peanut butter. Mostly because I ran out of Jif. I bought the Smucker's a long time ago, with good intentions to some day eat something healthier than the lard-like shortning found to Jif. The Smucker's has much less flavor, a gritty consistently and yet I like it. Anything this unpleasant must be good for me. I'm switching my diet to recommend "natural" peanut butter.

Watched About a Boy at home while eating dinner. Having a cold Miller went well with the show. The first time I saw this movie was at the end of a four week sabatical. I had just stayed at home since my life is already pretty much a constant vacation. But watching this show had made me determined to be an even bigger goof off. A day later I arranged for a massage, only the second one in my life. That would lead me to meet Ingrid and the one hour massage turned into three and my life would never be the same.

But back to the movie... I've heard some people weren't thrilled with it, focusing on one particular character. I not only like it as a guide to the good life in solitude but I also like how the four or five main characters all struggle with the same issues, although each is out of step with the other, either in time or in their response. Not unlike Falling Down.

A
Thu 5.4.06 B L _ Drove to a local "Food Pantry" yesterday. They had a long row of bread racks along the front of the building with a hand painted sign saying "Limit: 3 loaves per family". I told my son to jump out and grab three for us. He glared at me.

Just the place where I can donate all the stuff in my kitchen that I don't plan to eat. Mostly boxes of cereal and crackers that I had stocked up whenever I saw a good sale. It's surprising that I've gotten this far.

Finished the Raisinets while watching Yin shi nan nu, the perfect diet movie.

A
Wed 5.3.06 B L D Substituted banana and more peanut butter in place of rice and beans tonight. To avoid this being a deviation I'll just make this an official option. It will come in handy when I've forgotten to cook the rice in time for dinner.
Tue 5.2.06 B L D Cut back milk from 12 oz. to 8 oz. Was feeling too full. Switched to Canadian Bacon. Better taste (almost as good as regular bacon) and small consistent serving size.
Mon 5.1.06 B L D
Sun 4.30.06 B L _ Ate some Raisinets while watching Basic Instinct 2. Makes me think of the short story, "It's A Good Life" by Jerome Bixby. In the movie Sharon Stone has complete power over everyone and she knows it. Well done, dark and, by the end of the show, she starts to take control of the audience too. If I was more masochistic I would have liked it better. C
Sat 4.29.06 B L D Must try... to eat... at home... before hitting the movies. Hmm, maybe not. I made it through Friends With Money with just a few cinnamon Altoids. I think it helps to watch a movie with reasonably good acting and writing that's not too interesting. I chose the movie just to see Joan Cusack, who I believe is Drew Barrymore's elder sister. She doesn't prove women get better, not older. She proves they don't have to (get better). What a goofball. I also like Frances McDormand. Supposedly she's a physical and mental wreck in the story. I think they could have done better, I found her reasonably attractive and sane. What's-her-name was her usual blank self. I guess it's all downhill after her most memorable and heartfelt line from Office Space when she said "I love Kung Fu". She does have one moment in the film but you have to wait for it, until the final 30 seconds. As a reward she gets the one male partner who's not obviously gay. C
Fri 4.28.06 B L _ Same dinner as last night but watched Eight Below (chilly dogs) instead. What a mistake! Disney, ugh, I forgot who made this. Thirty minutes into film I decided to sneak next door to watch Slither again. Just then it became bearable and I, gulp, watched it all. One scene made me jump, scarier than anything in Slither. That's a plus. Otherwise this film is best watched on TV while sleeping on the couch. D
Thu 4.27.06 B _ _ Lunch at Boston Market (think "BM") & two giant chocolate chip cookies. I felt dizzy 90 minutes later. McD cheesburgers, fries, Coke & Snickers all while watching Thank You for Smoking. Now I'm coming down with a cold. Tomorrow's another day. C
Wed 4.26.06 B _ D Cut back a little on breakfast, too full. A little homemade applesauce cake with lunch.
Tue 4.25.06 L B D 187 Too busy, swaped breakfast & lunch. First beer, seemed bitter.
Mon 4.24.06 B L D Interesting effect, water goes right through me while on diet.
Sun 4.23.06 B L _ 187 Sushi, chicken & chocolate brownie cookie for dinner.
Sat 4.22.06 B L _ Snickers while watching Slither. Fried chicken dinner later. B
Fri 4.21.06 B L D Watched Donnie Darko for the fourth time. A
Thu 4.20.06 B L D 187 Added milk & chicken. I'm not hungry now.
Wed 4.19.06 B _ D Lunch: 1/2 Ham & chees sub + left-over Easter chocolate.
Tue 4.18.06 B _ D 187 Hershey kisses before lunch.
Wed 4.17.06 B _ _ 187

Propane Problem

I recently had a lot of work done on my house. Nasty expensive jobs that I've put off since moving in 18 years ago. The worst was getting rid of an abandoned propane tank buried four feet deep in my backyard.

Nobody would help me. At least not officially. Not the government, the fire department or the propane distributors. I was on my own. Here's how I did it.

  • Attach garden hose to regulator.
  • Hoist free end of hose 20 feet up into a tree.
  • Released 50 gallons of liquid propane into the air. Long story short: I estimate that I created a propane cloud 40 miles long.
  • Gain access to the tank. I used a 13" wrench and a sledge hammer to get the regulator unscrewed. That only gave me a 1" diameter hole to perform the remaining work.
  • Filled tank with 100 gallons of water which caused a foul smelling yellow liquid to rise to the top and pour out of the regulator hole. Burned the highly flammable liquid right there rather than let it soak into the soil.

This eliminated most of the danger of the tank. But I was left with the 5" diameter pipe sticking a foot above ground level and topped off with a guage, valves and the regulator port. Tried to dig up the tank originally but found it to be too large, about six feet long. At one point I considered a guy's offer to remove it for $400 but I had a better idea. My neighbor offered to cut the pipe off for free. That sounded great but I knew I had to prep the pipe so that it wouldn't burst into flames while being sawed.

  • Drilled hole in base of periscope like pipe. Discovered the rusty steel to be a full 1/4" thick. They really built this thing to last. Just drilling a hole was difficult. Water drained out of the pipe quickly, down near the top of the tank which remained full.
  • Lit the pipe. It was coated on the inside with the oily yellow liquid and it burned for a minute.
  • More yellow liquid was slowly bubbling to the top of the tank, at the base of the pipe where I drilled the hole. Like Italian salad dressing separating in the bottle.
  • Washed out the pipe with lots of detergent. Repeatedly checked for any additional yellow stuff appearing. I couldn't eliminate it completely. There was always enough to fill the pipe with flamable fumes.
  • Inserted plastic tube attached to a can of shaving cream. Filled pipe with foam.
  • Neighbor risked his life to stand in hole next to the pipe and cut through the pipe with a circular saw and carbide blade. Lots of sparks but no fire.
  • Recycled the heavy steel pipe with brass fittings.
  • Buried the remains of the tank. The site looks like a fresh grave.

Total time, one month.

Future of Python

I still have high expectations for PyPy, the new project to implement python in python. They've already produced RPython, a restricted Python that compiles to very efficient "C". This has been a surprise to the PyPy people, that so many programmers are asking for RPython. So it was released recently for writing extension modules for Python. PyPy itself still has much to offer. If successful I expect other languages such as Ruby will follow.

In the meantime... Python is taking a beating against Ruby because of the popularity of "Ruby on Rails". Some say Python has lost it's chance to take over the world. I see PyPy as the last hope.

Meanwhile... Google hires Python's leader, Guido, and he's busy on Python 3000, a substantial re-write. In "C". Why? What's he thinking?!?!? I hate to see anyone waste their time. If PyPy works then it will eclipse all language specific Python: Guido's CPython, Microsoft's .NET Iron Python and Java's Jython. I'm keeping my fingers crossed.

GNU Screen

Great utility, use it often.

Terrible name, screen. Can't just Google screen for help. Try Google on "gnu screen" instead.

I had to be convinced to give screen a try. I originally thought it was something that only had use in the old days, before X Windows with multiple terminal windows. Not true though. Here are some reasons why I use it.

  • Stay connected to customer machines. For some reasons the connections to these machines are unreliable. At least with screen I can reconnect and pick up exactly where I left off.
  • Some machines I work on are isolated from any network. I have to call the customer and ask to have a phone line plugged into the modem. I can't use PPP so I only get one connection. With screen that's no longer a terrible problem. I connect once and open all the windows I need. When the modem times out or someone unplugs the phone line I get reconnected right back where I left off.
  • Memory. Screen Let met keep about eight windows open so long as no one reboots the machine. Just having these sessions active help me keep track of where I am on a project.
  • Just need to telnet/ssh into a remote site once and then can open and toggle between windows easily.
  • I even use it locally on my Mac Powerbook. The Mac terminal program doesn't have tabs and so I have to open separate windows which quickly leads to clutter. Screen is easier to manage.

I'm certainly not a power user. Here are some basic commands that I use.

  • ^Ac - Create new window
  • ^A^A - Toggle to previous window
  • ^An - Go straight to windown (n = 0-9)
  • ^AA - Rename current window
  • ^Aw - List windows
  • ^A? - Help
  • ^Ad - Detatch from screen session
  • ^Ak - kill window

Links