I spend a lot of time in the terminal. But I never touch Enter or arrow keys. Here is what makes me productive:
Command history navigation
ctrl + p - previous command
ctrl + n - next command
ctrl + r - history search
ctrl + m - enter
Can't imagine my life without these hotkeys
Line navigation
ctrl + a - jump to the beginning
ctrl + e - jump to the end
ctrl + u - del from cursor till the beginning
ctrl + k - del from cursor till the end
Work navigation (slightly more exotic, but I got used to it already)
alt + f - jump one word forward
alt + b - jump one word backward
alt + d - del a word in front of cursor
ctrl + f - jump one char forward
ctrl + b - jump one char backward
ctrl + d - del a symbol under cursor
Screen manipulation
ctrl + l - clear visible area (scrolls up)
cmd + k - this one works only in iterm2, but it's gold - flush the whole output buffer
reset - a tool to fix the terminal that got broken by a partial output of the previous command
Miscellaneous
ctrl + z - stop the current program (but don't terminate it). I use it when I need to drop out of my Vim session to experiment with something. Use `fg` to restore the stopped job.
ctrl + s - stop the output of a crazy command
ctrl + q - resume the output
When I internalized these hotkeys, my terminal experience drastically improved. It's actually less than 20! And most of them come in pairs. So, just 10 things to remember.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
Long story short: I solved hundreds of LeetCode and HackerRank problems, and I do find this experience useful for my day job.
Here is why (thread)
Sometimes, a developer may stumble upon a purely algorithmic task.
In my very first company, I wrote a GUI framework for SmartTV devices. These sets were quite slow back in 2011, so I needed to make the framework really lightweight and fast because even jQuery would be too heavy
The framework had a virtual DOM tree (react wasn't a thing yet). And the element rendering and navigation were all about tree traversals.
This framework essentially saved the project from failure.
Kubernetes is a Distributed Operating System (thread):
1. One of the primary goals of a traditional operating system (e.g Linux) is to share a machine's resources between apps. While "Kubernetes is all about sharing machines between applications."
2. An operating system gives you a handy way to launch your apps. So does Kubernetes.
3. An operating system gives you a handy way to install apps. So does Kubernetes (through raw YAML or a package manager like Helm).
Kubernetes is deprecating Docker as a container runtime after v1.20. But nobody cares. Why? Because images built with Docker will keep working on Kubernetes.
So does images created with Podman and most of the other build tools around. Why? Because of the great standardization effort called OCI!