Monday, June 16, 2008

Getting BioPerf to execute

Upon executing script to start BioPerf, the following error came up:
$ ./use-bioperf.sh
You can do the following:
[R] Run BioPerf
[I] Install BioPerf on your architecture
(if your architecture is not PowerPc, x86)
[C] Clean outputs in $HOME/BioPerf/Outputs
[D] Display all versions of the installed codes
R
Please specify your architecture
[A] Alpha
[P] PowerPC
[X] x86
[H] Custom. (If you have already ran the install-codes.sh successfully
to completion, you can choose this option to run the binaries installed
on your system)
X
$HOME/BioPerf/Scripts/Run-scripts/run-bioperf.sh: line 21: syntax error near unexpected token `('
$HOME/BioPerf/Scripts/Run-scripts/run-bioperf.sh: line 21: ` echo There is no directory named $HOSTNAME-Binaries (created by install-codes.sh) in $BIOPERF/Binaries '


In order to get passed this, file $HOME/BioPerf/Scripts/Run-scripts/run-bioperf.sh should be edited on line 21 to replace parentheses with curly brackets (or similar or escaped). The same should be done on line 26 because parentheses are used there as well and are not escaped.

Thursday, June 12, 2008

Add color to bash

In order to get syntax highlighting in bash when 'ls' command is executed, add the following line to (bottom of) ~/.bashrc file:
. /etc/profile.d/colorls.sh

Note: Make sure pointed file exists. Below is an example of one:

$ more colorls.sh
# color-ls initialization

alias ll='ls -l' 2>/dev/null
alias l.='ls -d .*' 2>/dev/null

COLORS=/etc/DIR_COLORS
[ -e "/etc/DIR_COLORS.$TERM" ] && COLORS="/etc/DIR_COLORS.$TERM"
[ -e "$HOME/.dircolors" ] && COLORS="$HOME/.dircolors"
[ -e "$HOME/.dircolors.$TERM" ] && COLORS="$HOME/.dircolors.$TERM"
[ -e "$HOME/.dir_colors" ] && COLORS="$HOME/.dir_colors"
[ -e "$HOME/.dir_colors.$TERM" ] && COLORS="$HOME/.dir_colors.$TERM"
[ -e "$COLORS" ] || return

eval `dircolors --sh "$COLORS"`
[ -z "$LS_COLORS" ] && return

if ! egrep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null ; then
alias ll='ls -l --color=tty' 2>/dev/null
alias l.='ls -d .* --color=tty' 2>/dev/null
alias ls='ls --color=tty' 2>/dev/null
fi

Tuesday, June 10, 2008

Setting Eclipse Keyboard Shortcut: Ctrl+Tab

Go to:
Window / Preferences / General / Keys

Scroll all the way down to the bottom. About 12th from the BOTTOM you will see category "Next Editor".
Double Click that line. The modify screen for that action will open up.
Set focus to the Key Sequence section, and hit CTRL-TAB, then click the ADD button. You should now see TWO commands for "Next Editor". You can now select the original one, and click Delete. (from here)