replacing a USB port on the Panasonic CF-72

•February 2, 2010 • Leave a Comment

After successfully replacing the power jack and the power plug last week I felt confident enough to fix the last problem I have with this notebook: a broken USB port. I remember when it broke; I tripped over the printer cable having left it in following the printing of some documents. Now I am always careful to unplug the printer as soon as I am done using it. Since the computer only has two USB ports having one disabled is potentially problematic.
Continue reading ‘replacing a USB port on the Panasonic CF-72′

power problem

•January 29, 2010 • Leave a Comment

The power jack on my notebook broke again. An easy problem to fix and one I took care myself last time. Although perhaps using a salvaged power jack from a beat up old notebook wasn’t the best idea. This time I ordered a brand new one on ebay; hopefully it lasts longer than the old one.
Continue reading ‘power problem’

CF-72 Touchscreen script 2.1

•November 7, 2009 • Leave a Comment

I recently upgraded updated my notebook to Ubuntu 9.10 Karmic Koala. For the most part it went well, as is to be expected with a clean install. For a while now I have just backed up my home directory and reinstalled rather then doing upgrades – its just a smoother ride. Perhaps the biggest hiccup was getting the touchscreen working again. The script I wrote for 9.o4 kept stalling out halfway through. It wouldn’t even tell why, it would just stop responding and I would have to escape out at the terminal. I futzed around with it for a little while and then noticed that the touch screen was working. So while something was going wrong and I never really found out what, it did eventually take.

I finally got back to the script; I first went through it editing it for readability and then tweaked a few things I had broken with my futzing, finally I added sudo in-line so the script can be launched by any user with sudo privileges. I never did figure out what had happened; there are no major differences between this script and the last one so they ought to be inter changeable. Anyway at long last pstouchscreen-2.1.sh Continue reading ‘CF-72 Touchscreen script 2.1′

ktouch_tfa_wikipedia-2.1

•November 5, 2009 • Leave a Comment

That script I wrote the other day was quick, and it worked,  but it was kinda kludgey. Of course I didn’t spend much time on it. But I got to thinking wouldn’t it be nice if it didn’t overwrite the old lesson every time it was run. And then I found that there was a pesky long dash that wikipedia likes to use that just isn’t on the keyboard. A rewrite was in order, and I had it done and then moments ago I thought that something should prevent duplicate lessons from being created as well. I guess this project kinda ran away a little bit, but at last here it is ktouch_tfa_ wikipedia-2.1

Continue reading ‘ktouch_tfa_wikipedia-2.1′

python generated ktouch typing lessons

•November 2, 2009 • Leave a Comment

I have been teaching my self to type with ktouch. It is a pretty good program, I am already faster than I was in my hunt and peck days, about 120 kpm. I got tired of doing the same lessons over and over, starting with two keys and progressively getting more difficult. Even the most difficult lesson gets easier after you have typed the same nonsense sequences a dozen times.

I found that the lessons are stored in xml files and decided to write a script that would fetch articles from wikipedia and turn them into typing exercises.

Continue reading ‘python generated ktouch typing lessons’

challenge 17

•October 23, 2009 • Leave a Comment

I haven’t forgotten about the python, err, ruby challenge. Although I have been busy with a number of other things I have been chipping away at number 17. It’s quite a doozy, I became discouraged on more than one occasion. But in the end my stubbornness always brought me back. Continue reading ‘challenge 17′

X11 forwarded to a second Virtual Terminal

•October 11, 2009 • Leave a Comment

With the US-122 working, I wanted a way to remotely control it with my notebook from the couch where I sit and play guitar.  Easy enough with X11 forwarding over ssh. Continue reading ‘X11 forwarded to a second Virtual Terminal’

Automating the Tascam US-122 in Ubuntu 9.04

•October 11, 2009 • Leave a Comment

I gave away my Tascam US-122 usb audio interface some time ago, and immediately missed having it to play around with. I wouldn’t call myself a musician, but I do think it is fun to plug a guitar into the computer, fire up qjackctl and jackrack and see what kinda weird noises I can get the computer to make. So this weekend I picked one up on craigslist pretty cheap and thought I would see about automating the installation with a shell script.

Continue reading ‘Automating the Tascam US-122 in Ubuntu 9.04′

Long Live Angstrom

•October 4, 2009 • 19 Comments

Rather then doing something useful I decided to upgrade my Zaurus sl-5600 from OpenZaurus to Angstrom. Several months back the SanDisk wifi card I had died, and since I would need to install applications, I would need a network connection. I got the cheapest cf wifi card I could find on ebay, a Symbol High Rate, only to discover that it only supports WEP encryption. This means it won’t be very useful at the local coffee shop but by temporarily changing my home network from WPA to WEP I can do upgrades and install software. At least I only paid $10 buck for the card

“OpenZaurus time is over – long live Ångström” reads the headline at the OpenZaurus web site. Continue reading ‘Long Live Angstrom’

switch case in python

•September 19, 2009 • 2 Comments

This week in PL&D we started looking at decision structures; if, else if (elif) and else as well as case structures. We were only given two exercises and I wanted to use both structures so when I got to the second one and started writing the python it occurred to me that I had never used a python case statement. I looked it up and sure enough they don’t exist. I found that there are numerous workarounds but they tend to be oriented towards testing against a specific value or a string, what the exercise called for was testing a value against a range. The most common structure other than simply using if elif else was to put your values into a dictionary. But how to do this with virtually infinite floating point ranges? Than it hit me, use > <= statements as dictionary keys and then simply ask for the ‘True’ value from the dictionary.

# Determine the shipping rate
def getRate(weight) :
        case = {`weight <= 2` :1.1,
        `weight > 2 and weight <= 6` :2.2,
        `weight > 6 and weight <= 10` :3.7,
        `weight > 10` :3.8};
        return case['True']