Rider tips: Don't add bom when creating utf-8 files!
BOM is annoying. Especially when I am creating a SQL script file.
BOM is annoying. Especially when I am creating a SQL script file.
^ (shift + 6)This moves the cursor to the first non-blank character of the current line.
_ (underscore)This also moves the cursor to the first non-blank character on the same line the cursor is on.
By the way, the 0 command moves to the absolute start of the line, including any leading whitespace.
Instead of pressing backspace repeatedly, press ESC then Backspace.
Don't you want more? here's some
Ctrl + kCtrl + uCtrl + aWant a full list?
docker network ls
then
docker network rm networkname
Muscle Memory Makeover
Docker just streamlined Docker Compose by integrating it as a plugin. Great news, but it means us old hats need to retrain our fingers. Here's a quick fix for your .bashrc to keep things smooth:
alias docker-compose='docker compose'
As a programmer and Linux admin, I juggle multiple MySQL servers with different group suffixes. Typing --defaults-group-suffix every time was a drag. This handy bash function saves the day:
m() {
if [ $# -eq 0 ]; then
# If no arguments provided, run mysql directly
mysql
elif [[ "$1" == -* ]]; then
# If first argument starts with -, pass all arguments directly to mysql
mysql "$@"
else
# Otherwise, treat first argument as suffix
local suffix=$1
shift
mysql --defaults-group-suffix=$suffix "$@"
fi
}
Now, connecting to a database is as easy as:
m specific-suffix
This keeps your workflow concise and saves you precious keystrokes.
Put them into you .bashrc or .zshrc now and let our life easier!