Thursday, November 15, 2018
update fzf
default command to ignore .git
folder:
export FZF_DEFAULT_COMMAND='
(git ls-tree -r — name-only HEAD ||
find . -type f -not -path "**/.git/*" -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:
- Peloton: Uber’s Unified Resource Scheduler for Diverse Cluster Workloads
- Uber’s Big Data Platform: 100+ Petabytes with Minute Latency
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:
Friday, November 16, 2018
TIL you can use csv file as MySQL storage engine
so HTTP-over-QUIC will officially become HTTP/3
people say the problem with http2 over tcp is Head-of-line blocking, I didn't study yet
books I've been reading:
LISA18 videos are up, here's my watch list:
- Solving All the Problems with systemd
- Unikraft: Unikernels Made Easy
- Modern HTTP Routing
- Apache Kafka and KSQL in Action: Let’s Build a Streaming Data Pipeline!
- Mastering Near-Real-Time Telemetry and Big Data: Invaluable Superpowers for Ordinary SREs
- Containers and Security on Planet X
- The History of Logging @ Facebook (Abridged)
- Isolation without Containers
- Delete This: Decommissioning Servers at Scale
- What Breaks Our Systems: A Taxonomy of Black Swans
- Automating Multi-service Deployments on Kubernetes
- Overcoming the Challenges of Centralizing Container and Kubernetes Operations
also recommend:
Sunday, November 18, 2018
bought an usb dav: SMSL Sanskrit 10th
on macbook pro, I can see the sample rate is 384kHz
, but on my linux laptop always shows 44.1kHz
did a little bit search to make it to 192kHz
...
first know how to find out current sample rate:
$ pacmd list-sinks
then read this article: Enable High Quality Audio on Linux
add these lines to $HOME/.config/pulse/daemon.conf
:
default-sample-format = float32le
default-sample-rate = 192000
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 2
default-fragment-size-msec = 125
resample-method = soxr-vhq
enable-lfe-remixing = no
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 9
rlimit-rtprio = 9
daemonize = no
the essential part here is:
default-sample-rate = 192000
alternate-sample-rate = 44100
restart pulse server $ pulseaudio --kill && sleep 1 && pulseaudio --start
oversampling is not always better, but it sounds better in my case, here's an article talks more about oversampling: NOS vs OS (no oversampling vs oversampling)
by the way, under os x, use audio midi setup to set sample rate, not sound in system preferences
Friday, November 23
try clojurescript by following this article: Up and running with ClojureScript in 2018
some cli tools
- alacritty, a cross-platform, GPU-accelerated terminal emulator
- nnn, terminal file manager
- amp, a complete text editor for your terminal
- eDEX-UI, a fullscreen desktop application resembling a sci-fi computer interface
some notes on creating a graphql mirror/snapshot:
$ npm install -g graphql-cli gql-generator
$ graphql get-schema -e [endpoint] --header FOO=bar -o schema.graphql
$ mkdir queries
$ gqlg --schemaFilePath schema.graphql --destDirPath queries
[ todo ] query and save result to json files
[ todo ] use [json-graphql-server](https://github.com/marmelab/json-graphql-server) to serve data
Monday, November 26, 2018 ##
to watch whether a file is modified, can use inotifywatch
, comes from inotify-tools
package:
$ sudo apt-get install inotify-tools
$ inotifywatch -mq --form
$ while inotifywait -e modify /path/to/file; do echo "ok"; done
however, inotifywatch
was not available under os x, can use fswatch
instead:
$ brew install fswatch
$ fswatch -o /path/to/file | xargs -n1 echo
but I found a simpler one, entr, works under both linux and os x:
$ ls /path/to/file | entr echo "ok"
Friday, November 30, 2018
Clojure/conj 2018 videos are up, and will be updated (the conference ends at Dec 1st)
I will finish them all, but first thing first, watched Maybe Not by Rich Hickey, a very good talk about nullable.
and yes I agree that Maybe maybe is not a good idea ...
this year I may try Advent of Code 2018
here's full list of announcements of this year's aws reinvent
I highlighted updates that interested me:
Amazon Kinesis Data Analytics for Java Applications, before you can only use SQL to transform a stream, now with Java support
Firecracker (blog 1 | blog 2), this is huge. a micro-vm for serverless land, hopefully it will solve lambda cold start problem.
Lambda as a Target for Application Load Balancer, you don't need API gateway if you want to trigger lambda by http(s) anymore
Lambda Layers, another huge update for serverless, with this you can run any language on lambda, for example, C++
DynamoDB Transactions (blog 1 | blog 2), dynamodb transactions was supported on sdk level (java), now on the database level. (seems every distributed databases out there are supported transactions now)
Amazon Timestream, time series database, people said it's like a managed druid, wow
AWS Transfer for SFTP, one funny point I heard is treat sftp as an api, interesting ...
Amazon API Gateway support for WebSocket APIs, no info on this yet. before this the only websocket that aws supports is the IoT message broker.
AWS App Mesh, service mesh service, like istio, also build on top of envoy, now wait and see who wins.
Blog Archive
- Newer Entries
- 2018 December
- 2019 January
- 2019 February
- 2019 March
- 2019 April
- 2019 May
- 2019 July
- 2019 October
- 2019 November
- 2019 December
- 2020 August
- 2020 September
- 2020 October
- 2020 November
- 2020 December
- 2021 January
- 2021 February
- 2021 March
- 2021 April
- 2021 May
- 2021 June
- 2021 August
- 2021 September
- 2021 December
- 2022 March
- 2022 April
- 2022 May
- 2022 June
- 2022 July
- 2022 August
- 2022 September
- 2022 October
- 2022 November
- 2022 December
- 2023 January
- 2023 February
- 2023 March
- 2023 April
- 2023 July
- 2023 August
- 2023 September
- 2023 October
- 2023 November
- 2023 December
- 2024 January
- 2024 February
- 2024 March
- 2024 April
- 2024 May
- 2024 June
- 2024 August
- 2024 September
- 2024 October
- 2024 November
- 2024 December
- Older Entries
- 2018 October
- 2018 September
- 2018 August
- 2018 July
- 2018 June
- 2018 May
- 2018 April
- 2018 March
- 2018 February
- 2018 January
- 2017 December
- 2017 November
- 2017 October
- 2017 September
- 2017 August
- 2017 July
- 2017 June
- 2017 May
- 2017 April
- 2017 March
- 2017 February
- 2017 January
- 2016 December
- 2016 November
- 2016 October
- 2016 September
- 2016 August
- 2016 July
- 2016 June
- 2016 May
- 2016 April
- 2016 March
- 2016 February
- 2016 January
- 2015 December
- 2015 November
- 2015 October
- 2015 September
- 2015 August
- 2015 July
- 2015 June
- 2015 May
- 2015 April
- 2015 March
- 2015 February
- 2015 January
- 2014 December
- 2014 November
- 2014 October
- 2014 September
- 2014 August
- 2014 March
- 2014 February
- 2014 January
- 2013 December
- 2013 October
- 2013 July
- 2013 June
- 2013 May
- 2013 March
- 2013 February
- 2013 January
- 2012 December
- 2012 November
- 2012 October
- 2012 September
- 2012 August