Thursday, November 15, 2018

update fzf default command to ignore .git folder:

 (git ls-tree -r — name-only HEAD ||
 find . -path “*/\.*” -prune -o -type f -print -o -type l -print |
 sed s/^..//) 2> /dev/null'

installed vim-tmux-navigator, which allows you navigate in and out between vim and tmux panes using same shortcut keys

once installed the plugin, it default maps ctrl j/k/l/h for moving around vim windows

then add these lines to ~/.tmux.conf to enable the same keybindings for tmux:

is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
    | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h"  "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j"  "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k"  "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l"  "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind-key -T copy-mode-vi C-h select-pane -L
bind-key -T copy-mode-vi C-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
bind-key -T copy-mode-vi C-\ select-pane -l

since I use ctrl-l (clear screen) and ctrl-k (kill line) a lot, it bothers me a bit, so I need to re-mapped them:

bind l send-keys 'C-l'
bind k send-keys 'C-k'

one nice feature about duckduckgo is bangs

search results of duckduckgo still not as good as google, but I can use !g [search-term] to switch to google results, other useful bangs:

  • !bangs: search bangs
  • !rsub: search subreddits
  • !r: reddit
  • !hn: hackernews
  • !w: wiki
  • !tw: twitter
  • !cdict: chinese dictionary
  • !a: amazon
  • !yt: youtube

for languages:

  • !clj: clojure docs
  • !jdk: java docs
  • !gso: google over stackoverflow
  • !py / !python2 / !python3: python

quite interesting to try GNU Stow after reading Managing Dotfiles with GNU Stow

I should be able to simplified the process of setting up a new development environment for me

amazon released Corretto, a production-ready distribution of OpenJDK

I don't like the new release cycle lf java, this provides another option to have a update-to-date patch long term support jdk, very good news

two articles about leveraging airflow to a more usef friendly level:

uber posts two more articles about their big data platform:

Real URLs for AMP Cached Content Using Cloudflare Workers

amp doesn't interests me, Web packaging format and Signed HTTP Exchanges do

I probably will spend more time on golang

about golang 2: A Part of All Good Engineering

infra stuffs:

a nice summary on load balancing strategy: NGINX and the “Power of Two Choices” Load-Balancing Algorithm

more unikernels articles:

Blog Archives

Search Blog: