Friday, July 21, 2006
Flash problem on FreeBSD
I just found this link http://altbit.org/pseudorandom/unixlike_translation.txt gives a detailed solution of how to solve the problem of viewing flash with firefox on FreeBSD. I haven't tested whether it works or not, as my browser has enabled flash with the help of the posts on FreeBSD's mailing list.
Friday, June 30, 2006
Install maple10 on FreeBSD
This version of maple can not be installed directly without effort. The java run time environment doesn't function properly. I have to patch the kernel as pointed out at http://www.freebsd.org/cgi/query-pr.cgi?pr=92671 and recompile ther kernel. I don't know whether it will work or not yet. But it seems that it has improved a lot after playing with it a while on another Linux machine.
Wednesday, April 26, 2006
pam_ssh and kdm
For users of ssh, we can use an ssh-agent to manage our keys and connect to other ssh servers without typing password explicitly. However, you will need to type the password twice each time you login to the system, then start an agent and use ssh-add to get the passphrase. This is inconvenient if your password for login and the key file are the same. We can change this behavior by editing pam files. Here is how I made it with a kdm login manager under FreeBSD.
Edit /etc/pam.d/kde, add lines :
auth sufficient pam_ssh.so no_warn use_first_pass
session optional pam_ssh.so
below
auth required pam_unix.so no_warn try_first_pass
Note that the order of the two auth line is important. For more details, read the manual pam_ssh.
Edit /etc/pam.d/kde, add lines :
auth sufficient pam_ssh.so no_warn use_first_pass
session optional pam_ssh.so
below
auth required pam_unix.so no_warn try_first_pass
Note that the order of the two auth line is important. For more details, read the manual pam_ssh.
Saturday, April 15, 2006
Best download accelerator under UNIX -- prozilla
This software really works. It can automatically search mirrors for a particular software and download it from the fastest of them. It will separate the file to several parts so the download speed can get to the maximum.
I use it to download Knoppix CD which only costs me about 15 minutes. The speed is about 600Kb/s. So try it if you want to download any large open source software from the internet.
I use it to download Knoppix CD which only costs me about 15 minutes. The speed is about 600Kb/s. So try it if you want to download any large open source software from the internet.
Friday, April 14, 2006
Hard disk upgraded
My hard disk has been almost full for sometime, and I have to copy data in and out from another external hard disk frequently. Yesterday, I finally decided to buy a new 80G one for my notebook. It is a Hitachi Travelstar with 5400 rpm and 8Mb cache. I spent 3 hours to setup everything, including back up my system, install the new hard disk and restore the system. The performance of the new hard disk seems quite good. I also reformatted my old hard disk and made an encrypted filesystem on it. I used freebsd 6's new method geli and wrote 2 scripts to mount and umount that filesystem. Now I'm quite happy with the result. I won't need to worry about the security of the data on my external hard disk any more.
Tuesday, April 11, 2006
Possible research direction
After playing with Green functions for some time, we found that the perturbation method using Feynman diagrams is quite difficult to calculate, especially for high order terms. It seems that one can use mean field theory to get some qualitative results. However, if the fluctuations locally are important, mean filed theory will fail to work. I'm not sure how it works on our problem. But my supervisor noticed that the calculation can not converge properly. Another way to solve this problem may be renormalization group method, which is claimed quite powerful. However, I have no experience on this subject, so I'm reading some papers on that which date back to 1970s.
Wednesday, January 04, 2006
The Da Vinci Code
I just finished a best selling novel The Da Vinci Code. I didn't read through it, but listened the audiobook version. I had spent several days on it. The story is fantastic, and I learned more about Christianity. As I had said before, I'm an atheist. But I always feel that religion is an interesting topic. There are some truths lie in the documentary of the gods, and to find out the real story of a deified human is interesting. Jesus is just one example. He is a human being for sure, a great political or religious leader. However, because he was treated as a god, worshiped by many people, his real life story was forgotten. The Da Vinci Code gives some explanation for that. I'm not sure how much is true in the novel, but it is a good, fascinating novel. I have some trouble to interpret the final secret, maybe I should read it again sometime later.
Sunday, December 25, 2005
Merry Christmas!
It is Christmas today. I just been back from East Coast of Singapore for the vacation with some friends. We rent a house there which is quite cheap. It only costs us S$15. This is a special benefit for NUS staff. We bought a lot of food to eat. At night, we walked on the beach. The sand is very soft. We also did some bicycling, skating and swimming. I'm not good at swimming, so it is a bit dangerous to swim in the sea. The taste of the water is terrible. However, I managed to survive. All in all, be calm is the most important thing, whatever the situation is.
Saturday, December 17, 2005
Some thoughts after today's training
This afternoon, as usual, I had a taekwondo training. During the sparing session, I had fought several rounds with juniors, and I noticed some problems of me. My left feet was injured last time, so it was a bit hurt when I kicked others. I finally gave up to use it any more to do front kick. As my left leg was quite weak in side kick, I had to rely on my right leg to do all the kickings. This is really a disadvantage for me. I found myself lack varieties in my kickings. This made me quite predictable. It is no good for sure if your opponents can predict what you would do next, and if the opponent is more skillful than you are, you will be a dead meat very soon. I think I have done so little training by myself recently. I no longer run at night and practice kickings afterwards. I have been weakened, both power and agility. If I still don't do anything, I will not be able to catch up. Tomorrow is Sunday, let's see if I will do some training then.
Thursday, December 15, 2005
Some tips on using regular expressions to download files
It is quite common that sometimes we want to download a bunch of files listed on a web page. Of course you can use your mouse to right click the link then save it to your hard disk. However, if there are so many links, it would be quite tedious to do so. For a lazy man like me, I would do the following things:
- Save the source code of the web page
- Use perl to filter out the relative links like this: perl -ne '@files = split /target=/; foreach(@files){ if (/(http*.mp3)/){ print $1,"\n" }' source_code > abc
- Use wget to download the files: wget -i abc
Wednesday, December 14, 2005
The coming IVP competition
There will be an annual Taekwondo Institute-Varsity-Polytechnic Tournament (IVP) at the end of next Feb. I will be in this time hopefully. I'm a bit nervous sometime when thinking about that. Sparing is fun for sure, but being killed or seriously injured is no fun at all. Even though the competition may not be that brutal, danger still exists. I need to do more training, more committed to it. To become a real fighter, no one can avoid the fight. Let this tournament be a good experience on my way to becoming a master.
Thursday, December 08, 2005
How to transform dos file to unix file?
We know that windoz and unix save files with different endings for each line. If you write a shell script under windoz, it will not work under unix. It may shows ": command not found" on the command line. To solve this problem, we need to change the file format. An easy way to do this is:
$ tr '\r\n' '\n' < dosfile > unixfile
This will replace all the '\r\n' at the end of each line with '\n'.
$ tr '\r\n' '\n' < dosfile > unixfile
This will replace all the '\r\n' at the end of each line with '\n'.
Workstations are down
Our department is under transformation. Machines have been shut down today. The power supply will be turned off soon. I have to stay at the library to work. It is so bad, really.
Wednesday, December 07, 2005
Carbon nanotubes
It all begins here
I finally decide that it may be helpful to have a blog of my own, both as a way to make money or to convey ideas of mine to others. I will try to update it regularly.
According to the bible, at the beginning of the world, the God said, "Let there be light", and there be light. While I'm an atheist, I can be a god here. I would say, "Let there be a post", and there will be one. So let it starts ...
According to the bible, at the beginning of the world, the God said, "Let there be light", and there be light. While I'm an atheist, I can be a god here. I would say, "Let there be a post", and there will be one. So let it starts ...
Subscribe to:
Comments (Atom)
