February 12, 2010, 11:40 am
VERY handy!
1 2 3 4 5 6 7 8 9 10
| @echo off
rem --------------------------------------------------------
rem File: which.cmd
rem Description: Windows equivalent of Unix which command
rem Author: Pankaj Kumar
rem Copyright 2004 Pankaj Kumar. All Rights Reserved.
rem License: This software is available under GPL (http://www.gnu.org/licenses/gpl.html)
rem ---------------------------------------------------------
setlocal
if " %1" == "" goto noArg |
Continue reading ‘Handy ‘which’ command on Windows’ »
February 10, 2010, 4:36 pm
下面的方法对Firefox和ThunderBird都有效:
在Firefox地址栏输入about:config或ThunderBird的工具-》高级-》配置编辑器中, 增加布尔变量config.trim_on_minimize为true。
Continue reading ‘Firefox和ThunderBird自动优化内存使用’ »
February 10, 2010, 1:24 pm
February 5, 2010, 4:05 pm
This document demonstrates how we could run client-server software via SSH. The main purpose of using this technique relies on that on most HPC servers most of the IP ports are nromally blocked except for the SSH port 22.
- SSH tunneling settings in PuTTY
In this case, the server port 8888 is mapped to the local port 7777. The meaing of this is simple: once connected to the server using PuTTY, any data on the server sent/received at port 8888 will be redirect to the port 7777 of the local machine (the computer you are using PuTTY at the moment). As a result, any client software running on the client computer can communicate with the server program via the local port 7777.
Continue reading ‘SSH tunneling and example Python client-server codes’ »
February 5, 2010, 2:11 pm
February 5, 2010, 1:54 pm
Useful commands:
- wait <pid>: wait the background job with specified pid to be finished and return the exit code ( hint: stored in $? )
- jobs -p: list the pids of all the background jobs (hint: use for statement of bash to loop over each process)
- ( sleep 30s; /bin/false ) & : generate a background testing job with a error exit code
Continue reading ‘Bash: exit codes for background jobs’ »
February 4, 2010, 11:58 am
According to this thread, LAMMPS has no API document available for developers, which is a pity! Similar discuss can be found for Gromacs here, which tells there is no API document neither. Both of them are powerful simulation codes and can be used as libraries, but apparently this is not the encouraged usage. Although in the official user manuals, extending methods are discussed more or less, but those are far from enough to fully get the ideas of the design and architecture of the sophisticated packages. People (developers) often have to turn to the mailing lists and hope to get peer help from other users, which can be misleading without the help from the original software designers. On the other hand, if complete API documents are available for the end users, I believe the community and the software itself will thrive rapidly and become much stronger.
February 3, 2010, 6:39 pm
Sometimes after mounting some nfs devices, you cannot easily un-mount them. You get some error: “device is busy”. I often get this error when I want to un-mount some shared folders like ‘/home’ and ‘/usr’.The reason is simple: the devices you are un-mouting are busy;) That’s to say some files on the mouted devices are being used by some process.
Continue reading ‘umount: device is busy’ »