From 489c6fbf2993797ff511d808ea22a3fc655d0905 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Tue, 31 Dec 2024 00:17:28 +0000 Subject: [PATCH] Update cheatsheets --- tldr/jupyter-lab | 25 +++++++++++++++++++++++++ tldr/jupyterlab | 21 ++++----------------- tldr/lit | 26 ++++++++++++++++++++++++++ tldr/osx/gawk | 2 +- tldr/tuc | 30 ++++++++++++++++++++++++++++++ 5 files changed, 86 insertions(+), 18 deletions(-) create mode 100644 tldr/jupyter-lab create mode 100644 tldr/lit create mode 100644 tldr/tuc diff --git a/tldr/jupyter-lab b/tldr/jupyter-lab new file mode 100644 index 00000000..220c0998 --- /dev/null +++ b/tldr/jupyter-lab @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# jupyter lab + +> Interactive development environment for Jupyter notebooks. +> More information: . + +- Start JupyterLab: + +`jupyter lab` + +- Open a specific notebook: + +`jupyter lab {{path/to/notebook.ipynb}}` + +- Start JupyterLab in a specific directory: + +`jupyter lab --notebook-dir {{path/to/directory}}` + +- Start JupyterLab in debug mode: + +`jupyter lab --debug` diff --git a/tldr/jupyterlab b/tldr/jupyterlab index 220c0998..b5532a4e 100644 --- a/tldr/jupyterlab +++ b/tldr/jupyterlab @@ -3,23 +3,10 @@ syntax: markdown tags: [tldr, common] source: https://github.com/tldr-pages/tldr.git --- -# jupyter lab +# jupyterlab -> Interactive development environment for Jupyter notebooks. -> More information: . +> This command is an alias of `jupyter lab`. -- Start JupyterLab: +- View documentation for the original command: -`jupyter lab` - -- Open a specific notebook: - -`jupyter lab {{path/to/notebook.ipynb}}` - -- Start JupyterLab in a specific directory: - -`jupyter lab --notebook-dir {{path/to/directory}}` - -- Start JupyterLab in debug mode: - -`jupyter lab --debug` +`tldr jupyter lab` diff --git a/tldr/lit b/tldr/lit new file mode 100644 index 00000000..300ebfe2 --- /dev/null +++ b/tldr/lit @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# lit + +> LLVM integrated tester for executing LLVM and Clang style test suites, summarizing results. +> Part of LLVM. +> More information: . + +- Run a specified test case: + +`lit {{path/to/test_file.test}}` + +- Run all test cases in a specified directory: + +`lit {{path/to/test_suite}}` + +- Run all test cases and check the wall time for each cases, then report to summary output: + +`lit {{path/to/test_suite}} --time-tests` + +- Run individual tests with Valgrind (memory check and memory leak test): + +`lit {{path/to/test_file.test}} --vg --vg-leak --vg-args={{args_to_valgrind}}` diff --git a/tldr/osx/gawk b/tldr/osx/gawk index 9b64f31f..df662568 100644 --- a/tldr/osx/gawk +++ b/tldr/osx/gawk @@ -9,4 +9,4 @@ source: https://github.com/tldr-pages/tldr.git - View documentation for the original command: -`tldr -p linux awk` +`tldr awk` diff --git a/tldr/tuc b/tldr/tuc new file mode 100644 index 00000000..9c8b9889 --- /dev/null +++ b/tldr/tuc @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# tuc + +> Cut text (or bytes) where a delimiter matches, then keep the desired parts. +> A more user-friendly and powerful version of `cut` with sensible defaults. +> More information: . + +- Cut and rearrange fields: + +`echo "foo bar baz" | tuc -d '{{ }}' -f {{3,2,1}}` + +- Replace the delimiter `space` with an arrow: + +`echo "foo bar baz" | tuc -d ' ' -r ' ➡ '` + +- Keep a range of fields: + +`echo "foo bar baz" | tuc -d ' ' -f {{2:}}` + +- Cut using regular expressions: + +`echo "a,b, c" | tuc -e '{{[, ]+}}' -f {{1,3}}` + +- Emit JSON output: + +`echo "foo bar baz" | tuc -d '{{ }}' --json`