Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
it-tricks [2017/10/12 17:32] popel |
it-tricks [2023/03/14 15:46] vodrazka [TAR archive mounting] |
||
---|---|---|---|
Line 6: | Line 6: | ||
Feel free to add your name and editor. | Feel free to add your name and editor. | ||
- | * **vim**: Ondřej Bojar, Ruda Rosa, ... | + | * **vim**: Ondřej Bojar, Ruda Rosa, Milan Straka (C++ completion, Python completion, asynchronous make), ... |
+ | * to start learning vim, run the '' | ||
* **emacs**: ? | * **emacs**: ? | ||
+ | * **nano**: | ||
* **atom**: Martin Popel | * **atom**: Martin Popel | ||
+ | * **IntelliJ IDEA**: Jonáš Vidra | ||
+ | * **Kate**: Jonáš Vidra | ||
+ | * **Kile** (offline TeX editing): Anša Vernerová | ||
+ | * **PyCharm**: | ||
+ | * **VS Code** (remote access, IDE - Python, C++, etc. completion, terminals): Peter Polák | ||
===== Bash ===== | ===== Bash ===== | ||
* Use Bash auto-completion ('' | * Use Bash auto-completion ('' | ||
* '' | * '' | ||
+ | |||
+ | ==== Directory-local Bash history ==== | ||
+ | * Ondřej Bojar prefers to store the history in each directory in '' | ||
+ | * Note that this creates the " | ||
+ | * Ondřej Dušek (''/ | ||
+ | if [ -z " | ||
+ | export USER=`whoami` | ||
+ | fi | ||
+ | |||
+ | # Store all history with times and directories | ||
+ | function store_history () { | ||
+ | history 1 | awk '($2 !~ " | ||
+ | } | ||
+ | export PROMPT_COMMAND=" | ||
+ | |||
+ | # Grep history | ||
+ | function dhist (){ | ||
+ | DIR=`pwd` | ||
+ | command grep " | ||
+ | } | ||
+ | |||
+ | function hist (){ | ||
+ | if [ " | ||
+ | tail -n 30 ~/ | ||
+ | else | ||
+ | command grep " | ||
+ | fi | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== Colorful manpages ==== | ||
+ | Add this to your .bashrc (tested on .zshrc). Colors can be easily customized. | ||
+ | |||
+ | < | ||
+ | man () { | ||
+ | env LESS_TERMCAP_mb=$' | ||
+ | LESS_TERMCAP_md=$' | ||
+ | LESS_TERMCAP_me=$' | ||
+ | LESS_TERMCAP_se=$' | ||
+ | LESS_TERMCAP_so=$' | ||
+ | LESS_TERMCAP_ue=$' | ||
+ | LESS_TERMCAP_us=$' | ||
+ | man " | ||
+ | } | ||
+ | </ | ||
+ | |||
===== Git ===== | ===== Git ===== | ||
Line 24: | Line 77: | ||
* read https:// | * read https:// | ||
* learn [[https:// | * learn [[https:// | ||
+ | |||
+ | |||
+ | ===== Plots, vector graphic ===== | ||
+ | * [[http:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | ===== LaTeX, pdf ===== | ||
+ | * see also [[tex:: | ||
+ | * [[http:// | ||
+ | * [[https:// | ||
+ | * use [[https:// | ||
+ | * < | ||
+ | * http:// | ||
+ | * [[https:// | ||
+ | * You can use it with [[https:// | ||
+ | * If you need a pdf-a validator (e.g. for your thesis), you can use `/ | ||
+ | |||
+ | ===== TAR archive mounting ===== | ||
+ | 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: | ||
+ | |||
+ | / | ||
+ | |||
+ | and //umount// when you finish your work: | ||
+ | |||
+ | / | ||
+ | |||
+ | 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 [[https:// | ||
+ | It can be installed as [[https:// | ||
+ | |||
+ | |||
===== Other ===== | ===== Other ===== | ||
- | * When using **Perl** at ÚFAL, we recommend using [[Perlbrew]] with shared perl interpreters (different versions) and shared Perl modules (which otherwise take several hours to install). | + | * When using **Perl** at ÚFAL, we recommend using [[Perlbrew]] with shared perl interpreters (different versions) and shared Perl modules (which otherwise take several hours to install |
* See [[Python]] for using **Python** at ÚFAL. | * See [[Python]] for using **Python** at ÚFAL. | ||
* See [[internal: | * See [[internal: | ||
* You **should not turn off** Linux workstations at ÚFAL, unless really needed (or agreed with it@ufal). In that case, try the standard ways, and if they do not work, try Ctrl+Alt+SysRq+[R, | * You **should not turn off** Linux workstations at ÚFAL, unless really needed (or agreed with it@ufal). In that case, try the standard ways, and if they do not work, try Ctrl+Alt+SysRq+[R, | ||
+ | * SysRq has also other interesting uses: For example, if you manage to launch a program that exhausts all RAM, the system starts swapping and becomes unresponsive, | ||
* Ondřej Bojar has implemented many [[http:// | * Ondřej Bojar has implemented many [[http:// | ||
+ | * The web versions of the text utils are often older than the ones in ''/ | ||
+ | * [[https:// | ||
+ | * Ondřej Plátek keeps some of the suggestions above in configs, and scripts stored in the git repository which you can just clone to your home dir. Feel free to check https:// | ||