instruction
stringlengths
1
659
input
stringclasses
1 value
output
stringlengths
1
532
Create a new Scala project from an existing Giter8 template hosted on GitHub
sbt new scala/hello-world.g8
Compile and run all tests
sbt test
Delete all generated files in the `target` directory
sbt clean
Compile the main sources in `src/main/scala` and `src/main/java` directories
sbt compile
Use the specified version of sbt
sbt -sbt-version version
Use a specific jar file as the sbt launcher
sbt -sbt-jar path
List all sbt options
sbt -h
Generate the autocompletion script for your shell
gcrane completion shell_name
Disable completion descriptions
gcrane completion shell_name --no-descriptions
Load completions in your current shell session (bash/zsh)
source <(gcrane completion bash/zsh)>
Load completions in your current shell session (fish)
gcrane completion fish | source
Load completions for every new session (bash)
gcrane completion bash > /etc/bash_completion.d/gcrane
Load completions for every new session (zsh)
gcrane completion zsh > "${fpath[1]}/_gcrane"
Load completions for every new session (fish)
gcrane completion fish > ~/.config/fish/completions/gcrane.fish
Display help
gcrane completion shell_name -h|--help
Print lines of code in the current directory
loc
Print lines of code in the target directory
loc path/to/directory
Print lines of code with stats for individual files
loc --files
Print lines of code without .gitignore (etc.) files (e.g. two -u flags will additionally count hidden files and dirs)
loc -u
Start an access point
sudo hostapd path/to/hostapd.conf
Start an access point, forking into the background
sudo hostapd -B path/to/hostapd.conf
Automatically detect and remove the margin for each page in a PDF file
pdfcrop path/to/input_file.pdf path/to/output_file.pdf
Set the margins of each page to a specific value
pdfcrop path/to/input_file.pdf --margins 'left top right bottom' path/to/output_file.pdf
Set the margins of each page to a specific value, using the same value for left, top, right and bottom
pdfcrop path/to/input_file.pdf --margins 300 path/to/output_file.pdf
Use a user-defined bounding box for cropping instead of automatically detecting it
pdfcrop path/to/input_file.pdf --bbox 'left top right bottom' path/to/output_file.pdf
Use different user-defined bounding boxes for odd and even pages
pdfcrop path/to/input_file.pdf --bbox-odd 'left top right bottom' --bbox-even 'left top right bottom' path/to/output_file.pdf
Automatically detect margins using a lower resolution for improved performance
pdfcrop path/to/input_file.pdf --resolution 72 path/to/output_file.pdf
Run maintenance on each of a list of repositories stored in the `maintenance.repo` user configuration variable
git for-each-repo --config=maintenance.repo maintenance run
Run `git pull` on each repository listed in a global configuration variable
git for-each-repo --config=global_configuration_variable pull
Cut a file
xcv x input_file
Copy a file
xcv c input_file
Paste a file
xcv v output_file
List files available for pasting
xcv l
Change the line endings of a file
unix2dos path/to/file
Create a copy with DOS-style line endings
unix2dos -n|--newfile path/to/file path/to/new_file
Display file information
unix2dos -i|--info path/to/file
Keep/add/remove Byte Order Mark
unix2dos --keep-bom|add-bom|remove-bom path/to/file
Get an IP address for the `eth0` interface
sudo dhclient eth0
Release an IP address for the `eth0` interface
sudo dhclient -r eth0
Convert tldr-pages files and save into the same directories
md-to-clip path/to/page1.md path/to/page2.md ...
Convert tldr-pages files and save into a specific directory
md-to-clip --output-directory path/to/directory path/to/page1.md path/to/page2.md ...
Convert a tldr-page file to `stdout`
md-to-clip --no-file-save <(echo 'page-content')
Convert tldr-pages files while recognizing additional placeholders from a specific config
md-to-clip --special-placeholder-config path/to/config.yaml path/to/page1.md path/to/page2.md ...
Display help
md-to-clip --help
Display version
md-to-clip --version
Connect to a local database on the default port (`mongodb://localhost:27017`)
mongo
Connect to a database
mongo --host host --port port db_name
Authenticate using the specified username on the specified database (you will be prompted for a password)
mongo --host host --port port --username username --authenticationDatabase authdb_name db_name
Evaluate a JavaScript expression on a database
mongo --eval 'JSON.stringify(db.foo.findOne())' db_name
Show why a Yarn package is installed
yarn-why package
Compile a PDF document
xetex source.tex
Compile a PDF document, specifying an output directory
xetex -output-directory=path/to/directory source.tex
Compile a PDF document, exiting if errors occur
xetex -halt-on-error source.tex
Process macros in a file
m4 path/to/file
Define a macro before processing files
m4 -Dmacro_name=macro_value path/to/file
Decode an APK file
apktool d path/to/file.apk
Build an APK file from a directory
apktool b path/to/directory
Install and store a framework
apktool if path/to/framework.apk
View documentation for the original command
tldr dnf config-manager
Access your account
b2 authorize_account key_id
List the existing buckets in your account
b2 list_buckets
Create a bucket, provide the bucket name, and access type (e.g. allPublic or allPrivate)
b2 create_bucket bucket_name allPublic|allPrivate
Upload a file. Choose a file, bucket, and a folder
b2 upload_file bucket_name path/to/file folder_name
Upload a source directory to a Backblaze B2 bucket destination
b2 sync path/to/source_file bucket_name
Copy a file from one bucket to another bucket
b2 copy-file-by-id path/to/source_file_id destination_bucket_name path/to/b2_file
Show the files in your bucket
b2 ls bucket_name
Remove a "folder" or a set of files matching a pattern
b2 rm path/to/folder|pattern
Map all greyscale values of the input image to all colors between the two specified colors
pgmtoppm -black red --white blue path/to/input.pgm > path/to/output.ppm
Map all greyscale values of the input image to colors according to the specified colormap
pgmtoppm -map path/to/colormap.ppm path/to/input.pgm > path/to/output.ppm
Enable ufw
ufw enable
Disable ufw
ufw disable
Show ufw rules, along with their numbers
ufw status numbered
Allow incoming traffic on port 5432 on this host with a comment identifying the service
ufw allow 5432 comment "Service"
Allow only TCP traffic from 192.168.0.4 to any address on this host, on port 22
ufw allow proto tcp from 192.168.0.4 to any port 22
Deny traffic on port 80 on this host
ufw deny 80
Deny all UDP traffic to ports in range 8412:8500
ufw deny proto udp from any to any port 8412:8500
Delete a particular rule. The rule number can be retrieved from the `ufw status numbered` command
ufw delete rule_number
Connect to a serial console
az serial-console connect --resource-group Resource_Group_Name --name Virtual_Machine_Name
Terminate the connection
<Ctrl>-]
Report only statistics that have a level of concern greater than 0
git sizer
Report all statistics
git sizer -v
See additional options
git sizer -h
Display signatures for specified device
sudo wipefs /dev/sdX
Wipe all available signature types for a specific device with no recursion into partitions
sudo wipefs --all /dev/sdX
Wipe all available signature types for the device and partitions using a glob pattern
sudo wipefs --all /dev/sdX*
Perform dry run
sudo wipefs --all --no-act /dev/sdX
Force wipe, even if the filesystem is mounted
sudo wipefs --all --force /dev/sdX
Open the specified mailbox
neomutt -f path/to/mailbox
Start writing an email and specify a subject and a `cc` recipient
neomutt -s "subject" -c [email protected] [email protected]
Send an email with files attached
neomutt -a path/to/file1 path/to/file2 ... -- [email protected]
Specify a file to include as the message body
neomutt -i path/to/file [email protected]
Specify a draft file containing the header and the body of the message, in RFC 5322 format
neomutt -H path/to/file [email protected]
Import a JSON file into a specific collection
mongoimport --file=path/to/file.json --uri=mongodb_uri --collection=collection_name
Import a CSV file, using the first line of the file to determine field names
mongoimport --type=csv --file=path/to/file.csv --db=database_name --collection=collection_name
Import a JSON array, using each element as a separate document
mongoimport --jsonArray --file=path/to/file.json
Import a JSON file using a specific mode and a query to match existing documents
mongoimport --file=path/to/file.json --mode=delete|merge|upsert --upsertFields="field1,field2,..."
Import a CSV file, reading field names from a separate CSV file and ignoring fields with empty values
mongoimport --type=csv --file=path/to/file.csv --fieldFile=path/to/field_file.csv --ignoreBlanks
Display help
mongoimport --help
Start an interactive shell session
zsh
Execute specific [c]ommands
zsh -c "echo Hello world"