From d224a84a3501bcf5db8f7472953b89509759a9d2 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Thu, 30 May 2024 00:14:41 +0000 Subject: [PATCH] Update cheatsheets --- tldr/hledger-balance | 42 ++++++++++++++++++++++++++++++++++++++++++ tldr/linux/tor | 6 +----- tldr/pylint | 8 ++++++++ tldr/virt-qemu-run | 25 +++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 5 deletions(-) create mode 100644 tldr/hledger-balance create mode 100644 tldr/virt-qemu-run diff --git a/tldr/hledger-balance b/tldr/hledger-balance new file mode 100644 index 00000000..9b65d973 --- /dev/null +++ b/tldr/hledger-balance @@ -0,0 +1,42 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# hledger balance + +> A flexible, general purpose "summing" report that shows accounts with some kind of numeric data. +> This can be balance changes per period, end balances, budget performance, unrealised capital gains, etc. +> More information: . + +- Show the balance change in all accounts from all postings over all time: + +`hledger balance` + +- Show the balance change in accounts named `*expenses*`, as a tree, summarising the top two levels only: + +`hledger balance {{expenses}} --tree --depth {{2}}` + +- Show expenses each month, and their totals and averages, sorted by total; and their monthly budget goals: + +`hledger balance {{expenses}} --monthly --row-total --average --sort-amount --budget` + +- Similar to the above, shorter form, matching accounts by Expense type and summarising to two levels, without compression: + +`hledger bal type:{{X}} -MTAS --budget -t -{{2}} --no-elide` + +- Show end balances (including from postings before the start date), quarterly in 2024, in accounts named `*assets*` or `*liabilities*`: + +`hledger balance --historical --period '{{quarterly in 2024}}' {{assets}} {{liabilities}}` + +- Similar to the above, shorter form; also show zero balances, sort by total and summarise to three levels: + +`hledger bal -HQ date:{{2024}} type:{{AL}} -ES -{{3}}` + +- Show investment assets' market value in home currency at the end of each quarter: + +`hledger bal -HVQ {{assets:investments}}` + +- Show unrealised capital gain/loss from market price changes each quarter, in non-cryptocurrency investment assets: + +`hledger bal --gain -Q {{assets:investments}} not:{{cryptocurrency}}` diff --git a/tldr/linux/tor b/tldr/linux/tor index 96431f43..472e4150 100644 --- a/tldr/linux/tor +++ b/tldr/linux/tor @@ -6,16 +6,12 @@ source: https://github.com/tldr-pages/tldr.git # tor > Enable anonymous communication through the Tor network. -> More information: . +> More information: . - Connect to the Tor network: `tor` -- Start a Tor relay: - -`tor --relay` - - View Tor configuration: `tor --config` diff --git a/tldr/pylint b/tldr/pylint index 4105a33c..abebb065 100644 --- a/tldr/pylint +++ b/tldr/pylint @@ -12,6 +12,14 @@ source: https://github.com/tldr-pages/tldr.git `pylint {{path/to/file.py}}` +- Lint a package or module (must be importable; no `.py` suffix): + +`pylint {{package_or_module}}` + +- Lint a package from a directory path (must contain an `__init__.py` file): + +`pylint {{path/to/directory}}` + - Lint a file and use a configuration file (usually named `pylintrc`): `pylint --rcfile {{path/to/pylintrc}} {{path/to/file.py}}` diff --git a/tldr/virt-qemu-run b/tldr/virt-qemu-run new file mode 100644 index 00000000..ff225679 --- /dev/null +++ b/tldr/virt-qemu-run @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# virt-qemu-run + +> Experimental tool to run a QEMU Guest VM independent of `libvirtd`. +> More information: . + +- Run a QEMU virtual machine: + +`virt-qemu-run {{path/to/guest.xml}}` + +- Run a QEMU virtual machine and store the state in a specific directory: + +`virt-qemu-run --root={{path/to/directory}} {{path/to/guest.xml}}` + +- Run a QEMU virtual machine and display verbose information about the startup: + +`virt-qemu-run --verbose {{path/to/guest.xml}}` + +- Display help: + +`virt-qemu-run --help`