Patching Vim via Homebrew to fix YouCompleteMe error messages ‘Back to original’

One of the plugins for vim I rely on heavily is
YouCompleteMe. It really is amazing
but there is one small problem as it generates completion error messages all the
time while typing.

There is a fix for
which sadly has
not landed in Vim yet, but as detailed in the issue on
it is easy to
patch it yourself. Since I installed vim via Homebrew the way to go was to add
the patch to the Homebrew formula and go from there. So this is what I did.
First I don’t like to work in the Homebrew master so I created a new branch

$ cd `brew --prefix`
$ git checkout -b add-ycm-message-silence-patch
$ vim Library/Formula/vim.rb

Afterwards it’s time to put the new patch in the formula, at the bottom of the
file after __END__. The method

def patches; DATA; end unless build.head?

will apply all patches preset in the DATA section, which is the part of the file after
__END__. I created a version in my fork of homebrew.

And low and behold after a reinstall

$ brew uninstall vim
$ brew install vim --override-system-vi 
  --with-client-server --with-lua 
  --with-mzscheme --with-perl --with-tcl

The annoying errors are gone.


Set DNS servers in NodeJS on a per channel bases

In NodeJS DNS request are handled in the background via the ares library to enable asynchronous requesting. Ares allows the DNS server to be used set on a per channel bases, but this is not exposed in NodeJS, but is is quite simple to enable it by patching In essence this enables setting the DNS server via the parameter CHANNEL_NS on creation. To expose this towards NodeJS there needs to be an extension on the default dns.js module. The reason for me to enable this was to use different nameservers on each request, so the extension creates a new channel each time a new nameserver is needed.
I packed everything in a Github repository including some examples.