[centos] yum update fails with Protected multilib versions: systemd-libs-219-42.el7_4.4.i686 != systemd-libs-219-30.el7_3.6.x86_64

With the following error, the issue might be with the rdma package, to fix it run:

yum update rdma-core.x86_64 && yum update

Source: https://www.centos.org/forums/viewtopic.php?t=64509


phantom This application failed to start because it could not find or load the Qt platform plugin “xcb”.

If you encounter this issue, it’s a bug in phantomjs that prevents it from working properly when QT_QPA_PLATFORM environment variable is set.

The best way to solve this issue is to upgrade to the newest phantom, but if you cannot do it, you can unset the variable:
or give it an empty value, e.g.:

If you don’t want to type the command every time, you can one of the above to .bashrc or .profile

Here’s one of the related issues on GitHub: https://github.com/ariya/phantomjs/issues/14061

PostgreSQL on Fedora: psql: FATAL: Ident authentication failed for user “username”

Usually, to add a user to postgres, you have to run psql as user postgres and create user as such.

On Ubuntu it’s enough to let you log in as a newly created user to the DB, but it’s not enough on Fedora. Here psql responds with the error from the subject.

To fix it add the following line to pg_hba.conf (on F23: /var/lib/pgsql/data/pg_hba.conf):

local   all             all                           md5

Line above is for socket configuration. If you need IP access too, add:

host    all             all       md5

Pushing to gerrit error: unpack failed, fatal: Unpack error, check server log

If you encounter a/m error, consider adding --no-thin to the command as follows:

git push --no-thin origin HEAD:refs/for/master

Taken from:


Basic auth construction using groovy and apache commons

import org.apache.commons.codec.binary.Base64
public static String getAuthentication(String login, String password) {
    String content = Base64.encodeBase64String("$login:$password".bytes)
    return "Basic $content"

Git: generate and apply patch from commit


git format-patch -n commit-id

$ git format-patch -1 HEAD
$ git format-patch -2 86c5960


git am < patch

More: http://stackoverflow.com/questions/6658313/generate-a-git-patch-for-a-specific-commit


importing eclipse android (ADT) project to Android Studio

  1. In eclipse: generate gradle build files (via export -> android). Details: http://developer.android.com/sdk/installing/migrate.html
  2. In console:

    • change gradle version in gradle/wrapper/gradle-wrapper.properties to 1.9
    • change plugin version to 0.7 in build.gradle

    Details: http://stackoverflow.com/questions/19485981/unable-to-import-eclipse-project-to-android-studio

  3. Import into Android Studio