Cheatsheets
Taking note of various commands and shortcuts for the tools I use.
Windows terminal
My favorite feature of the Windows terminal is the panes. Splitting the working area into many small terminals is very useful, especially with containerized systems. I've added 2 custom shortcuts to be able to split panes in all 4 directions easily.
alt + shift + plus
- split pane to the rightalt + shift + ctrl + plus
- split pane to the left (custom)alt + shift + minus
- split pane downalt + shift + ctrl + minus
- split pane up (custom)alt + arrow keys
- navigate between panesalt + shift + arrow keys
- resize the currently selected panectrl + shift + w
- close the current panectrl + shift + p
- see all shortcuts
Docker
I'll start with just adding random Docker commands I'm encountering. Later I may organize it into sections.
docker ps
- list currently running containersdocker ps -a
- list all containersdocker rm -f [container id or name]
- stop and remove a containerdocker compose up --build
- build and run all the specified containersdocker container prune
- remove all stopped containers
Git
git tag -a [tag name] -m "[tag message]"
- create an annotated taggit push --follow-tags
- push annotated tags that are reachable from pushed commitsgit checkout [tag name]
- checkout the commit connected with a tag. This operation puts the repository in a detached HEAD state because we checked out a commit and not a branchgit switch -
- switches back to the previous branch. Useful to "undo" the checkout of the specific tag
Kafka
confluentinc/cp-kafka
container has a bunch of Kafka utilities preinstalled. Here are a few I've encountered so far.
kafka-topics --list --bootstrap-server localhost:9092
- list all the topics available on the brokerkafka-console-consumer --bootstrap-server localhost:9092 --topic [topic name] --from-beginning
- read all the messages available on the topic