neulab/tldr huggingface dataset:
# render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format
neato -T {{format}} -O {{path/to/input.gv}}
# render a `gif` image using stdin and stdout
echo "{{graph {this -- that} }}" | neato -T {{gif}} > {{path/to/image.gif}}
# display help
neato -?
# interactively create a pull request
gh pr create
# create a pull request, determining the title and description from the commit messages of the current branch
gh pr create --fill
# create a draft pull request
gh pr create --draft
# create a pull request specifying the base branch, title, and description
gh pr create --base {{base_branch}} --title "{{title}}" --body "{{body}}"
# start opening a pull request in the browser
gh pr create --web
# initialize a new local repository
git init
# initialize a repository with the specified name for the initial branch
git init --initial-branch={{branch_name}}
# initialize a repository using sha256 for object hashes (requires git version 2.29+)
git init --object-format={{sha256}}
# initialize a barebones repository, suitable for use as a remote over ssh
git init --bare
# start a new game
openttd -g
# load save game at start
openttd -g {{path/to/file}}
# start with the specified window resolution
openttd -r {{1920x1080}}
# start with a custom configuration file
openttd -c {{path/to/file}}
# start with selected video, sound, and music drivers
openttd -v {{video_driver}} -s {{sound_driver}} -m {{music_driver}}
# start a dedicated server, forked in the background
openttd -f -D {{host}}:{{port}}
# join a server with a password
openttd -n {{host}}:{{port}}#{{player_name}} -p {{password}}
# replace any commit with a different one, leaving other commits unchanged
git replace {{object}} {{replacement}}
# delete existing replace refs for the given objects
git replace --delete {{object}}
# edit an object’s content interactively
git replace --edit {{object}}
# start the gui
lmms
# start the gui and load external config
lmms --config {{path/to/config.xml}}
# start the gui and import midi or hydrogen file
lmms --import {{path/to/midi/or/hydrogen/file}}
# start the gui with a specified window size
lmms --geometry {{x_size}}x{{y_size}}+{{x_offset}}+{{y_offset}}
# dump a `.mmpz` file
lmms dump {{path/to/mmpz/file.mmpz}}
# render a project file
lmms render {{path/to/mmpz_or_mmp/file}}
# render the individual tracks of a project file
lmms rendertracks {{path/to/mmpz_or_mmp/file}} {{path/to/dump/directory}}
# render with custom samplerate, format, and as a loop
lmms render --samplerate {{88200}} --format {{ogg}} --loop --output {{path/to/output/file.ogg}}
# create a new secret from stdin
{{command}} | docker secret create {{secret_name}} -
# create a new secret from a file
docker secret create {{secret_name}} {{path/to/file}}
# list all secrets
docker secret ls
# display detailed information on one or multiple secrets in a human friendly format
docker secret inspect --pretty {{secret_name1 secret_name2 ...}}
# remove one or more secrets
docker secret rm {{secret_name1 secret_name2 ...}}
# list all installed packages
nix-env -q
# query installed packages
nix-env -q {{search_term}}
# query available packages
nix-env -qa {{search_term}}
# install package
nix-env -iA nixpkgs.{{pkg_name}}
# install a package from a url
nix-env -i {{pkg_name}} --file {{example.com}}
# uninstall package
nix-env -e {{pkg_name}}
# upgrade one package
nix-env -u {{pkg_name}}
# upgrade all packages
nix-env -u
# delay in seconds
sleep {{seconds}}
# delay in minutes
sleep {{minutes}}m
# delay in hours
sleep {{hours}}h
# traceroute to a host and continuously ping all intermediary hops
mtr {{host}}
# disable ip address and host name mapping
mtr -n {{host}}
# generate output after pinging each hop 10 times
mtr -w {{host}}
# force ip ipv4 or ipv6
mtr -4 {{host}}
# wait for a given time (in seconds) before sending another packet to the same hop
mtr -i {{seconds}} {{host}}
# initialise an .rspec config and a spec helper file
rspec --init
# run all tests
rspec
# run a specific directory of tests
rspec {{path/to/directory}}
# run a specific test file
rspec {{path/to/file}}
# run multiple test files
rspec {{path/to/file1}} {{path/to/file2}}
# run a specific test in a file (e.g. the test starts on line 83)
rspec {{path/to/file}}:{{83}}
# run specs with a specific seed
rspec --seed {{seed_number}}
# list the name, uuid, state, persistence type, autostart status, capacity, space allocated, and space available for the storage pool specified by name or uuid (determine using `virsh poollist`)
virsh pool-info --pool {{name|uuid}}
# execute commands from standard input in 5 minutes (press `ctrl + d` when done)
at now + 5 minutes
# execute a command from standard input at 1000 am today
echo "{{./make_db_backup.sh}}" | at 1000
# execute commands from a given file next tuesday
at -f {{path/to/file}} 9:30 PM Tue
# run checks over the code in the current directory
cargo clippy
# require that `cargo.lock` is up to date
cargo clippy --locked
# run checks on all packages in the workspace
cargo clippy --workspace
# run checks for a package
cargo clippy --package {{package}}
# treat warnings as errors
cargo clippy -- --deny warnings
# run checks and ignore warnings
cargo clippy -- --allow warnings
# apply clippy suggestions automatically
cargo clippy --fix
# display the system's architecture
arch
# launch the vim tutor using the given language (en, fr, de, ...)
vimtutor {{language}}
# exit the tutor
<Esc> :q <Enter>
# list currently running docker machines
docker-machine ls
# create a new docker machine with specific name
docker-machine create {{name}}
# get the status of a machine
docker-machine status {{name}}
# start a machine
docker-machine start {{name}}
# stop a machine
docker-machine stop {{name}}
# inspect information about a machine
docker-machine inspect {{name}}
# perform a command with different arguments
for argument in 1 2 3; do {{command $argument}}; done
# perform a command in every directory
for d in *; do (cd $d; {{command}}); done
# start fzf on all files in the specified directory
find {{path/to/directory}} -type f | fzf
# start fzf for running processes
ps aux | fzf
# select multiple files with `shift + tab` and write to a file
find {{path/to/directory}} -type f | fzf --multi > {{filename}}
# start fzf with a specified query
fzf --query "{{query}}"
# start fzf on entries that start with core and end with either go, rb, or py
fzf --query "^core go$ | rb$ | py$"
# start fzf on entries that not match pyc and match exactly travis
fzf --query "!pyc 'travis"
# view smart health summary
sudo smartctl --health {{/dev/sdX}}
# view device information
sudo smartctl --info {{/dev/sdX}}
# begin a short selftest
sudo smartctl --test short {{/dev/sdX}}
# view current/last selftest status and other smart capabilities
sudo smartctl --capabilities {{/dev/sdX}}
# view smart selftest log (if supported)
sudo smartctl --log selftest {{/dev/sdX}}
# add an article to the rss feed
sup {{path/to/file.html}}
# discover directories and files that match in the wordlist
gobuster dir --url {{https://example.com/}} --wordlist {{path/to/file}}
# discover subdomains
gobuster dns --domain {{example.com}} --wordlist {{path/to/file}}
# discover amazon s3 buckets
gobuster s3 --wordlist {{path/to/file}}
# discover other virtual hosts on the server
gobuster vhost --url {{https://example.com/}} --wordlist {{path/to/file}}
# fuzz the value of a parameter
gobuster fuzz --url {{https://example.com/?parameter=FUZZ}} --wordlist {{path/to/file}}
# fuzz the name of a parameter
gobuster fuzz --url {{https://example.com/?FUZZ=value}} --wordlist {{path/to/file}}
# create a tar archive from the contents of the current head and print it to standard output
git archive --verbose HEAD
# create a zip archive from the current head and print it to standard output
git archive --verbose --format=zip HEAD
# same as above, but write the zip archive to file
git archive --verbose --output={{path/to/file.zip}} HEAD
# create a tar archive from the contents of the latest commit on a specific branch
git archive --output={{path/to/file.tar}} {{branch_name}}
# create a tar archive from the contents of a specific directory
git archive --output={{path/to/file.tar}} HEAD:{{path/to/directory}}
# prepend a path to each file to archive it inside a specific directory
git archive --output={{path/to/file.tar}} --prefix={{path/to/prepend}}/ HEAD
# browse for both ssh and vnc servers
bshell
# browse for ssh servers only
bshell --ssh
# browse for vnc servers only
bshell --vnc
# browse for both ssh and vnc servers in a specified domain
bshell --domain={{domain}}
# calculate the md5 checksum for a file
md5sum {{path/to/file}}
# calculate md5 checksums for multiple files
md5sum {{path/to/file1}} {{path/to/filen2}}
# read a file of md5sums and verify all files have matching checksums
md5sum -c {{path/to/file.md5}}
# calculate a md5 checksum from the standard input
echo "{{text}}" | md5sum
# launch dillo
dillo
# launch dillo with a specific window size and screen location
dillo --geometry {{width}}x{{height}}+{{x_position}}+{{y_position}}
# launch dillo and open a specific url
dillo {{duckduckgo.com}}
# launch dillo and open a file or directory
dillo {{path/to/file_or_directory}}
# launch dillo in fullscreen mode
dillo --fullwindow
# display version
dillo --version
# display help
dillo --help
# convert an image from jpg to png
convert {{image.jpg}} {{image.png}}
# scale an image 50% its original size
convert {{image.png}} -resize 50% {{image2.png}}
# scale an image keeping the original aspect ratio to a maximum dimension of 640x480
convert {{image.png}} -resize 640x480 {{image2.png}}
# horizontally append images
convert {{image1.png}} {{image2.png}} {{image3.png}} +append {{image123.png}}
# vertically append images
convert {{image1.png}} {{image2.png}} {{image3.png}} -append {{image123.png}}
# create a gif from a series of images with 100ms delay between them
convert {{image1.png}} {{image2.png}} {{image3.png}} -delay {{10}} {{animation.gif}}
# create an image with nothing but a solid background
convert -size {{800x600}} "xc:{{#ff0000}}" {{image.png}}
# create a favicon from several images of different sizes
convert {{image1.png}} {{image2.png}} {{image3.png}} {{image.ico}}
# run a script
Rscript {{path/to/file.R}}
# run a script in vanilla mode (i.e. a blank session that doesn't save the workspace at the end)
Rscript --vanilla {{path/to/file.R}}
# execute one or more r expressions
Rscript -e {{expression1}} -e {{expression2}}
# display r version
Rscript --version
# find available packages
pip3 search {{package_name}}
# install a package
pip3 install {{package_name}}
# install a specific version of a package
pip3 install {{package_name}}=={{package_version}}
# upgrade a package
pip3 install --upgrade {{package_name}}
# uninstall a package
pip3 uninstall {{package_name}}
# save the list of installed packages to a file
pip3 freeze > {{requirements.txt}}
# install packages from a file
pip3 install --requirement {{requirements.txt}}
# show installed package info
pip3 show {{package_name}}
# show the system stats dashboard
gtop
# sort by cpu usage
c
# sort by memory usage
m
# append file content to the source file
cat {{path/to/file}} | sponge -a {{path/to/file}}
# remove all lines starting with # in a file
grep -v '^{{#}}' {{path/to/file}} | sponge {{path/to/file}}
# render all frames of an animation in the background, without loading the ui (output is saved to `/tmp`)
blender -b {{filename}}.blend -a
# render an animation using a specific image naming pattern, in a path relative (`//`) to the .blend file
blender -b {{filename}}.blend -o //{{render/frame_###.png}} -a
# render the 10th frame of an animation as a single image, saved to an existing directory (absolute path)
blender -b {{filename}}.blend -o {{/path/to/output_directory}} -f {{10}}
# render the second last frame in an animation as a jpeg image, saved to an existing directory (relative path)
blender -b {{filename}}.blend -o //{{output_directory}} -F {{JPEG}} -f {{-2}}
# render the animation of a specific scene, starting at frame 10 and ending at frame 500
blender -b {{filename}}.blend -S {{scene_name}} -s {{10}} -e {{500}} -a
# render an animation at a specific resolution, by passing a python expression
blender -b {{filename}}.blend --python-expr '{{import bpy; bpy.data.scenes[0].render.resolution_percentage = 25}}' -a
# start an interactive blender session in the terminal with a python console (do `import bpy` after starting)
blender -b --python-console
# create an empty temporary file and return the absolute path to it
mktemp
# create a temporary directory and return the absolute path to it
mktemp -d
# create a temporary file with a specified suffix
mktemp --suffix "{{.txt}}"
# pull from the "default" source path
hg pull
# pull from a specified source repository
hg pull {{path/to/source_repository}}
# update the local repository to the head of the remote
hg pull --update
# pull changes even when the remote repository is unrelated
hg pull --force
# specify a specific revision changeset to pull up to
hg pull --rev {{revision}}
# specify a specific branch to pull
hg pull --branch {{branch}}
# specify a specific bookmark to pull
hg pull --bookmark {{bookmark}}
# list all branches (local and remote; the current branch is highlighted by `*`)
git branch --all
# list which branches include a specific git commit in their history
git branch --all --contains {{commit_hash}}
# show the name of the current branch
git branch --show-current
# create new branch based on the current commit
git branch {{branch_name}}
# create new branch based on a specific commit
git branch {{branch_name}} {{commit_hash}}
# rename a branch (must not have it checked out to do this)
git branch -m {{old_branch_name}} {{new_branch_name}}
# delete a local branch (must not have it checked out to do this)
git branch -d {{branch_name}}
# delete a remote branch
git push {{remote_name}} --delete {{remote_branch_name}}
# start a repl (interactive shell)
irb
# execute a ruby script
ruby {{script.rb}}
# execute a single ruby command in the commandline
ruby -e {{command}}
# check for syntax errors on a given ruby script
ruby -c {{script.rb}}
# show the version of ruby you are using
ruby -v
# log in to a bitwarden user account
bw login
# log out of a bitwarden user account
bw logout
# search and display items from bitwarden vault
bw list items --search {{github}}
# display a particular item from bitwarden vault
bw get item {{github}}
# create a folder in bitwarden vault
{{echo -n '{"name":"My Folder1"}' | base64}} | bw create folder
# perform a highstate on this minion
salt-call state.highstate
# perform a highstate dryrun, compute all changes but don't actually perform them
salt-call state.highstate test=true
# perform a highstate with verbose debugging output
salt-call -l debug state.highstate
# list this minion's grains
salt-call grains.items
# abort a git rebase, merge, or cherrypick
git abort
# recursively archive all files in the current directory into a .jar file
jar cf {{file.jar}} *
# unzip .jar/.war file to the current directory
jar -xvf {{file.jar}}
# list a .jar/.war file content
jar tf {{path/to/file.jar}}
# list a .jar/.war file content with verbose output
jar tvf {{path/to/file.jar}}
# delete the configuration for the storage pool specified name or uuid (determine using `virsh poollist`)
virsh pool-undefine --pool {{name|uuid}}
# generate font cache files
fc-cache
# force a rebuild of all font cache files, without checking if cache is uptodate
fc-cache -f
# erase font cache files, then generate new font cache files
fc-cache -r
# print statistics about a bitcode file
llvm-bcanalyzer {{path/to/file.bc}}
# print an sgml representation and statistics about a bitcode file
llvm-bcanalyzer -dump {{path/to/file.bc}}
# read a bitcode file from `stdin` and analyze it
cat {{path/to/file.bc}} | llvm-bcanalyzer
# run python web app
gunicorn {{import.path:app_object}}
# listen on port 8080 on localhost
gunicorn --bind {{localhost}}:{{8080}} {{import.path:app_object}}
# turn on live reload
gunicorn --reload {{import.path:app_object}}
# use 4 worker processes for handling requests
gunicorn --workers {{4}} {{import.path:app_object}}
# use 4 worker threads for handling requests
gunicorn --threads {{4}} {{import.path:app_object}}
# run app over https
gunicorn --certfile {{cert.pem}} --keyfile {{key.pem}} {{import.path:app_object}}
# create a new project
gitlab create_project {{project_name}}
# get info about a specific commit
gitlab commit {{project_name}} {{commit_hash}}
# get info about jobs in a ci pipeline
gitlab pipeline_jobs {{project_name}} {{pipeline_id}}
# start a specific ci job
gitlab job_play {{project_name}} {{job_id}}
# display default information about a font
fc-pattern --default '{{DejaVu Serif}}'
# display config information about a font
fc-pattern --config '{{DejaVu Serif}}'
# list local docker images
docker image ls
# delete unused local docker images
docker image prune
# delete all unused images (not just those without a tag)
docker image prune --all
# show the history of a local docker image
docker image history {{image}}
# open vs code
code
# open the current directory in vs code
code .
# open a file or directory in vs code
code {{path/to/file_or_directory}}
# open a file or directory in the currently open vs code window
code --reuse-window {{path/to/file_or_directory}}
# compare two files in vs code
code -d {{file1}} {{file2}}
# open vs code with superuser (sudo) permissions
sudo code {{path/to/file_or_directory}} --user-data-dir
# list supported file formats
mat2 --list
# remove metadata from a file
mat2 {{path/to/file}}
# remove metadata from a file and print detailed output to the console
mat2 --verbose {{path/to/file}}
# show metadata in a file without removing it
mat2 --show {{path/to/file}}
# partially remove metadata from a file
mat2 --lightweight {{path/to/file}}
# generate scaffolding for a new project based on a template
lein new {{template_name}} {{project_name}}
# start a repl session either with the project or standalone
lein repl
# run the project's `main` function with optional args
lein run {{args}}
# run the project's tests
lein test
# package up the project files and all its dependencies into a jar file
lein uberjar
# add files to a changelist, creating the changelist if it does not exist
svn changelist {{changelist_name}} {{path/to/file1}} {{path/to/file2}}
# remove files from a changelist
svn changelist --remove {{path/to/file1}} {{path/to/file2}}
# remove the whole changelist at once
svn changelist --remove --recursive --changelist {{changelist_name}} .
# add the contents of a spaceseparated list of directories to a changelist
svn changelist --recursive {{changelist_name}} {{path/to/directory1}} {{path/to/directory2}}
# commit a changelist
svn commit --changelist {{changelist_name}}
# calculate the parent directory of a given path
dirname {{path/to/file_or_directory}}
# calculate the parent directory of multiple paths
dirname {{path/to/file_a}} {{path/to/directory_b}}
# delimit output with a nul character instead of a newline (useful when combining with `xargs`)
dirname --zero {{path/to/directory_a}} {{path/to/file_b}}
# build the storage pool specified by name or uuid (determine using `virsh poollist`)
virsh pool-build --pool {{name|uuid}}
# compile a source file
nim compile {{file.nim}}
# compile and run a source file
nim compile -r {{file.nim}}
# compile a source file with release optimizations enabled
nim compile -d:release {{file.nim}}
# build a release binary optimized for low file size
nim compile -d:release --opt:size {{file.nim}}
# generate html documentation for a module (output will be placed in the current directory)
nim doc {{file.nim}}
# interactively create a `composer.json` file
composer init
# add a package as a dependency for this project, adding it to `composer.json`
composer require {{user/package_name}}
# install all the dependencies in this project's `composer.json` and create `composer.lock`
composer install
# uninstall a package from this project, removing it as a dependency from `composer.json`
composer remove {{user/package_name}}
# update all the dependencies in this project's `composer.json` and note versions in `composer.lock` file
composer update
# update composer lock only after updating `composer.json` manually
composer update --lock
# learn more about why a dependency can't be installed
composer why-not {{user/package_name}}
# update composer to its latest version
composer self-update
# run in terminal
glances
# run in web server mode to show results in browser
glances -w
# run in server mode to allow connections from other glances clients
glances -s
# connect to a glances server
glances -c {{hostname}}
# require a password in (web) server mode
glances -s --password
# create a new encrypted vault file with a prompt for a password
ansible-vault create {{vault_file}}
# create a new encrypted vault file using a vault key file to encrypt it
ansible-vault create --vault-password-file={{password_file}} {{vault_file}}
# encrypt an existing file using an optional password file
ansible-vault encrypt --vault-password-file={{password_file}} {{vault_file}}
# encrypt a string using ansible's encrypted string format, displaying interactive prompts
ansible-vault encrypt_string
# view an encrypted file, using a password file to decrypt
ansible-vault view --vault-password-file={{password_file}} {{vault_file}}
# rekey already encrypted vault file with a new password file
ansible-vault rekey --vault-password-file={{old_password_file}} --new-vault-password-file={{new_password_file}} {{vault_file}}
# create a helm chart
helm create {{chart_name}}
# add a new helm repository
helm repo add {{repo_name}}
# list helm repositories
helm repo list
# update helm repositories
helm repo update
# delete a helm repository
helm repo remove {{repo_name}}
# install a helm chart
helm install {{repo_name}}/{{chart_name}}
# download helm chart as a tar archive
helm get {{chart_release_name}}
# update helm dependencies
helm dependency update
# clear the screen (equivalent to pressing controll in bash shell)
clear
# clear the screen but keep the terminal's scrollback buffer
clear -x
# indicate the type of terminal to clean (defaults to the value of the environment variable `term`)
clear -T {{type_of_terminal}}
# show the version of `ncurses` used by `clear`
clear -V
# inspect the headers of a file
xsv headers {{path/to/file.csv}}
# count the number of entries
xsv count {{path/to/file.csv}}
# get an overview of the shape of entries
xsv stats {{path/to/file.csv}} | xsv table
# select a few columns
xsv select {{column_a,column_b}} {{path/to/file.csv}}
# show 10 random entries
xsv sample {{10}} {{path/to/file.csv}}
# join a column from one file to another
xsv join --no-case {{column_a}} {{path/to/file/a.csv}} {{column_b}} {{path/to/file/b.csv}} | xsv table
# render a `png` image with a filename based on the input filename and output format (uppercase o)
fdp -T {{png}} -O {{path/to/input.gv}}
# render a `svg` image with the specified output filename (lowercase o)
fdp -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}
# render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format
fdp -T {{format}} -O {{path/to/input.gv}}
# render a `gif` image using stdin and stdout
echo "{{digraph {this -> that} }}" | fdp -T {{gif}} > {{path/to/image.gif}}
# display help
fdp -?
# produce three tabseparated columns lines only in first file, lines only in second file and common lines
comm {{file1}} {{file2}}
# print only lines common to both files
comm -12 {{file1}} {{file2}}
# print only lines common to both files, reading one file from stdin
cat {{file1}} | comm -12 - {{file2}}
# get lines only found in first file, saving the result to a third file
comm -23 {{file1}} {{file2}} > {{file1_only}}
# print lines only found in second file, when the files aren't sorted
comm -13 <(sort {{file1}}) <(sort {{file2}})
# convert a sam input file to bam stream and save to file
samtools view -S -b {{input.sam}} > {{output.bam}}
# take input from stdin () and print the sam header and any reads overlapping a specific region to stdout
{{other_command}} | samtools view -h - chromosome:start-end
# sort file and save to bam (the output format is automatically determined from the output file's extension)
samtools sort {{input}} -o {{output.bam}}
# index a sorted bam file (creates {{sorted_input.bam.bai}})
samtools index {{sorted_input.bam}}
# print alignment statistics about a file
samtools flagstat {{sorted_input}}
# count alignments to each index (chromosome / contig)
samtools idxstats {{sorted_indexed_input}}
# merge multiple files
samtools merge {{output}} {{input1 input2 …}}
# split input file according to read groups
samtools split {{merged_input}}
# compare 2 images
compare {{image1.png}} {{image2.png}} {{diff.png}}
# compare 2 images using a custom metric
compare -verbose -metric {{PSNR}} {{image1.png}} {{image2.png}} {{diff.png}}
# recursively find files matching the given pattern in the current directory
fd {{pattern}}
# find files that begin with "foo"
fd {{'^foo'}}
# find files with a specific extension
fd --extension {{txt}}
# find files in a specific directory
fd {{pattern}} {{path/to/directory}}
# include ignored and hidden files in the search
fd --hidden --no-ignore {{pattern}}
# execute a command on each search result returned
fd {{pattern}} --exec {{command}}
# rebuild with `make` if any file in any subdirectory changes
{{ag -l}} | entr {{make}}
# rebuild and test with `make` if any `.c` source files in the current directory change
{{ls *.c}} | entr {{'make && make test'}}
# send a `sigterm` to any previously spawned ruby subprocesses before executing `ruby main.rb`
{{ls *.rb}} | entr -r {{ruby main.rb}}
# run a command with the changed file (`/_`) as an argument
{{ls *.sql}} | entr {{psql -f}} /_
# print a file with the author name and commit hash prepended to each line
git annotate {{path/to/file}}
# print a file with the author email and commit hash prepended to each line
git annotate -e {{path/to/file}}
# monitor all occuring x events
xev
# monitor all x events of the root window instead of creating a new one
xev -root
# monitor all x events of a particular window
xev -id {{window_id}}
# monitor x events from a given category (can be specified multiple times)
xev -event {{event_category}}
# copy an existing file in a git repo, staying in the same directory
git cp {{file}} {{new_file}}
# copy an existing file in a git repo and place it elsewhere
git cp {{path/to/file}} {{path/to/new_file}}
# compile a source code file into an executable binary
clang {{input_source.c}} -o {{output_executable}}
# activate output of all errors and warnings
clang {{input_source.c}} -Wall -o {{output_executable}}
# include libraries located at a different path than the source file
clang {{input_source.c}} -o {{output_executable}} -I{{header_path}} -L{{library_path}} -l{{library_name}}
# compile source code into llvm intermediate representation (ir)
clang -S -emit-llvm {{file.c}} -o {{file.ll}}
# compile source code without linking
clang -c {{input_source.c}}
# search for remote gem(s) and show all available versions
gem search {{regular_expression}} --all
# install the latest version of a gem
gem install {{gemname}}
# install specific version of a gem
gem install {{gemname}} --version {{1.0.0}}
# install the latest matching (semver) version of a gem
gem install {{gemname}} --version '~> {{1.0}}'
# update a gem
gem update {{gemname}}
# list all local gems
gem list
# uninstall a gem
gem uninstall {{gemname}}
# uninstall specific version of a gem
gem uninstall {{gemname}} --version {{1.0.0}}
# render a `png` image with a filename based on the input filename and output format (uppercase o)
patchwork -T {{png}} -O {{path/to/input.gv}}
# render a `svg` image with the specified output filename (lowercase o)
patchwork -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}
# render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format
patchwork -T {{format}} -O {{path/to/input.gv}}
# render a `gif` image using stdin and stdout
echo "{{digraph {this -> that} }}" | patchwork -T {{gif}} > {{path/to/image.gif}}
# display help
patchwork -?
# build a docker image using the dockerfile in the current directory
docker build .
# build a docker image from a dockerfile at a specified url
docker build {{github.com/creack/docker-firefox}}
# build a docker image and tag it
docker build --tag {{name:tag}} .
# build a docker image with no build context
docker build --tag {{name:tag}} - < {{Dockerfile}}
# do not use the cache when building the image
docker build --no-cache --tag {{name:tag}} .
# build a docker image using a specific dockerfile
docker build --file {{Dockerfile}} .
# build with custom buildtime variables
docker build --build-arg {{HTTP_PROXY=http://10.20.30.2:1234}} --build-arg {{FTP_PROXY=http://40.50.60.5:4567}} .
# delete a tag
git delete-tag {{tag_version}}
# open a file
view {{file}}
# give a description of the type of the specified file. works fine for files with no file extension
file {{filename}}
# look inside a zipped file and determine the file type(s) inside
file -z {{foo.zip}}
# allow file to work with special or device files
file -s {{filename}}
# don't stop at first file type match; keep going until the end of the file
file -k {{filename}}
# determine the mime encoding type of a file
file -i {{filename}}
# list ebooks in the library with additional information
calibredb list
# search for ebooks displaying additional information
calibredb list --search {{search_term}}
# search for just ids of ebooks
calibredb search {{search_term}}
# add one or more ebooks to the library
calibredb add {{file1 file2 …}}
# recursively add all ebooks under a directory to the library
calibredb add -r {{path/to/directory}}
# remove one or more ebooks from the library. you need the ebook ids (see above)
calibredb remove {{id1 id2 …}}
# use a specific audio driver
musescore --audio-driver {{jack|alsa|portaudio|pulse}}
# set the mp3 output bitrate in kbit/s
musescore --bitrate {{bitrate}}
# start musescore in debug mode
musescore --debug
# enable experimental features, such as layers
musescore --experimental
# export the given file to the specified output file. the file type depends on the given extension
musescore --export-to {{output_file}} {{input_file}}
# print a diff between the given scores
musescore --diff {{path/to/file1}} {{path/to/file2}}
# specify a midi import operations file
musescore --midi-operations {{path/to/file}}
# list mail
from
# display the number of messages stored
from --count
# list mail in the specified mailbox directory
MAIL={{path/to/mailbox}} from
# print the mail from the specified address
from --sender={{me@example.com}}
# compile multiple source files into executable
gcc {{source1.c}} {{source2.c}} --output {{executable}}
# allow warnings, debug symbols in output
gcc {{source.c}} -Wall -Og --output {{executable}}
# include libraries from a different path
gcc {{source.c}} --output {{executable}} -I{{header_path}} -L{{library_path}} -l{{library_name}}
# compile source code into assembler instructions
gcc -S {{source.c}}
# compile source code without linking
gcc -c {{source.c}}
# display what git protocol is being used
gh config get git_protocol
# set protocol to ssh
gh config set git_protocol {{ssh}}
# use `delta` in sidebyside mode as the default pager for all `gh` commands
gh config set pager '{{delta --side-by-side}}'
# set text editor to vim
gh config set editor {{vim}}
# reset to default text editor
gh config set editor {{""}}
# disable interactive prompts
gh config set prompt {{disabled}}
# set a specific configuration value
gh config set {{key}} {{value}}
# return a successful exit code
true
# print the hexadecimal representation of a file
hexdump {{file}}
# display the input offset in hexadecimal and its ascii representation in two columns
hexdump -C {{file}}
# display the hexadecimal representation of a file, but interpret only n bytes of the input
hexdump -C -n{{number_of_bytes}} {{file}}
# list the services on a docker daemon
docker service ls
# create a new service
docker service create --name {{service_name}} {{image}}:{{tag}}
# display detailed information of a spaceseparated list of services
docker service inspect {{service_name|ID}}
# list the tasks of a spaceseparated list of services
docker service ps {{service_name|ID}}
# scale to a specific number of replicas for a spaceseparated list of services
docker service scale {{service_name}}={{count_of_replicas}}
# remove a spaceseparated list of services
docker service rm {{service_name|ID}}
# locate binary, source and man pages for ssh
whereis {{ssh}}
# locate binary and man pages for ls
whereis -bm {{ls}}
# locate source of gcc and man pages for git
whereis -s {{gcc}} -m {{git}}
# locate binaries for gcc in `/usr/bin/` only
whereis -b -B {{/usr/bin/}} -f {{gcc}}
# locate unusual binaries (those that have more or less than one binary on the system)
whereis -u *
# locate binaries that have unusual manual entries (binaries that have more or less than one manual installed)
whereis -u -m *
# create the configuration file for a storage pool called pool_name using `/var/vms` as the underlying storage system
virsh pool-define-as --name {{pool_name}} --type {{dir}} --target {{/var/vms}}
# list available signals to set traps for
trap -l
# list active traps for the current shell
trap -p
# set a trap to execute commands when one or more signals are detected
trap 'echo "Caught signal {{SIGHUP}}"' {{SIGHUP}}
# remove active traps
trap - {{SIGHUP}} {{SIGINT}}
# connect to a music player daemon on a given host and port
ncmpcpp --host {{ip}} --port {{port}}
# display metadata of the current song to console
ncmpcpp --current-song
# use a specified configuration file
ncmpcpp --config {{file}}
# use a different set of key bindings from a file
ncmpcpp --bindings {{file}}
# list contents of a directory on an rclone remote
rclone lsf {{remote_name}}:{{path/to/directory}}
# copy file or directory from local source to remote destination
rclone copy {{path/to/source_file_or_directory}} {{remote_name}}:{{path/to/destination_directory}}
# copy file or directory from remote source to local destination
rclone copy {{remote_name}}:{{path/to/source_file_or_directory}} {{path/to/destination_directory}}
# sync local source to remote destination, changing the destination only
rclone sync {{path/to/file_or_directory}} {{remote_name}}:{{path/to/directory}}
# move file or directory from local source to remote destination
rclone move {{path/to/file_or_directory}} {{remote_name}}:{{path/to/directory}}
# delete remote file or directory (use `dryrun` to test, remove it to actually delete)
rclone --dry-run delete {{remote_name}}:{{path/to/file_or_directory}}
# mount rclone remote (experimental)
rclone mount {{remote_name}}:{{path/to/directory}} {{path/to/mount_point}}
# unmount rclone remote if ctrlc fails (experimental)
fusermount -u {{path/to/mount_point}}
# ping host
ping {{host}}
# ping a host only a specific number of times
ping -c {{count}} {{host}}
# ping host, specifying the interval in seconds between requests (default is 1 second)
ping -i {{seconds}} {{host}}
# ping host without trying to lookup symbolic names for addresses
ping -n {{host}}
# ping host and ring the bell when a packet is received (if your terminal supports it)
ping -a {{host}}
# also display a message if no response was received
ping -O {{host}}
# check whether the adb server process is running and start it
adb start-server
# terminate the adb server process
adb kill-server
# start a remote shell in the target emulator/device instance
adb shell
# push an android application to an emulator/device
adb install -r {{path/to/file.apk}}
# copy a file/directory from the target device
adb pull {{path/to/device_file_or_directory}} {{path/to/local_destination_directory}}
# copy a file/directory to the target device
adb push {{path/to/local_file_or_directory}} {{path/to/device_destination_directory}}
# get a list of connected devices
adb devices
# display the completed import source file
goimports {{file}}.go
# write the result back to the source file instead of the standard output
goimports -w {{file}}.go
# display diffs and write the result back to the source file
goimports -w -d {{file}}.go
# set the import prefix string after 3rdparty packages (commaseparated list)
goimports -local {{path/to/package}} {{file}}.go
# create a new ember application
ember new {{my_new_app}}
# create a new ember addon
ember addon {{my_new_addon}}
# build the project
ember build
# build the project in production mode
ember build -prod
# run the development server
ember serve
# run the test suite
ember test
# run a blueprint to generate something like a route or component
ember generate {{type}} {{name}}
# install an embercli addon
ember install {{name_of_addon}}
# traceroute to a host
traceroute {{host}}
# disable ip address and host name mapping
traceroute -n {{host}}
# specify wait time for response
traceroute -w {{0.5}} {{host}}
# specify number of queries per hop
traceroute -q {{5}} {{host}}
# specify size in bytes of probing packet
traceroute {{host}} {{42}}
# perform a topological sort consistent with a partial sort per line of input separated by blanks
tsort {{file}}
# list all available boards
pio boards
# list only boards from installed platforms
pio boards --installed
# start monitoring time in project
watson start {{project}}
# start monitoring time in project with tags
watson start {{project}} +{{tag}}
# stop monitoring time for the current project
watson stop
# display the latest working sessions
watson log
# edit most recent frame
watson edit
# remove most recent frame
watson remove
# ping localhost over tcp
hping3 {{localhost}}
# ping an ip address over tcp on a specific port
hping3 -p {{80}} -S {{192.168.1.1}}
# ping an ip address over udp on port 80
hping3 --udp -p {{80}} -S {{192.168.1.1}}
# scan a set of tcp ports on a specific ip address
hping3 --scan {{80,3000,9000}} -S {{192.168.1.1}}
# perform a charge test on port 80
hping3 --flood -p {{80}} -S {{192.168.1.1}}
# extract classes and methods from an apk file
dexdump {{path/to/file.apk}}
# display header information of dex files contained in an apk file
dexdump -f {{path/to/file.apk}}
# display the disassembled output of executable sections
dexdump -d {{path/to/file.apk}}
# output results to a file
dexdump -o {{path/to/file}} {{path/to/file.apk}}
# list all available project targets
pio run --list-targets
# list all available project targets of a specific environment
pio run --list-targets --environment {{environment}}
# run all targets
pio run
# run all targets of specified environments
pio run --environment {{environment1}} --environment {{environment2}}
# run specified targets
pio run --target {{target1}} --target {{target2}}
# run the targets of a specified configuration file
pio run --project-conf {{path/to/platformio.ini}}
# run a flow check
flow
# check which files are being checked by flow
flow ls
# run a type coverage check on all files in a directory
flow batch-coverage --show-all --strip-root {{path/to/directory}}
# display linebyline type coverage stats
flow coverage --color {{path/to/file.jsx}}
# connect to a database
mongo {{database}}
# connect to a database running on a given host on a given port
mongo --host {{host}} --port {{port}} {{database}}
# connect to a database with a given username; user will be prompted for password
mongo --username {{username}} {{database}} --password
# evaluate a javascript expression on the database
mongo --eval '{{JSON.stringify(db.foo.findOne())}}' {{database}}
# list all available generators
rails generate
# generate a new model named post with attributes title and body
rails generate model {{Post}} {{title:string}} {{body:text}}
# generate a new controller named posts with actions index, show, new and create
rails generate controller {{Posts}} {{index}} {{show}} {{new}} {{create}}
# generate a new migration that adds a category attribute to an existing model called post
rails generate migration {{AddCategoryToPost}} {{category:string}}
# generate a scaffold for a model named post, predefining the attributes title and body
rails generate scaffold {{Post}} {{title:string}} {{body:text}}
# start server with the default config file
nginx
# start server with a custom config file
nginx -c {{config_file}}
# start server with a prefix for all relative paths in the config file
nginx -c {{config_file}} -p {{prefix/for/relative/paths}}
# test the configuration without affecting the running server
nginx -t
# reload the configuration by sending a signal with no downtime
nginx -s reload
# grant direnv permission to load the specified `.envrc`
direnv allow
# revoke the authorization of a given `.envrc`
direnv deny
# edit the `.envrc` file in the default text editor and reload the environment on exit
direnv edit .
# trigger a reload of the environment
direnv reload
# print some debug status information
direnv status
# send a typed email message. the commandline below continues after pressing enter key. input cc emailid (optional) press enter key. input message text (can be multiline). press ctrld key to complete the message text
mail --subject="{{subject line}}" {{to_user@example.com}}
# send an email that contains file content
mail --subject="{{$HOSTNAME filename.txt}}" {{to_user@example.com}} < {{path/to/filename.txt}}
# send a `tar.gz` file as an attachment
tar cvzf - {{path/to/directory1 path/to/directory2}} | uuencode {{data.tar.gz}} | mail --subject="{{subject_line}}" {{to_user@example.com}}
# check whether a file or directory is ignored
git check-ignore {{path/to/file_or_directory}}
# check whether multiple files or directories are ignored
git check-ignore {{path/to/file}} {{path/to/directory}}
# use pathnames, one per line, from stdin
git check-ignore --stdin < {{path/to/file_list}}
# do not check the index (used to debug why paths were tracked and not ignored)
git check-ignore --no-index {{path/to/files_or_directories}}
# include details about the matching pattern for each path
git check-ignore --verbose {{path/to/files_or_directories}}
# compile a bitcode or ir file to an assembly file with the same base name
llc {{path/to/file.ll}}
# enable all optimizations
llc -O3 {{path/to/input.ll}}
# output assembly to a specific file
llc --output {{path/to/output.s}}
# emit fully relocateable, position independent code
llc -relocation-model=pic {{path/to/input.ll}}
# check the current repository
git fsck
# list all tags found
git fsck --tags
# list all root nodes found
git fsck --root
# compile the project in the current directory
zig build
# compile and run the project in the current directory
zig build run
# initialize a `zig build` application
zig init-exe
# intitialize a `zig build` library
zig init-lib
# create and run a test build
zig test {{path/to/file.zig}}
# reformat zig source into canonical form
zig fmt {{path/to/file.zig}}
# use zig as a dropin c compiler
zig cc {{path/to/file.c}}
# use zig as a dropin c++ compiler
zig c++ {{path/to/file.cpp}}
# count all objects and display the total disk usage
git count-objects
# display a count of all objects and their total disk usage, displaying sizes in humanreadable units
git count-objects --human-readable
# display more verbose information
git count-objects --verbose
# display more verbose information, displaying sizes in humanreadable units
git count-objects --human-readable --verbose
# create a new bug report file in the current directory
git bugreport
# create a new bug report file in the specified directory, creating it if it does not exist
git bugreport --output-directory {{path/to/directory}}
# create a new bug report file with the specified filename suffix in `strftime` format
git bugreport --suffix {{%m%d%y}}
# render diagrams to default format (png)
plantuml {{diagram1.puml}} {{diagram2.puml}}
# render a diagram in given format (e.g. `png`, `pdf`, `svg`, `txt`)
plantuml -t {{format}} {{diagram.puml}}
# render all diagrams of a directory
plantuml {{path/to/diagrams}}
# render a diagram to the output directory
plantuml -o {{path/to/output}} {{diagram.puml}}
# render a diagram with the configuration file
plantuml -config {{config.cfg}} {{diagram.puml}}
# display help
plantuml -help
# create a new rails project
rails new "{{project_name}}"
# start local server for current project on port 3000
rails server
# start local server for current project on a specified port
rails server -p "{{port}}"
# open console to interact with application from commandline
rails console
# check current version of rails
rails --version
# bootstrap a new node
knife bootstrap {{fqdn_or_ip}}
# list all registered nodes
knife node list
# show a node
knife node show {{node_name}}
# edit a node
knife node edit {{node_name}}
# edit a role
knife role edit {{role_name}}
# view a data bag
knife data bag show {{data_bag_name}} {{data_bag_item}}
# upload a local cookbook to the chef server
knife cookbook upload {{cookbook_name}}
# sequence from 1 to 10
seq 10
# every 3rd number from 5 to 20
seq 5 3 20
# separate the output with a space instead of a newline
seq -s " " 5 3 20
# format output width to a minimum of 4 digits padding with zeros as necessary
seq -f "%04g" 5 3 20
# display the names, values and descriptions of all platformio settings
pio settings get
# display the name, value and description of a specific platformio setting
pio settings get {{setting}}
# set a specific setting value
pio settings set {{setting}} {{value}}
# reset the values of all modified settings to their factory defaults
pio settings reset
# prettyprint one or more graphs in canonical format
nop {{path/to/input1.gv}} {{path/to/input2.gv ...}} > {{path/to/output.gv}}
# check one or more graphs for validity, producing no output graph
nop -p {{path/to/input1.gv}} {{path/to/input2.gv ...}}
# display help for `nop`
nop -?
# install or update an application anonymously
steamcmd +login {{anonymous}} +app_update {{appid}} +quit
# install or update an application using the specified credentials
steamcmd +login {{username}} +app_update {{appid}} +quit
# install an application for a specific platform
steamcmd +@sSteamCmdForcePlatformType {{windows}} +login {{anonymous}} +app_update {{appid}} validate +quit
# encrypt a directory into `archive.gpg` using a passphrase
gpg-zip --symmetric --output {{archive.gpg}} {{path/to/directory}}
# decrypt `archive.gpg` into a directory of the same name
gpg-zip --decrypt {{path/to/archive.gpg}}
# list the contents of the encrypted `archive.gpg`
gpg-zip --list-archive {{path/to/archive.gpg}}
# [a]rchive a file or directory
7za a {{path/to/archive.7z}} {{path/to/file_or_directory}}
# encrypt an existing archive (including file names)
7za a {{path/to/encrypted.7z}} -p{{password}} -mhe=on {{path/to/archive.7z}}
# e[x]tract an archive preserving the original directory structure
7za x {{path/to/archive.7z}}
# e[x]tract an archive to a specific directory
7za x {{path/to/archive.7z}} -o{{path/to/output}}
# e[x]tract an archive to stdout
7za x {{path/to/archive.7z}} -so
# [a]rchive using a specific archive type
7za a -t{{7z|zip|gzip|bzip2|lzip}} {{path/to/archive.7z}} {{path/to/file_or_directory}}
# [l]ist the contents of an archive
7za l {{path/to/archive.7z}}
# list available archive types
7za i
# debug an executable
gdb {{executable}}
# attach a process to gdb
gdb -p {{procID}}
# debug with a core file
gdb -c {{core}} {{executable}}
# execute given gdb commands upon start
gdb -ex "{{commands}}" {{executable}}
# start gdb and pass arguments to the executable
gdb --args {{executable}} {{argument1}} {{argument2}}
# start a jupyter notebook server in the current directory
jupyter notebook
# open a specific jupyter notebook
jupyter notebook {{example.ipynb}}
# export a specific jupyter notebook into another format
jupyter nbconvert --to {{html|markdown|pdf|script}} {{example.ipynb}}
# start a server on a specific port
jupyter notebook --port={{port}}
# list currently running notebook servers
jupyter notebook list
# stop the currently running server
jupyter notebook stop
# start jupyterlab, if installed, in the current directory
jupyter lab
# start monodevelop
monodevelop
# open a specific file
monodevelop {{path/to/file}}
# open a specific file with the caret at a specific position
monodevelop {{path/to/file}};{{line_number}};{{column_number}}
# force opening a new window instead of switching to an existing one
monodevelop --new-window
# disable redirection of stdout and stderr to a log file
monodevelop --no-redirect
# enable performance monitoring
monodevelop --perf-log
# start a runit service as the current user
runsv {{path/to/service}}
# start a runit service as root
sudo runsv {{path/to/service}}
# run a command on two hosts, and print its output on each server inline
pssh -i -H "{{host1}} {{host2}}" {{hostname -i}}