Gaussian Identities Marc
Toussaint’s page
listing directories in Unix
ls -l | egrep ’^d’
Thanks to Gregory and Saurabh for bombarding me with lots of options.
My .vimrc File
I use this file
Finding files inside VIM
I use the following script to find files in vim Find.vim. Put this file in ~/.vim/plugin (if doesn’t
exist create the folder). You can use Find in the vim command line using
searches such as ":Find myLostCode.m". At this point I am unable to find who
wrote Find.vim, but whoever it is, thanks to him/her.
Setting defaults for Xterm (Thanks to Roman)
Edit ~/.Xdefaults, e.g. add the following file Xterm*font: 9x15 to increase
the font size. Then xrdb -load ~/.Xdefaults for the change to take effect. My Xdefaults is here
Arrow Cluster
source /cs/beta/lib/pkg/sge-6.0u7_1/default/common/settings.csh
Wiki page for Arrow cluster
SVN
To get a working copy from the server:
svn checkout file:///ubc/cs/research/lci/ai/murphyk/svnmurphy/root/students/emtiyazKhan/
Link to svn book, svn for murphyk group
Wrapping long lines between words in VIM
:set wrap lbr
When you move cursor up and down, the cursor will jump between the physical
lines. You can press j to move down one physical line, or gj to move down one
displayed line. (Taken from http://vim.wikia.com/wiki/VimTip38)
Where and how to add packages in latex (Thanks Roman H.)
/usr/share/texmf/tex/latex/
Now go to texmmf directory, there should be a file ls-R, run the following
command
ls -R > ls-R
This will update the file, and you are ready to go!
Adding hyperlinks in latex (Thanks Roman H.)
To add links include \usepackage{hyperref} in the header
To add a link use \hyperref{link}{text}, e.g.
\hyperref{httP://cs.ubc.ca/~romanh/}{Roman the dog}
Compile with pdflatex, it should work.
MATLAB debugger: (Hoyt’s Contibution)
If you have lots of files and it
crashes in between for some reason, just trun the debugger on, and it opens
the file where you the error is. Then you can debug it. I found it pretty
useful
dbstop if error
Logical Matrices:(Hoyt’s Contibution) If you want to pick some elements from a matrixs
B = A(A>5) selects elements greater than 5
Sparse Matrices:(Hoyt’s Contibution) If you don’t know the size of a matrix you are going
to assign elements to, you may first create a big Sparse matrix and then
convert that into a full matrix.
A = sparse(5,5) creates a sparse matrix of size 5x5
A(1,1:2) = [2,1]
A(2,:) = [1,4,5,6,7] have two rows of different
[row col] = find(A) finds the row and column with
non-zero elements
A = A(1:max(row),1:max(col)) gives you the smaller
matrix
Some Others
Run matlab without any problem on CS server (oops!!)
matlab -nospalsh -nojvm
Search the current directory for the files with "word"
find . -name word
Change the mode of file to read and folder
chmod -R a+r
chmod a+x
|