Various tips how to increase your productivity (esp. in Linux).
Who uses which editor and is willing to provide a mini-training for new users (show config, favorite macros, highlighters etc.).
Feel free to add your name and editor.
vimtutor commandsource /etc/bash_completion). Some tools have plugins, e.g. many Perl tools.export HISTCONTROL=ignoreboth results in bash history ignoring duplicate entries and entries starting with a space..history-bojar. See /home/bojar/diplomka/granty/cracker-2015/mtm-2016-organization/accounts-mtm16/bash-profile-for-ufal-accounts/home/odusek/.bashrc) uses a variant more friendly to others, which saves the histories in his home (but does not handle renamed directories):if [ -z "$USER" ]; then
export USER=`whoami`
fi
# Store all history with times and directories
function store_history () {
history 1 | awk '($2 !~ "^[mr]?cd[0-9a-z]?$") {$1="_T="strftime("%Y%m%d_%H:%M:%S_") PROCINFO["ppid"] "_PWD=" ENVIRON["PWD"] "\t"; $2=gensub("^_T=[-_0-9:]*[ \t]* *", "", 1, $2); $2=gensub("^_P=[^ \t]* *", "", 1, $2); print;}' >> ~/.history-all-$USER
}
export PROMPT_COMMAND="store_history"
# Grep history
function dhist (){
DIR=`pwd`
command grep "_PWD=$DIR"$'\t'".*$@" ~/.history-all-$USER | tail -n 30
}
function hist (){
if [ "$#" -eq 0 ]; then
tail -n 30 ~/.history-all-$USER
else
command grep "$@" ~/.history-all-$USER | tail -n 30
fi
}
Add this to your .bashrc (tested on .zshrc). Colors can be easily customized.
man () {
env LESS_TERMCAP_mb=$'\E[01;31m' \
LESS_TERMCAP_md=$'\E[01;38;5;74m' \
LESS_TERMCAP_me=$'\E[0m' \
LESS_TERMCAP_se=$'\E[0m' \
LESS_TERMCAP_so=$'\E[38;5;246m' \
LESS_TERMCAP_ue=$'\E[0m' \
LESS_TERMCAP_us=$'\E[04;38;5;146m' \
man "$@"
}
export GIT_PS1_SHOWDIRTYSTATE=1 export GIT_PS1_SHOWSTASHSTATE=1 export PS1='[\t]\[\033[2;31m\]\h:\W\[\033[01;95m\]$(__git_ps1 "(%s)")\[\033[2;31m\]>\[\033[0m\] '
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=CompressedWithEmbeddedFonts.pdf Original.pdf
\usepackage{pgfpages} \setbeameroption{show notes} \setbeameroption{show notes on second screen=left} and add notes using \note{Hello!}. Then display your presentation with pdfpc –notes=left presentation.pdf..github/workflows/compile_verify.yml and .gitlab-ci.yml files, for GitHub and GitLab, respectively. Some settings may need to be further enabled in the GitLab repository to enable the CI runners.\includeonly.\include{chapter.tex} instead of \input{chapter.tex}, so the auxiliary files of the unchanged chapters from the previous compilation can speedup the compilation (see details).\includegraphics[draft]{…}, which turns off rendering of images (which is usually a too high price for the speed).If you work with data consisting of many small files, you should store them in tar archives to save inodes and use LUSTRE filesystem efficiently. There is a way to mount a tar archive to a specific directory in a similar way you would mount an ISO image. You can use this command to mount (read-only) ARCHIVE (possibly compressed) to DIRECTORY:
/opt/bin/tarmount ARCHIVE DIRECTORY
and umount when you finish your work:
/opt/bin/tarmount -u DIRECTORY
If you mount your data in this way, there is only one open operation instead of thousands or millions of such operations when opening each file separately. This will positively affect runtime when your data is stored on the LUSTRE filesystem.
Run the command with –help option to see instructions for more advanced usage. The original tool can be obtained here.
It can be installed as AppImage.
tarmount is based on FUSE. You need to do call the tarmount command on every node where you need to access the tarfile contents. If two jobs are running on the same node both of them will see the mounted content.tarmount -u DIRECTORY. If you don't the directory will not become blocked for any subsequent attempts to tarmount anything on them and may be in a weird state indicated by many '?'s in output of the ls -al command. This can be solved by calling simple umount DIRECTORYtarmount command creates a database in the directory where the ARCHIVE is stored. The database is not automatically deleted by tarmount -u. It is however reused by any subsequent tarmount command called on the same ARCHIVE. This may speed up access for all jobs using the same tarmounted archive across the cluster./home/bojar/tools/vimtext and /home/bojar/tools/shell–random-source)