Adding missing functions to H2DB

Here is an example of how to add MySQL UNIX_TIMESTAMP function to H2DB (which doesn’t have it even in MySQL compatibility mode)
Continue reading


VMWare frustrations

I am a sad customer of VMWare as I have bought VMWare Fusion for macOS and had constant issues running it. I’ve tried getting support, they told me to uninstall and reinstall VMWare over and over, but this never solved anything.

In the end I have found solution myself, but only after I’ve given up on using VMWare Fusion literally for years.

At worst VMWare support asked me to provide full remote access to my laptop, which is impossible since I use it for work and it contains information on my clients I am not at liberty to disclose to third-parties. Knowing that I can’t do that they practically found a way not to provide me any support.

Anyhow, for couple of years I had no need to use VMWare Fusion and it was just sitting there, but recently I had a need to using it again and encountered same issues as previously – it had failed to run some “peer process”, most often it was /dev/vmmon
Screen Shot 2019-07-28 at 12.32.26.png
Continue reading

Air Conditioner control via Apple HomeKit and desktop app

Summer is a good time to work a bit on DIY smart-home air conditioner (AC) controls.

If you happen to have WiFi enabled Cooper&Hunter and/or Gree ACs – you’re lucky, because those support an easy to integrate with protocol, details of which one can find here:

In order to do so using Java I’ve implemented my own library:

And using that library I’ve created two solutions for AC control – a desktop app that works great, and a HomeKit automation that is in a Proof-of-Concept state right now because of limitations and connectivity issues I’ve encountered using HAP (HomeKit Accessory Protocol).

Here’s how they look:

ACControl on macOS.png
Continue reading

Episode 4 of Mykola’s Music Podcast is out

Did you know I have a music podcast on Mixcloud? Me neither! I do! :D

Here it is:

The podcast is about music I listen to (which is like 60% metal and rock, 20% synth/futurepop and related electronic music, 10% darkwave, gothic rock, ethereal, dark ambient and other “schwarze scene” stuff, and 10% everything else). 

And I’ve just uploaded 4-th episode (about metal bands that incorporate synth/electro elements up to 50/50 metal/electronic mix).

Give it a spin.

ZSH completions for teamocil/itermocil

I’ve noticed that even with installed OhMyZSH I don’t get proper completions for an itermocil in Z-shell (ZSH) terminal – proper completions being list of names of files from ~/.teamocil folder, sans extensions.

I’ve looked at OhMyZSH plugins and wrote my own for itermocil – a file ~/.oh-my-zsh/plugins/itermocil/itermocil.plugin.zsh with this content:

_itermocil () {
  compadd -- `ls -1 ~/.teamocil/ | rev | cut -d "." -f 2- | rev`

compdef _itermocil itermocil

And added it to plugins environment variable in .zshrc.

However, while doing so I’ve noticed that my .zshrc already contained this line:

compctl -g '~/.teamocil/*(:t:r)' teamocil

Googling a bit revealed that (:t:r) modifier to * wildcard are the basename sans extension modifiers for wildcard expansion in ZSH.

Which meant all I really needed was the same line in my .zshrc again, only this time with itermocil at the end instead of teamocil.

Xtext build surprises

Found a surprising issue in Xtext.

Apparently, Xtext generator has this AntlrToolFacade class that tries to download and save it in current dir as .antlr-generator-3.2.0-patch.jar to then load classes out of it.

Which is pretty crazy.

First of all, if you use Nexus or Artifactory to make sure your builds do not depend on thirdparty resources being up – this breaks it.

Second, downloading something over HTTP without any checksums and stuff is as unsafe as you can think. The issue occurred in a first place because Itemis started to redirect from HTTP to HTTPS link on this path – but the code that does download can’t even follow redirects :facepalm: And the “fix” that has been made was to disable redirect and still serve the JAR over HTTP (counts as a quickfix, but otherwise – :double-facepalm: ).

And in general, having URLs hardcoded is just ugly.

So, quickest solution is to simply commit antlr-generator-3.2.0-patch.jar as .antlr-generator-3.2.0-patch.jar into the root of your project – so that it would not be downloaded during builds.

If you have a better idea though – drop me a comment ;-)