Roman Dushko, Software Engineer


Apr 5

Git push to remote without creating local branch

Little extremely handy trick for Git. If you need to modify something quickly in some(-body’s) branch, e.g. in in open PR on GitHub, you don’t need to usually create your local branch mirroring the remote one, right? Instead, you just checkout into remote branch: git checkout origin/branch-name , do you fixes/changes, commit them and now, the tricky thing, how do you push? As simple …


Feb 8

How to specify custom ssh key while git clone from github

If you need to provide some custom ssh key while cloning your repository from github (or pulling, whatsoever), run this command: <br /> ssh-agent $(eval `ssh-agent -s`; ssh-add ~/.ssh/{your-custom-keyfile}; git clone{username}/{repo-name}.git .)<br /> Please note, you should replace `{strings}` with plain string values!
Jan 16

Bluetooth keyboard does not connect automatically to laptop with Mac OS Sierra

Not sure if it started after upgrade to the latest version of MacOS Sierra 10.12, but I feel like so. My laptop loses connection to wireless keyboard very often and does not reconnect automatically. Turning on and off does not help. I tried to find an explanation and possible solution, and the only hint I found was to re-connect the keyboard. This is how you do it: Call Keyboard preferences …



Oct 19

Functional approach in PHP

The code snippet below will only work in PHP-5.3+!. Isn’t it the famous functional programming with functions as first class citizens, closures and other functional bla-bla? <?php function one($a = 0) { return function(callable $b) use ($a) { return call_user_func($b, $a); }; } print_r(call_user_func(one(1), function ($x) { return $x + 4; } )); This was created just for fun. As you may …


Jan 5

[SOLVED] Upgrading from PHP 5.5 to PHP 5.6 on Ubuntu 12.04 LTS

Recently I had to upgrade PHP version on the build server based on Ubuntu 12.04 LTS to PHP 5.6 At that moment there was PHP 5.5 installed on the server. Everything should have been as easy and promising as described, for example, in this post. Yes, it was going well to the moment sudo apt-get dist-upgrade Then dpkg claimed unmet dependencies… You know, as usual. I decided — f…k …



Aug 27

Firefox Java Plugin — Debian Wheezy

By default Firefox has no Java plugin because of security issues. One can install plugin by following next steps: Exit Firefox browser if it is running Make directory if it does not exist -> /usr/lib/mozilla/plugins Make a symbolic link for file which resides in JRE directory, e.g.: sudo ln -s /usr/lib/jvm/jdk1.8.0_20/jre/lib/amd64/ …


Aug 27

Install proprietary Oracle JDK in Debian 7.0 Wheezy

This is a YAP (yet another post) about how one can manually install Oracle’s proprietary JDK/JRE version (in Debian 7.0 Wheezy as an example). First of all, download fresh version of JDK/JRE from the Oracle website. Copy archive to desired location, in the following example we will use /usr/lib/jvm as an installation source directory. Unpack the archive and run next commands: sudo …


May 16

Having error while trying use jqFileUpload with RequireJS?

Once upon a time, I needed to use jqFileUPload plugin (actually modified version which provides Angular’s directive around native jqFileUpload plugin). In the same time, my Angular-base project was configured to be used together with RequireJS. I spend few ours trying to figure out what I was doing wrong — why I was getting errors in my browser’s console. Those errors were about …


May 16

How to add role to the PostgreSQL

If you need have superuser access to PostgreSQL via command line psql utility, create needed username first: sudo -u postgres createuser NEEDED_USERNAME You will be asked whether role should be a superuser: Shall the new role be a superuser? (y/n) answer Y (yes) if so and hit Enter. Now you have NEEDED_USERNAME allowed to access databases as a superuser via psql.