Simple CDC with Debezium + NATS + Docker


I needed to get real-time events from a proprietary system that uses a MySQL database. The de facto standard for CDC (Change Data Capture) solutions today is Debezium. Under the hood it uses Kafka and all the tooling that comes with it for cluster management. I wanted to avoid technologies made up of many complex components. It turned out there is a lightweight version — Debezium Server, which allows using alternative message brokers.…
Read more ⟶

Keyboard Layouts in Vim


Vim has its own input method and keyboard layout. Add this to your config: set keymap=russian-jcukenwin set iminsert=0 " English layout by default in input mode. set imsearch=0 " English layout by default in search mode. set langmap=ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz Now you can toggle the layout with i_CTRL-^. A handy trick: to type just one character available in the English layout without switching back and forth, press i_CTRL-V or i_CTRL-Q, type the character from the English layout, then continue typing in Russian.…
Read more ⟶

Improving Rails Console Workflow


Sometimes you need to run rails console on a remote machine and override methods for the duration of the session. Pain points: input lag difficult to write multi-line code hard to edit previously executed multi-line code You could write the code locally in your favorite editor, copy and paste it into the console. But this can cause issues with irb or pry command interpretation. Solution Create a local file /tmp/my_patch_name.rb class MyClassWithBug # alias the original method alias old_my_method my_method unless defined?…
Read more ⟶