Tuesday, October 6, 2009

Just note: set up vim word completion

This is just a note for myself. And I'm still a learner of vim, but I did a tiny progress today.

As I have physical disability at my hand, word completion is a feature good to have.

Here is what I did today.
1. Add the following line to ~/.vimrc
isamu@hope:~$ grep dict .vimrc
set dictionary+=/usr/share/lib/dict/words

2. Get word_complete.vim from :
edit the file for uncomment "min_len" and "accept_key" probably at line 57, 58
and put the file into ~/.vim/plugin, which is the default vim plugin directory.

3. At ex mode of vim, type ":call DoWordComplete()" starts word completion,
Or at [insert-mode], [C-x][C-k] does the same job.

Pitfall: Without step 1, step 2 doesn't work. Vim needs a dictionary, of course.

Monday, July 13, 2009

My Wheelchair Ride to El Camino

On last Saturday, I went to Nijiya in Mountain View, CA. I actually missed Bus 54 which takes Mathilda ave. And I drove my chair to El Camino to get Bus 22. I love driving my chair and cruising cities, parks, and mountains, sometimes.

Here is the route I took on Saturday. It took just 30 minutes.

link tofrom my place to El Camino for larger map.

Bus 22 runs from early morning to late night. You can let me know if there are good public lectures, people gathering, or for just having a drink! Smile.

In theory, my char goes as far as 30 miles per charge. And I charge it each night, so ...

Thursday, July 9, 2009

Note: my first Inatant Rails app

I'm taking a Ruby class in this summer. In this class, We're learning how to build web applications using Ruby on Rails. I'm creating this blog post just as my cheating sheets for the class and recording what I did on my laptop before I forget.

So as my first entry of this series (whether I'm making this series or not) I put how I tested scaffold in this time. Scaffold is the simplest way creating M-V-C app. We just need to specify a table as model. Controller (list, new, edit, and delete) and Views (which is the presentation layer of app) are created automatically. So, let me start!
  1. Start Instant Rails by clicking the Icon or whatever
  2. Open a Terminal from Instant Rails
    (click [I]->Rails Applications -> Manage Rails Applications, and click "Create New Rails App..." button at the bottom of the new window.

  3. In the Terminal, type
    rails -d mysql app_name
    ... like rails -d mysql namelist
    This creates a batch of files under app_name

  4. check \config/database.yml for connection to DB.
    Notepad doesn't quite work, so use another text editor. (I'm using ConTEXT as my professor recommended.)

  5. In the Terminal,
    cd app_name .......... entering app dir
    rake db:create ........ create database named app_name_development
  6. In the Terminal,
    ruby script\generate scaffold table_name col_name:type...
    ... like ruby script\generate scaffold user name:string contact:string
    Technically, this creates a model which is actually a table in DB.
  7. In the Terminal,
    rake db:migrate ................ This creates the table in DB
    You can check it by entering mysql from another Terminal
    (show databases, use database, show tables are a few of mysql commands.)
  8. In Managing Rails App Window,
    click refresh, check your app, and click start with Morgel
    This starts your app.

  9. To test your app, in a browser, go to;
    http://localhost:3000/table name/new
    ... like http://localhost:3000/users/new
    I saw a couple of errors from Ruby console window being created as the app started. But after reloading the URL a few times, it went through.

Thursday, June 25, 2009

A digest of my trip back to Japan

Well, two weeks have passed since the last post. I've not been good at writing diaries since I was a school kid. And there is another excuse keeping myself away from this blog. I've just moved from Mountain View to Sunnyvale getting closer to my school. Many of my friends helped me with this. Besides, my parents flew from Tokyo, Japan on this Monday, June 22nd and have been helping me and made me settle in the new place. My actual move was June 23rd, and we still need to put the huge stuffs away as you can imagine, and my parents have to work day and night on it until they fly back to Japan on June 29. I really wish that they have time to enjoy California as well, but not sure if they can. I've been really useless on moving...

Anyway, I and my parents also plan to visit friends. We knew some of them for years. The following is just exception from my mail to a friend of mine describing my recent trip to Japan. Since another friend of mine looks to keep asking me about it, I post this to this blog:

My trip back to Japan was interesting. I met some of my old friends and went to drink often. I visited an university which is famous in Japan; as one of my friends is a professor at the univ for human science and rehabilitation engineering, I gave a 1 hour talk about how I've been living in the U.S. in his class. The attendees were just 14 people, but most of them were young female students. This put more smiles on my face, actually. :-)

I also went hiking. There is very popular visiting site in my city in Tokyo, which is Mount Takao, about 1,800 ft high. It's famous for the temple and short hikes. And I made it the top by my wheel. This is not so common. People usually walk or climb to the top. But there is a small Japanese cafe serving Japanese noodles and beverages, and small commercial vehicles can get to the top though a hidden road. People can walk through it, but no motor vehicles are allowed to come through, except power chairs :-). It's not well paved, so I had to drive carefully. And by the way, we took a cable car to 1500 ft high, so I went from the cable car's station to the top, so 300 ft in hight? This was my recent .......... something.

You can see the pics in my other blogs.

I like to share more stories in the trip with you later, but not sure if I have time.

Thursday, June 11, 2009

key shortcut in Gmail

One thing in which I'm not good at operating desktop is to use a mouse. This little pointing device is very convenient for other folks who has no disability at their upper limbs; they just point what they want and click it. They don't need to remember command names and options using computer this way through GUI.

I know that it came from Object Oriented. A window or widget is an object, and clicking it means to invoke one of the methods the object has. This is basically how a GUI window application work. I played with Java AWT once upon a time.

But for me, who has Cerebral Palsy, pointing something by a mouse is not so easy. I can use it for games like chess or card games, but it takes longer. One solution for it is to use shortcut keys. Actually, most of window applications has shortcut keys. But now more applications are web based, and so their user interfaces are in browser.

So once I thought that key shortcuts can't be set up in a browser. But I was not right. I believe that it's related to Ajax. And I felt that I was lucky to find that Gmail has shortcut.

Here is the link to its help page, which is one of the page I have to visit often, To enabling this feature, you need to turn it on from your Gmail setting.

Now, let me try 'ctrl+P' to publish this page. :-)

mozilla firefox shortcuts from Stace.

Thursday, June 4, 2009

made it!

I made it, somehow.
I can run both OpenSolaris and Linux Debian on my laptop.
I just reinstalled Debian without installing grub, and the linux entry in menu.lst under /rpool/boot/grub was caught by grub and grub just start the linux kernel in (hd0,3).

The linux Debian entry in (/rpool)/boot/grub/menu.lst file is following:

title Debian GNU/Linux, kernel 2.6.26-2-686
root (hd0,3)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/sda4 ro quiet
initrd /boot/initrd.img-2.6.26-2-686


Not yet multiboot env, :-( keep trying

I had my Unix class yesterday. We suppose to run Linux, debian for the class. I've been running OpenSolaris on my old laptop. The professor kindly advised me not to install Linux because Solaris running, already.

Well, but I created a few partitions on my hard drive, so why not try ...! OpenSolaris is started from grub utility, so it looked not hard.

I tried to install debian into a small partition. It was easy, but debian rewrote Master Block Record (MBR). So I added OpenSolaris entry to /boot/grub/menu.lst. But an error message was displayed.
"Invalid or unsupported executable format"

I tried to reinstall OpenSolaris and ran installgrub with -m option. So now MBR was put back, and Solaris runs, but not debian.

So... I keep trying.
By the way, I found a good webpage while I've been writing this page. So I'll try this next.

Wednesday, June 3, 2009

I was lucky, last night.

I was lucky last night. I possibly got heavy rain, but I didn't almost at all.

I had my Ruby class between 5 p.m. -8:45 p.m. It's an interesting class. Anyway, I caught a bus, VTA 54 at 9:15 on Machilda ave. It was clouded, but didn't rain. Waiting a while, cooling off my rather hot brain from the class, and finally I got on the bus.

Just a few minutes later after the bus had left my stop, it started raining like cats & dogs. So Sunnyvale CalTrain station and downtown were getting very wet. It was ok to me since I was getting El Camino not CalTrain station. A few minutes later, the bus got El Camino, the rain suddenly stopped. I got off the bus, but didn't get wet, and caught VTA 22.

When I got off the bus at Castro street, Mountain View. The pavement was really dry, so Mountain View which is next to Sunnyvale had had no rain at all until that time. Then, after I got my apartment, I heard the sound of pouring. So Mountain View got wet, finally.

I didn't bring my raincoat, yesterday. Today is the same weather pattern. I'll bring one. Raining in summer in Bay area is pretty rare occasion. Is there something on on the surface of the earth?!

VTA 54 bus South schedule

Sample video: Wheelchair lift of a bus

Monday, June 1, 2009

My Status update


I like my friends in the U.S. to see this blog and use it as hub to keep the connection with them. So here is my status update.

I went back to my country, Japan in March and came back here on May 10th. During the trip I got F-1 Student visa, and I can stay in the U.S. more years. Please don't get me wrong, staying in the U.S. is not my main purpose, but still somehow I feel I'm still lucky.

So I'm now a graduate student, officially. The summer session began last week. I chose Software Engneering as my major and started taking 3 classes, Management Info System, Ruby on Rails, and Unix Operating System.

By the way, my univ is local and not famous, ITU, International Technological University in Sunnyvale. I attended its orientation 2 week ago. I saw most of students from
India, and I saw that Profs. and staffs is committing seriously. So I think that small size university is good for me in terms of communication. Anyway let me see how it goes.

I will post more entries, what I'm doing, what I see, and what I think.
So please stay tune.

Friday, May 22, 2009

test, test, my first entry

"Test,test, can you hear me? Can you hear me? Nope! you can read me, right?"

Sorry, I just started my old joke. Hi. I'm Isamu, I'm 41 years old. I stopped working and just reentered to education.

I'm a bit different from other people, physically. I have had Cerebral Palsy from my birth and have been living with it for 41 years. But yet, I picked Software as my professional since I liked Math, Physics, or same sorts when I was teens. Well, I'm not in Industry, but I'm a Software Engineering student. So I'm still pursuing to it.

Anyway this is test entry. And I like to use this blog for updating my status mainly since I think many of my friends wonder how I am.

So stay tune!

If you like to see my old entries in English, you can go