Thursday, July 28, 2005

rpm-get version 1.5

redhatI don't write this, rpm-get just follow the debian's apt-get, so xxx-get is very usefull tools for online upgrade/update, I have spend some time and finally get it work on my redhat 7.1. I have encounter some problem eg. genrpmlist file missing, but finally get it work. Most people will use yum on red hat or fedora. 1. download and install 2. $ rpm-get configure 3. set ftp path $ vi /etc/rpm-get.conf ftppath="" sourcepath="" 4. $ rpm-get update 5. genrpmlist missing I download from 6. genrpmlist is not working I modified the script file, change for section "Generating /var/lib/rpm-get/RPMS-list" lynx --source $ftppath/RPMS/ | awk -F'<A HREF="' '{print $2}' | awk -F'">' '{print $1}' > /var/lib/rpm-get/RPMS-list 2>/dev/null && echo "$ok" || echo "$fail" and "SRPMS-list" lynx --source $sourcepath | awk -F'<A HREF="' '{print $2}' | awk -F'">' '{print$1}' > /var/lib/rpm-get/SRPMS-list 2>/dev/null && echo "$ok" || echo "$fail" 7. since I have a proxy $ rpm -qlp doesn't not work for me, even I provide --httpproxy option, I have to change the download path from ftp:// to http://rpm -qlp $httppath/RPMS/$packages >> /var/lib/rpm-get/rpm-list.db and %httppath set in /etc/rpm-get.conf, just after ftppath httppath="" mandrake:- redhat:-

pkg-get version 0.0.1!

solarisI write a simple pkg-get today, follow the pkg-get(by Philip Brown, from Phipip version is korn shell, have some problems and doesn't work well on my solaris, I try to fix some problem but more coming, so I write my own version on borne shell, very simple, just download and install, using back the catalog file. The and sun freeware site both support it. mirror site. The most interesting part is, solaris software package have a dependency file, can be extracted using cpio. Now I can download and install using my pkg-get, no other checking, simple but working.

Monday, July 25, 2005

10 years of Java

java2Just a reminder, is 10 years of Java. If you miss this technology 10 years ago, don't miss it now.

Friday, July 22, 2005

Java Jump Start Course

java2I am going to give a half day course for java. I use to find learning java is difficult, but this is not true. Java is easy to learn, if you are on the right learning path. I start to learn java back in 1996/97, I bought a java book, but a wrong java book, I learn nothing and I stop learning for a few years, until year 2001, finally I found the right way to learn java, and everything just become so easy, so I want to share my experience with the others. I hope with my sharing, more people will start using java and develop java application.

Tuesday, July 12, 2005

War game

Spend all night play ancient art of war game and surf some photo blog, nothing interesting. I though I am going back to the office tonight, but is raining, so lazy, better go to sleep early.

art of war

Ancient art of war is a very old war simulation game, written by Murry Brother (Dave and Barry) from Evryware, release by Broderbund in 1984, yes 20 year ago. I still like it.

The fan page is here.

Sunday, July 10, 2005

Danger of a broker driver

wireless cardTry to setup my housemate's PC. I have install the Windows XP operating system (he prefer to use windows). The next thing should setup the broadband network.

I plugin a 3Com etherlink 3 network card, everything just work fine. Yesterday my housemate bought a D-Link wireless network card (model DWL-G520+), I just plug it in, though it will just plug and play like other network card, but it doesn't. I install the driver which came with the D-Link network card, is not working too.

Finally I pick up the manual and read. I am a lazy person, I should have read the manual first. I just find out from the manual, it stated "Warning! Do NOT install the Wireless card into your computer before installing the driver".

The nightmare has just begin, for the next 10 hours, I try to download every wireless driver that I can try on the d-link website, searching the FAQ for the problem, try install the driver with plug and unplug the network card, it just not working.

I though I am going to give out, until someone says something here, he read from some forum, suggest to use a US Robotic driver, since both of them using a TI chipset.

Finally it works, the USR driver working for D-Link wireless card! I have spend more than 10 hours try a broken driver from D-Link.

Thursday, July 07, 2005

Meetup 7th July 2005

Many bad things happen today, four bombs exploded in London, 33 killed, many people injured. British prime minister Tony Blair confirm hit by terrorists, rush back from G8 summit.

About 26 people attend today's meetup, I gave a presentation on Postgresql, I overshoot the time. I really need someone do timing for me. Molly bring 2 gentleman--Bhaskar talk on open source database as well, finally Chin Fah talk on iSCSI.

Today I feel very tired and restless, too many bad things happen.

Saturday, July 02, 2005

Tips: search and replace pattern in vi, sed...

sed awkI use vi a lot for my software development, both unix and java program. I am not an vi expert, just enough for my normal use, but search and replace in vi is troublesome for me, I get a 2 different answer from experience vi user, it work well for me, but when I ask them why there is 2 different format, they don't give me a well explain, so I just copy down and follow...

1. :g/<source>/s//<target>/g
2. :1,$s/<source>/<target>/g

I try to use other format, it just don't work.

Finally I read the O'Reilly's 'sed and awk' book, and figure out what is the format:
(this pattern works in sed, and ed too)

:[address]/<filter pattern>/s/[<pattern>]/<target>/[c,g]

address is optional ( shown by [ ] )
g, global, all the lines
n,m, line n to line m, $ stand for last line. eg. 1,$ is same as global

/filter pattern
filter out the pattern line by line, pattern is optional, if pattern is provided only those lines with filter pattern, will be search and replace

the 2nd [pattern] after s/ is the search pattern
if the search pattern is not provided, the pattern will follow the (1st) filter pattern, but the search pattern could be different from the filter pattern. eg. :g/hello world/hello/Hello/

replace pattern
the target pattern that you want.

the final [c,g]
c, confirm 1 by 1
g, global, all, (for the line only), if replace all line must specified in address. if nothing is provided, only the 1st exist pattern will be replace. eg. the there is 2 'hello world' exist in each line, only the 1st 'hello world' will change to 'Hello world', with capital 'H'.

New ARM chip on Jazelle RCT

May people heard about Intel, AMD, Power(PC) but miss out the ARM cpu. ARM company is popular for its low power consumption CPU technology, their processor found in many embedded and mobile device like Palm, mobile phones, and portable game console eg. nintendo's Game boy. ARM works on a java chip for a few years, they release a new version of their Jazelle chips recently, you can read the news here. ARM is a creative, on-going with new development technology company with clear and focus goal. I didn't know that, ARM has a chinese name 安謀 .

Friday, July 01, 2005

lynx 2.8.5

Such a boring day. I download the latest lynx, the text base browser, and compile on Solaris 2.8, it give a lot of warning, but finally it can be compiled, and working. Seems like lynx is easy to compile too. I make a solaris package as well, but no where to upload. What's next?