diff --git a/tldr/adb-forward b/tldr/adb-forward index 5ac9c49b..e88bc235 100644 --- a/tldr/adb-forward +++ b/tldr/adb-forward @@ -5,13 +5,17 @@ source: https://github.com/tldr-pages/tldr.git --- # adb forward -> Connect to an Android device wirelessly. +> Forward socket connections to a connected Android device or emulator. > More information: . -- Forward a TCP port: +- Forward a TCP port to the only connected emulator or device: `adb forward tcp:{{local_port}} tcp:{{remote_port}}` +- Forward a TCP port to a specific emulator or device (by device ID / [s]erial number): + +`adb -s {{device_ID}} forward tcp:{{local_port}} tcp:{{remote_port}}` + - List all forwardings: `adb forward --list` diff --git a/tldr/adb-reverse b/tldr/adb-reverse index 339ca442..604bc64f 100644 --- a/tldr/adb-reverse +++ b/tldr/adb-reverse @@ -12,10 +12,14 @@ source: https://github.com/tldr-pages/tldr.git `adb reverse --list` -- Reverse a TCP port from an emulator or device to localhost: +- Reverse a TCP port from the only connected emulator or device to localhost: `adb reverse tcp:{{remote_port}} tcp:{{local_port}}` +- Reverse a TCP port from a specific emulator or device (by device ID / [s]erial number) to localhost: + +`adb -s {{device_ID}} adb reverse tcp:{{remote_port}} tcp:{{local_port}}` + - Remove a reverse socket connections from an emulator or device: `adb reverse --remove tcp:{{remote_port}}` diff --git a/tldr/gh-repo b/tldr/gh-repo index 0485f958..bdbe541f 100644 --- a/tldr/gh-repo +++ b/tldr/gh-repo @@ -8,9 +8,9 @@ source: https://github.com/tldr-pages/tldr.git > Work with GitHub repositories. > More information: . -- Create a new repository (if the repository name is not set, the default name will be the name of the current directory): +- Create a new repository interactively: -`gh repo {{[new|create]}} {{name}}` +`gh repo {{[new|create]}}` - Clone a repository: diff --git a/tldr/gh-repo-create b/tldr/gh-repo-create index d3ccbbdf..7b64e12b 100644 --- a/tldr/gh-repo-create +++ b/tldr/gh-repo-create @@ -6,24 +6,25 @@ source: https://github.com/tldr-pages/tldr.git # gh repo create > Create a new GitHub repository. +> Note: `--public`, `--private`, or `--internal` is required when not running interactively. > More information: . - Create a new repository interactively: `gh repo {{[new|create]}}` -- Create a new repository with a specified name and description: - -`gh repo {{[new|create]}} {{repo_name}} {{[-d|--description]}} "{{repo_description}}"` - - Create a private repository from the current directory: `gh repo {{[new|create]}} {{[-s|--source]}} . --private` -- Clone the new repository locally after creation: - -`gh repo {{[new|create]}} {{repo_name}} {{[-c|--clone]}}` - -- Push the current directory to a new GitHub repository: +- Create a public repository from the current directory: `gh repo {{[new|create]}} {{[-s|--source]}} . --public` + +- Create a public repository with a specified name and description: + +`gh repo {{[new|create]}} {{repo_name}} {{[-d|--description]}} "{{repo_description}}" --public` + +- Clone the new repository locally after creation: + +`gh repo {{[new|create]}} {{repo_name}} {{[-c|--clone]}} {{--public|--private|--internal}}` diff --git a/tldr/htop b/tldr/htop index d2ec8f53..54bcf4fb 100644 --- a/tldr/htop +++ b/tldr/htop @@ -34,7 +34,7 @@ source: https://github.com/tldr-pages/tldr.git `htop --readonly` -- See interactive commands while running htop: +- See interactive commands while running `htop`: `{{|}}` diff --git a/tldr/linux/debootstrap b/tldr/linux/debootstrap index 4777fff6..7338abb4 100644 --- a/tldr/linux/debootstrap +++ b/tldr/linux/debootstrap @@ -16,9 +16,9 @@ source: https://github.com/tldr-pages/tldr.git `sudo debootstrap --variant=minbase stable {{path/to/debian-root}}/` -- Create an Ubuntu 20.04 system inside the `focal-root` directory with a local mirror: +- Create a Debian Unstable system inside the `sid-root` directory with a local mirror: -`sudo debootstrap focal {{path/to/focal-root}}/ {{file:///path/to/mirror/}}` +`sudo debootstrap sid {{path/to/sid-root}}/ {{file:///path/to/mirror/}}` - Switch to a bootstrapped system: diff --git a/tldr/linux/mhwd-gpu b/tldr/linux/mhwd-gpu new file mode 100644 index 00000000..05d8b27a --- /dev/null +++ b/tldr/linux/mhwd-gpu @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# mhwd-gpu + +> Configure graphics cards in Manjaro. +> More information: . + +- Show current Xorg configuration path: + +`mhwd-gpu --status` + +- Check if Xorg configuration has a valid symlink: + +`mhwd-gpu --check` + +- Set a custom Xorg configuration for an Nvidia GPU: + +`sudo mhwd-gpu --setmod nvidia --setxorg /{{path/to/nvidia.conf}}` + +- Set a custom Xorg configuration for an AMD GPU: + +`sudo mhwd-gpu --setmod {{catalyst|ati}} --setxorg /{{path/to/amdgpu.conf}}` + +- Display help: + +`mhwd-gpu --help` diff --git a/tldr/linux/tmt-try b/tldr/linux/tmt-try index 097e5362..f63c2940 100644 --- a/tldr/linux/tmt-try +++ b/tldr/linux/tmt-try @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Use a specific operating system: -`tmt try {{fedora-41}}` +`tmt try {{rhel-9}}` - Select both custom image and provision method: diff --git a/tldr/linux/toolbox-create b/tldr/linux/toolbox-create index 8d4d77d8..2d32b349 100644 --- a/tldr/linux/toolbox-create +++ b/tldr/linux/toolbox-create @@ -22,8 +22,8 @@ source: https://github.com/tldr-pages/tldr.git - Create a `toolbox` container from a custom Fedora image: -`toolbox create {{[-i|--image]}} {{registry.fedoraproject.org/fedora-toolbox:39}}` +`toolbox create {{[-i|--image]}} {{quay.io/fedora/fedora:tag}}` -- Create a `toolbox` container using the default image for Fedora 39: +- Create a `toolbox` container using the default image for a specific Fedora release: -`toolbox create {{[-d|--distro]}} {{fedora}} {{[-r|--release]}} {{f39}}` +`toolbox create {{[-d|--distro]}} {{fedora}} {{[-r|--release]}} f{{version}}` diff --git a/tldr/linux/toolbox-enter b/tldr/linux/toolbox-enter index 92644376..a18ef7c8 100644 --- a/tldr/linux/toolbox-enter +++ b/tldr/linux/toolbox-enter @@ -17,6 +17,6 @@ source: https://github.com/tldr-pages/tldr.git `toolbox enter {{[-r|--release]}} {{release}}` -- Enter a toolbox container using the default image for Fedora 39: +- Enter a toolbox container using the default image for a specific Fedora release: -`toolbox enter {{[-d|--distro]}} {{fedora}} {{[-r|--release]}} {{f39}}` +`toolbox enter {{[-d|--distro]}} {{fedora}} {{[-r|--release]}} f{{version}}` diff --git a/tldr/linux/toolbox-run b/tldr/linux/toolbox-run index f45ee175..7821faa1 100644 --- a/tldr/linux/toolbox-run +++ b/tldr/linux/toolbox-run @@ -17,6 +17,6 @@ source: https://github.com/tldr-pages/tldr.git `toolbox run {{[-d|--distro]}} {{distribution}} {{[-r|--release]}} {{release}} {{command}}` -- Run `emacs` inside a `toolbox` container using the default image for Fedora 39: +- Run `emacs` inside a `toolbox` container using the default image for a specific Fedora release: -`toolbox run {{[-d|--distro]}} {{fedora}} {{[-r|--release]}} {{f39}} {{emacs}}` +`toolbox run {{[-d|--distro]}} {{fedora}} {{[-r|--release]}} f{{version}} {{emacs}}` diff --git a/tldr/mvn-idea b/tldr/mvn-idea new file mode 100644 index 00000000..ac5520f5 --- /dev/null +++ b/tldr/mvn-idea @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# mvn idea + +> Generate IntelliJ IDEA project files (`.ipr`, `.iml`, and `.iws`) for a Maven project. +> Note: This plugin is retired. It is no longer maintained. +> More information: . + +- Generate all IntelliJ IDEA project files: + +`mvn idea:idea` + +- Generate only the project (`.ipr`) file: + +`mvn idea:project` + +- Generate only the workspace (`.iws`) file: + +`mvn idea:workspace` + +- Generate only module (`.iml`) files: + +`mvn idea:module` + +- Delete all generated project files: + +`mvn idea:clean` diff --git a/tldr/netbsd/chpass b/tldr/netbsd/chpass index c422366c..29d979dd 100644 --- a/tldr/netbsd/chpass +++ b/tldr/netbsd/chpass @@ -23,7 +23,7 @@ source: https://github.com/tldr-pages/tldr.git - Specify a user database entry in the `passwd` file format: -`su -c 'chpass -a {{username:encrypted_password:uid:gid:...}} -s {{path/to/file}}' {{username}}` +`su -c 'chpass -a {{username:encrypted_password:uid:gid:...}} -s {{path/to/shell}}' {{username}}` - Only update the [l]ocal password file: diff --git a/tldr/npm-repo b/tldr/npm-repo new file mode 100644 index 00000000..4a7e79cc --- /dev/null +++ b/tldr/npm-repo @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# npm repo + +> Open the repository page of a package in the browser. +> More information: . + +- Open the repository page of the current project (based on `package.json`): + +`npm repo` + +- Open the repository page of a specific package from the registry: + +`npm repo {{package_name}}` + +- Open repository pages for multiple packages: + +`npm repo {{package_name1 package_name2 ...}}` + +- Print the repository URL instead of opening it in the browser: + +`npm repo --browser false` + +- Open the repository page for a package in a specific browser: + +`npm repo --browser {{browser_name}}` + +- Open the repository page of a package in a specific workspace: + +`npm repo --workspace {{workspace_name}}` diff --git a/tldr/oauth2c b/tldr/oauth2c new file mode 100644 index 00000000..c8531d1c --- /dev/null +++ b/tldr/oauth2c @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# oauth2c + +> Interact with OAuth 2.0 authorization servers. +> More information: . + +- Fetch an access token using client credentials: + +`oauth2c {{issuer_url}} --client-id {{client_id}} --client-secret {{client_secret}}` + +- Fetch a token using authorization code flow: + +`oauth2c {{issuer_url}} --client-id {{client_id}} --response-types code` + +- Fetch a token using authorization code with PKCE: + +`oauth2c {{issuer_url}} --client-id {{client_id}} --pkce` + +- Fetch a token using password credentials: + +`oauth2c {{issuer_url}} --client-id {{client_id}} --username {{username}} --password {{password}}` + +- Refresh an existing access token: + +`oauth2c {{issuer_url}} --client-id {{client_id}} --refresh-token {{refresh_token}}` + +- Fetch a token with specific scopes: + +`oauth2c {{issuer_url}} --client-id {{client_id}} --scopes {{scope1,scope2}}` + +- Use device authorization flow: + +`oauth2c {{issuer_url}} --client-id {{client_id}} --grant-type device_code` + +- Run in silent mode without browser: + +`oauth2c {{issuer_url}} --client-id {{client_id}} {{[-s|--silent]}} --no-browser` diff --git a/tldr/poetry-build b/tldr/poetry-build new file mode 100644 index 00000000..37f6dbaf --- /dev/null +++ b/tldr/poetry-build @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# poetry build + +> Build a Poetry package as a tarball and a wheel. +> More information: . + +- Build a tarball and a wheel for the project: + +`poetry build` + +- Build a wheel package: + +`poetry build {{[-f|--format]}} wheel` + +- Build a source distribution (sdist): + +`poetry build {{[-f|--format]}} sdist` + +- Clean the output directory before building: + +`poetry build --clean` + +- Set the output directory: + +`poetry build {{[-o|--output]}} {{path/to/directory}}` diff --git a/tldr/qemu-system-i386 b/tldr/qemu-system-i386 index 238cb573..7f73eb68 100644 --- a/tldr/qemu-system-i386 +++ b/tldr/qemu-system-i386 @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Boot a QEMU instance from a live ISO image: -`qemu-system-i386 -hda {{image_name.img}} -cdrom {{os_image.iso}} -boot d -m {{4096}}` +`qemu-system-i386 -hda {{image_name.img}} -m {{4096}} -cdrom {{os_image.iso}} -boot d` - Boot from a physical device (e.g. from USB to test a bootable medium): diff --git a/tldr/qemu-system-x86_64 b/tldr/qemu-system-x86_64 index 34ac4c0e..39207074 100644 --- a/tldr/qemu-system-x86_64 +++ b/tldr/qemu-system-x86_64 @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Boot a QEMU instance from a live ISO image: -`qemu-system-x86_64 -hda {{image_name.img}} -cdrom {{os_image.iso}} -boot d -m {{4096}}` +`qemu-system-x86_64 -hda {{image_name.img}} -m {{4096}} -cdrom {{os_image.iso}} -boot d` - Boot from a physical device (e.g. from USB to test a bootable medium): diff --git a/tldr/vagrant-global-status b/tldr/vagrant-global-status new file mode 100644 index 00000000..74f6c10f --- /dev/null +++ b/tldr/vagrant-global-status @@ -0,0 +1,19 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# vagrant global-status + +> Display the state of all Vagrant machines on the system. +> The info is based on a cache, which may become stale and require pruning. +> See also: `vagrant`, `vagrant status`. +> More information: . + +- Display the state of all machines: + +`vagrant global-status` + +- Prune any stale entries from the output: + +`vagrant global-status --prune` diff --git a/tldr/vagrant-port b/tldr/vagrant-port new file mode 100644 index 00000000..ef678338 --- /dev/null +++ b/tldr/vagrant-port @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# vagrant port + +> List mappings between guest and host ports. +> See also: `vagrant`. +> More information: . + +- List all port mappings of machine(s) running in the current directory: + +`vagrant port` + +- List mappings for a specific machine (if `Vagrantfile` is multi-machine): + +`vagrant port {{machine_name}}` + +- Display info for a specific guest port: + +`vagrant port --guest {{port_number}}` + +- Display machine-readable output: + +`vagrant port --machine-readable` diff --git a/tldr/vagrant-ssh b/tldr/vagrant-ssh new file mode 100644 index 00000000..20f6de50 --- /dev/null +++ b/tldr/vagrant-ssh @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# vagrant ssh + +> SSH into a running Vagrant machine. +> See also: `vagrant`. +> More information: . + +- SSH into the machine running in the current directory: + +`vagrant ssh` + +- Target a running machine by name or ID: + +`vagrant ssh {{name|id}}` + +- Execute an SSH command and exit: + +`vagrant ssh {{[-c|--command]}} {{ssh_command}}` + +- SSH without authentication, leaving authentication up to the user: + +`vagrant ssh {{[-p|--plain]}}` diff --git a/tldr/vagrant-status b/tldr/vagrant-status index e31251a8..7a94ed58 100644 --- a/tldr/vagrant-status +++ b/tldr/vagrant-status @@ -5,11 +5,11 @@ source: https://github.com/tldr-pages/tldr.git --- # vagrant status -> Display the state of the machines Vagrant is managing. -> See also: `vagrant`. +> Display the state of machines in the current Vagrant environment. +> See also: `vagrant`, `vagrant global-status`. > More information: . -- View status of the currently running machine/s: +- View status of the machines in the current directory: `vagrant status` diff --git a/tldr/vagrant-upload b/tldr/vagrant-upload new file mode 100644 index 00000000..c2fcce5d --- /dev/null +++ b/tldr/vagrant-upload @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# vagrant upload + +> Upload files and directories from the host to the guest machine. +> More information: . + +- Upload file or directory from the host to the guest machine: + +`vagrant upload {{path/to/source_file_or_directory}} {{path/to/destination_file_or_directory}} {{name|id}}` + +- Compress the file or directory before uploading to guest machine: + +`vagrant upload --compress {{path/to/source_file_or_directory}} {{path/to/destination_file_or_directory}} {{name|id}}` + +- Specify which type of compression to use. Default type is `zip`: + +`vagrant upload --compression-type {{tgz|zip}} {{path/to/source_file_or_directory}} {{path/to/destination_file_or_directory}} {{name|id}}` + +- Create a temporary location on the guest machine and upload files to that location: + +`vagrant upload --temporary {{path/to/source_file_or_directory}} {{path/to/destination_file_or_directory}} {{name|id}}` diff --git a/tldr/vagrant-version b/tldr/vagrant-version new file mode 100644 index 00000000..bd471efb --- /dev/null +++ b/tldr/vagrant-version @@ -0,0 +1,18 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# vagrant version + +> Display Vagrant version information. +> Note: Internet access is required for vagrant version to check the latest available version. +> More information: . + +- Display the currently installed version and latest version of Vagrant that is currently available: + +`vagrant version` + +- Display version: + +`vagrant --version` diff --git a/tldr/windows/chromium b/tldr/windows/chromium index 74ddc552..d2c42a05 100644 --- a/tldr/windows/chromium +++ b/tldr/windows/chromium @@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git - Open a specific URL or file: -`chromium {{https://example.com|path/to/file.html}}` +`chromium {{https://example.com|path o ile.html}}` - Open in incognito mode (use `--inprivate` for Microsoft Edge): @@ -31,11 +31,11 @@ source: https://github.com/tldr-pages/tldr.git - Open with a custom profile directory: -`chromium --user-data-dir {{path/to/directory}}` +`chromium --user-data-dir {{path o\directory}}` - Open without CORS validation (useful to test an API): -`chromium --user-data-dir {{path/to/directory}} --disable-web-security` +`chromium --user-data-dir {{path o\directory}} --disable-web-security` - Open with a DevTools window for each tab opened: diff --git a/tldr/windows/msedge b/tldr/windows/msedge index b5419c38..e3ff4fb8 100644 --- a/tldr/windows/msedge +++ b/tldr/windows/msedge @@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git - Open a specific URL or file: -`msedge {{https://example.com|path/to/file.html}}` +`msedge {{https://example.com|path o ile.html}}` - Open in InPrivate mode: @@ -32,11 +32,11 @@ source: https://github.com/tldr-pages/tldr.git - Open with a custom profile directory: -`msedge --user-data-dir {{path/to/directory}}` +`msedge --user-data-dir {{path o\directory}}` - Open without CORS validation (useful to test an API): -`msedge --user-data-dir {{path/to/directory}} --disable-web-security` +`msedge --user-data-dir {{path o\directory}} --disable-web-security` - Open with a DevTools window for each tab opened: diff --git a/tldr/windows/scb b/tldr/windows/scb new file mode 100644 index 00000000..308673f8 --- /dev/null +++ b/tldr/windows/scb @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, windows] +source: https://github.com/tldr-pages/tldr.git +--- +# scb + +> This command is an alias of `Set-Clipboard`. + +- View documentation: + +`tldr Set-Clipboard` diff --git a/tldr/windows/set-clipboard b/tldr/windows/set-clipboard new file mode 100644 index 00000000..b3a397c8 --- /dev/null +++ b/tldr/windows/set-clipboard @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, windows] +source: https://github.com/tldr-pages/tldr.git +--- +# Set-Clipboard + +> Powershell command to set content to clipboard. +> Note: `scb` can be used as an alias for `Set-Clipboard`. +> More information: . + +- Copy text to the clipboard: + +`Set-Clipboard -Value "{{text}}"` + +- Copy multiple texts to clipboard separated by new line: + +`Set-Clipboard -Value @("{{text 1}}", "{{text 2}}", "{{text 3}}")` + +- Copy files or directories to clipboard: + +`Set-Clipboard -Path "{{path/to/files_or_directories}}"` + +- Copy multiple files: + +`Set-Clipboard -Path "{{path/to/file1}}","{{path/to/file2}}","{{path/to/file3}}"` + +- To clear the clipboard: + +`Set-Clipboard ""`