Monday 10 June 2013

Rotate only one screen

check devices

xrandr -q

and rotate accordingly

xrandr --output LVDS-0 --rotate left

Sunday 7 April 2013

vim screen and the nasty ABCD key-bindings for the arrow keys

This is the solution

set term=xterm

Adding this line to yout .vimrc file or 

:set term=xterm

once you are in vim.



Wednesday 13 March 2013

How to add supplementary figures to latex documents




% Reset the figure counter; add 'S' as a prefix for figures; avoid @ being a letter
%%%%%%%%%%%%%%%%%%%%%%%
\setcounter{figure}{0}
\makeatletter
\renewcommand{\thefigure}{S\@arabic\c@figure}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%


Friday 18 January 2013

How to grep a variable in bash?


export var='chr1'
grep -P ^$var'\t' file.to.grep

This will grep the lines that begin with chr1 followed by a tab. This ignores cases as chr11 or chr19