Categories
status

Change words in multiple files across mu …

Change words in multiple files across multiple directories.

perl -p -i -e 's/Documents%20and%20Settings/Users' `grep -ril "Documents%20and%20Settings" *`

Adopted from http://joseph.randomnetworks.com/2005/08/18/perl-oneliner-recursive-search-and-replace/

Categories
status

Readline search in bash. Ctrl-r: revers …

Readline search in bash.
Ctrl-r: reverse search
Ctrl-s: forward search
However, the Ctrl-s keybinding is conflict with a settingin Ubuntu.
Disable it with this command and Ctrl-s will be working.

$ stty -ixon

Categories
status

Title for muti plots in R mtext(‘Title …

Title for muti plots in R
mtext(‘Title’, outer=TRUE)

Categories
status

Some packages good for revising LaTeX te …

Some packages good for revising LaTeX texts.

\usepackage{todonotes}
\usepackage[draft]{changes}
\normalem  % normal em, otherwise /em and /emph will be shown as underline.