From fd7ebaa72dbe226ff5e4759c0ecbac506e008469 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sun, 3 Nov 2024 00:19:03 +0000 Subject: [PATCH] Update cheatsheets --- tldr/bdfr | 33 +++++++++++++++++++++++++++++++++ tldr/npm-root | 17 +++++++++++++++++ tldr/npm-star | 41 +++++++++++++++++++++++++++++++++++++++++ tldr/npm-unstar | 33 +++++++++++++++++++++++++++++++++ tldr/npm-whoami | 17 +++++++++++++++++ tldr/nxc-vnc | 4 ++-- tldr/pbmtextps | 4 ++-- tldr/pbmtoepsi | 2 +- tldr/qemu | 2 +- tldr/tar | 2 +- 10 files changed, 148 insertions(+), 7 deletions(-) create mode 100644 tldr/bdfr create mode 100644 tldr/npm-root create mode 100644 tldr/npm-star create mode 100644 tldr/npm-unstar create mode 100644 tldr/npm-whoami diff --git a/tldr/bdfr b/tldr/bdfr new file mode 100644 index 00000000..a944937d --- /dev/null +++ b/tldr/bdfr @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# bdfr + +> Bulk downloader for Reddit. +> More information: . + +- Download videos/images from the specified [l]inks to URL or ID's of posts: + +`bdfr download {{path/to/output_directory}} -l {{post_url}}` + +- Download the maximum possible number (roughly 1000) of videos/images from a specified [u]ser: + +`bdfr download {{path/to/output_directory}} -u {{reddit_user}} --submitted` + +- Download submission data (text, upvotes, comments, etc.) [L]imited to 10 submissions for each [s]ubreddit (30 total): + +`bdfr archive {{path/to/output_directory}} -s '{{Python, all, mindustry}}' -L 10` + +- Download videos/images from the [s]ubreddit r/Python [S]orted by top (default is hot) using [t]ime filter all, [L]imited to 10 submissions: + +`bdfr download {{path/to/output_directory}} -s Python -S top -t all -L 10` + +- Download the maximum possible number of both submission data and videos/images from [s]ubreddit r/Python skipping over submissions with mp4 or gif file extensions and creating hard links for duplicate files: + +`bdfr clone {{path/to/output_directory}} -s Python --skip mp4 --skip gif --make-hard-links` + +- Download saved posts of the authenticated user, naming each file according to a specified format. Avoid downloading duplicates and posts already present in the output directory: + +`bdfr download {{path/to/output_directory}} --user me --saved --authenticate --file-scheme '{{ {POSTID}_{TITLE}_{UPVOTES} }}' --no-dupes --search-existing` diff --git a/tldr/npm-root b/tldr/npm-root new file mode 100644 index 00000000..ce4d2af4 --- /dev/null +++ b/tldr/npm-root @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# npm root + +> Display path to `node_modules` directory. +> More information: . + +- Display path to the local `node_modules` directory: + +`npm root` + +- Display path to the global `node_modules` directory: + +`npm root --global` diff --git a/tldr/npm-star b/tldr/npm-star new file mode 100644 index 00000000..d4db3973 --- /dev/null +++ b/tldr/npm-star @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# npm star + +> Mark a package as favorite. +> More information: . + +- Star a public package from the default registry: + +`npm star {{package_name}}` + +- Star a package within a specific scope: + +`npm star @{{scope}}/{{package_name}}` + +- Star a package from a specific registry: + +`npm star {{package_name}} --registry={{registry_url}}` + +- Star a private package that requires authentication: + +`npm star {{package_name}} --auth-type={{legacy|oauth|web|saml}}` + +- Star a package by providing an OTP for two-factor authentication: + +`npm star {{package_name}} --otp={{otp}}` + +- Star a package with detailed logging: + +`npm star {{package_name}} --loglevel=verbose` + +- List all your starred packages: + +`npm star --list` + +- List your starred packages from a specific registry: + +`npm star --list --registry={{registry_url}}` diff --git a/tldr/npm-unstar b/tldr/npm-unstar new file mode 100644 index 00000000..bbdbecde --- /dev/null +++ b/tldr/npm-unstar @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# npm unstar + +> Remove the favorite/star mark from a package. +> More information: . + +- Unstar a public package from the default registry: + +`npm unstar {{package_name}}` + +- Unstar a package within a specific scope: + +`npm unstar @{{scope}}/{{package_name}}` + +- Unstar a package from a specific registry: + +`npm unstar {{package_name}} --registry={{registry_url}}` + +- Unstar a private package that requires authentication: + +`npm unstar {{package_name}} --auth-type={{legacy|oauth|web|saml}}` + +- Unstar a package by providing an OTP for two-factor authentication: + +`npm unstar {{package_name}} --otp={{otp}}` + +- Unstar a package with a specific logging level: + +`npm unstar {{package_name}} --loglevel={{silent|error|warn|notice|http|timing|info|verbose|silly}}` diff --git a/tldr/npm-whoami b/tldr/npm-whoami new file mode 100644 index 00000000..2f9954a4 --- /dev/null +++ b/tldr/npm-whoami @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# npm whoami + +> Display npm username. +> More information: . + +- Display username of the currently logged-in user: + +`npm whoami` + +- Display username of the current user in the specific registry: + +`npm whoami --registry={{registry_url}}` diff --git a/tldr/nxc-vnc b/tldr/nxc-vnc index eb833356..ffc1bc3b 100644 --- a/tldr/nxc-vnc +++ b/tldr/nxc-vnc @@ -14,8 +14,8 @@ source: https://github.com/tldr-pages/tldr.git - Avoid rate limiting through VNC-sleep: -`nxc vnc {{192.168.178.2}} -u {{{path/to/usernames.txt}}} -p {{path/to/passwords.txt}} --vnc-sleep {{10}}` +`nxc vnc {{192.168.178.2}} -u {{path/to/usernames.txt}} -p {{path/to/passwords.txt}} --vnc-sleep {{10}}` - Take a screenshot on the remote system after waiting the specified amount of time: -`nxc vnc {{192.168.178.2}} -u {{{username}}} -p {{password}} --screenshot --screentime {{10}}` +`nxc vnc {{192.168.178.2}} -u {{username}} -p {{password}} --screenshot --screentime {{10}}` diff --git a/tldr/pbmtextps b/tldr/pbmtextps index 614f31ed..3b035eae 100644 --- a/tldr/pbmtextps +++ b/tldr/pbmtextps @@ -15,11 +15,11 @@ source: https://github.com/tldr-pages/tldr.git - Specify the font and font size: -`pbmtextps -font {{Times-Roman}} -fontsize {{30}} "{{Hello World!}}" > {{path/to/output.pbm}}` +`pbmtextps -font {{Times-Roman}} -fontsize {{30}} "{{Hello World!}}" > {{path/to/output.pbm}}` - Specify the desired left and top margins: -`pbmtextps -leftmargin {{70}} -topmargin {{162}} "{{Hello World!}}" > {{path/to/output.pbm}}` +`pbmtextps -leftmargin {{70}} -topmargin {{162}} "{{Hello World!}}" > {{path/to/output.pbm}}` - Do not output the rendered text as a PBM image, but a PostScript program that would create this image: diff --git a/tldr/pbmtoepsi b/tldr/pbmtoepsi index 9e84f332..1ff9684b 100644 --- a/tldr/pbmtoepsi +++ b/tldr/pbmtoepsi @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Produce a quadratic output image with the specified resolution: -`pbmtoepsi -dpi {{144}} {path/to/image.pbm}} > {{path/to/output.bmp}}` +`pbmtoepsi -dpi {{144}} {{path/to/image.pbm}} > {{path/to/output.bmp}}` - Produce an output image with the specified horizontal and vertical resolution: diff --git a/tldr/qemu b/tldr/qemu index 80319f5e..5e4e7816 100644 --- a/tldr/qemu +++ b/tldr/qemu @@ -23,7 +23,7 @@ source: https://github.com/tldr-pages/tldr.git - Specify amount of RAM for instance: -`qemu-system-i386 -m 256 -hda image_name.img -cdrom os-image.iso -boot d` +`qemu-system-i386 -m 256 -hda {{image_name.img}} -cdrom {{os-image.iso}} -boot d` - Boot from physical device (e.g. from USB to test bootable medium): diff --git a/tldr/tar b/tldr/tar index ac76e23c..7e645044 100644 --- a/tldr/tar +++ b/tldr/tar @@ -17,7 +17,7 @@ source: https://github.com/tldr-pages/tldr.git `tar czf {{path/to/target.tar.gz}} {{path/to/file1 path/to/file2 ...}}` -- [c]reate a g[z]ipped archive from a directory using relative paths: +- [c]reate a g[z]ipped (compressed) archive from a directory using relative paths: `tar czf {{path/to/target.tar.gz}} --directory={{path/to/directory}} .`