Customising terminal
- vim config
set number
:highlight LineNr ctermfg=DarkGrey
hi MatchParen cterm=bold ctermbg=none ctermfg=magenta
- iTerm 2
- useful aliases
export ..='cd ../'
export serve='python3 -m http.server 8000'
. Also, check out this awesome gist.
- separate functions into different file and source it
# .zshrc.local
if [ -f ~/.zshrc.functions ]; then
source ~/.zshrc.functions
else
print "404: ~/.zshrc.functions not found."
fi
- neat tricks
open image.jpg
opens in default application (Preview on macOS)
- ⌘ + shift + P to install ‘code’ command in PATH. Now you can open any file in code via terminal:
code text.md
Useful libs
- imagemagick
- youtube-dl
- ffmpeg
Postgres
- gist
- Find location of
pg_hba.conf
by going into psql
and typing SHOW hba_file
- Likely need to change auth method from
peer
to md5
Redis with UNIX sockets