Skip to content

Instantly share code, notes, and snippets.

Dmytro Konstantinov UmkaDK

Block or report user

Report or block UmkaDK

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
UmkaDK /
Last active Sep 4, 2019
How to set mail alias as your Apple ID?

Dear @Apple,

Please allow users to change their current AppleID to an mail alias, that's the additional email address that can be defined via the Preferences pane of iCloud's Mail web app.

An Apple account is identified by its AppleID, which for a long standing account, has a lot of information associated with it. However, people grow up, get married, change their names. Not everyone wants to set up a new Apple ID when that happens. However, an account handle set up years ago can become irrelevant over time.

Apple IDs can already be changed if you use a 3rd party email address or have a mail alias that ends in or ( However, mail aliases that end in are for some reason excluded.

It would be great if users who's Apple ID already ends in could set one of their mail aliases as their new AppleID. I imagine there is a plethora of Apple Users who would benefit immensely from bei

UmkaDK /
Last active May 16, 2019
How to recover from VirtualBox installer failure on macOS host

I find that every now and again VirtualBox glitches out and fails to install (or update) on macOS. This has happened to me a few times now, and every time single time it's because Apple security policies prevent VirtualBox kernel extensions from being loaded.

Screenshot of the failed install

Attempt 1 of 2: Start with OSXDaily fix: check your "System Preferences > Security & Privacy > General". There might be a discreet note in the lower part of the window saying that kernel extensions from the developer Oracle could not be loaded and an option to whitelist them by clicking on the "Allow" button. Done! :)

UmkaDK /
Last active Nov 4, 2016
Reclame space used up by Docker on macOS
#!/usr/bin/env bash
echo "Removing unused containers ..."
docker ps --filter status=dead --filter status=exited -aq | xargs docker rm -v
echo "Removing unused images ..."
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs docker rmi
UmkaDK / unaccent.sql
Last active Nov 4, 2016
Duplicates musicbrainz_unaccent functionality using the built in pgsql unaccent extension.
View unaccent.sql
* MusicBrainz ( comes with a custom unaccent pgsql extension (musicbrainz_unaccent).
* However, AWS PGSQL service does not include this extension and it can not be easilly added.
* The following code duplicates musicbrainz_unaccent functionality using the built in unaccent extension.
CREATE OR REPLACE FUNCTION musicbrainz_unaccent(txt text) RETURNS text AS $$
UmkaDK /
Last active May 15, 2019
A smooth StripTrailingSpaces() for VIM

I've been maintaining my own version of Strip Trailing Spaces function (attached at the bottom of this post) since I first started using vim. It grew out of a simple :%s/\s*$// and now includes a number of features:

  • it preserves search history and the last search string
  • it doesn't change editor's '', '. and '^ marks
  • it doesn't add a new jumplist and changelist record
  • it preserves editor's view and cursor position

However, over the years I've noticed that I never needed to undo the results of stripping trailing spaces from a file. In fact, I would go as far as to say that when undoing changes in a file, the function produces an understandable but somewhat undesirable cursor jump (to the top-most trailing space it strippes) which disrupts my work flow. So, I set about to exclude the results of this function from the undo history all together.

After reading [Restore the cursor position after undoing text change made by a script](

UmkaDK / TreeFind.vim
Last active Feb 3, 2019
Project structure discovery with Vim & NERDTree
View TreeFind.vim
" Return project's root directory
" This function is used to return current projects root directory, as
" determined by GIT or SVN, without changing vim's cwd.
" @param string a:1 A comma seperated list of files or directories, the
" presence of which can be used to identify the root directory of a project.
function! UmkaDK#GetProjectRoot(...)
You can’t perform that action at this time.