Vim tweaks and updates

Over the last few weeks, I have significantly changed and updated my Vim configuration.  I’ve been using the editor for decades, and yet I every time I revisit my setup, I am amazed at how far the editor progressed and how wisdom the Vim community shares via themes, plugins, configuration tweaks, etc.

Here are some of the highlights this time around:

  • Switched from Pathogen plugin manager (and Ansible bits) to Vundle.
  • Added vim-devicons plugin and a patched font that supports them.
  • Switched from Syntastic to ALE for faster and better syntax checks.
  • Improved the code completion configuration, tags, and such.
  • Added a whole bunch of plugins for developers.

I am still getting used to some new shortcuts, catching up on the documentation, and trying things out.  But if it’s been a while since you’ve looked at your own Vim configuration, I suggest you do so.  Things are moving and evolving faster than you might think.

Why Uber Engineering Switched from Postgres to MySQL

Why Uber Engineering Switched from Postgres to MySQL” is an interesting study with plenty of technical detail of how MySQL was a better choice than PostgreSQL for the very demanding growth of Uber.  These kinds of issues are probably way out of scope for any “regular Joe” application, but the insight into the differences of MySQL and PostgreSQL architectures is still useful.

Main PostgreSQL limitations covered by the study are:

  • Inefficient architecture for writes
  • Inefficient data replication
  • Issues with table corruption
  • Poor replica MVCC support
  • Difficulty upgrading to newer releases

forget-db – a simple GDPR inspired tool to anonymise confidential database data

forget-db:

A simple(ish) command line tool written in PHP 7.1 using Laravel Zero and Faker to help you anonymise/pseudonymise data within your database to support protecting either sensitive information, or peoples right to be forgotten with GDPR compliance.

The tool allows you to connect to either mysql, postgres, sqlite or sqlserver and replace defined information with random data to allow you to keep statistics/relationships/audit of actions etc.

It uses a simple yaml configuration file to define the conditions for overwriting, which fields you want to overwrite, and what to overwrite them with.

Reboot and wait for reboot to complete in Ansible playbook

Jeff Geerling shares a handy tip on how to implement the configure-reboot-configure pattern in an Ansible playbook.

---
- name: Do something that requires a reboot when it results in a change.
  ...
  register: task_result

- name: Reboot immediately if there was a change.
  shell: "sleep 5 && reboot"
  async: 1
  poll: 0
  when: task_result is changed

- name: Wait for the reboot to complete if there was a change.
  wait_for_connection:
    connect_timeout: 20
    sleep: 5
    delay: 5
    timeout: 300
  when: task_result is changed

...