To make the left control key also an escape
- install Karabiner
- Search for complex_modifications rules, find somethin glike
Change control key
- Impact and Enable
To make the left control key also an escape
Change control key
Reset bluetooth hhkb pairing
- go into system preference > keyboard > setup bluetooth keyboard
- press Fn+q to get into pairing mode (blue light start flashing)
- Fn+crtl then 1 to reset first pairing
?, +, |, ( and )
are interpreted as literal, hence need to escape with backslash-E
(or --extended-regex
) which means it doesn't take the meta-characters literally hence do not need to escape with backslash# a line begins with hello
grep '^hello' world.txt
Display color when using watch
watch --color -n 2 <command>
One of my rule of thumb is never touch terraform state file if I want to live a happy life but recently I found myself having to separate a state file into 2. At first I was very irritated because I should've done this in the beginning but what happened, happened so lets deal with it.
With some quick online searching, to my surprised there are some terraform built-in command that can make my life easier.
Let says all the current terraform code are in foo/
and I would like to move module.bar
out of foo/
to bar/
and also rename the module to module.balloon
Default value in bash
# Set COFFEE to latte if there is no input
COFFEE=${1:-latte}
# Set SIZE to small when ORDER is not set or null
SIZE=${ORDER:-small}
# Set TOPPING and EXTRA to chocolate when EXTRA is not set or null
Recently I need to do some updating for an nginx configuration, beside the fact that I am a bit rusty with my nginx config skills, I also encounter something like this
location @something {
# ...
}
Not knowing what this mean, did some quick search and found that this is called a named location and it seems like a good alternative to if-then-else in certain scenario.