Fix Java Unsupported major.minor version 52.0 on Ubuntu

Today when I run gradle test, I hit Unsupported major.minor version 52.0 error. It comes when you are trying to run a class compiled using Java 1.8 compiler into a lower JRE version e.g. JRE 1.7 or JRE 1.6. Simplest way to fix this error is install the latest Java release i.e. Java 8 and run your program. The Ubuntu archives have multiple versions of OpenJDK available. One of these is designated as the default and this has the package names default-jdk and default-jre.

Enable Spark Context on Your Ipython Notebook

When you’re trying spark with its python repl, it’s really easy to write stuff using simple function or lambda. However, it will be a pain in te ass when yoo’re starting to try some complex stuff because you could easily miss something like indentation, etc. Try running your pyspark with this command IPYTHON_OPTS="notebook" path/to/your/pyspark It will start an IPython Notebook in your browser with Spark Context as sc variable. You

Fix GDM Service Can't be Enabled on Arch Linux

Today I just changing my desktop environtment from XFCE to Gnome 3. However GDM service always failed to be enabled. Everytime I ran sudo systemctl enable gdm, it always return Failed to execute operation: File exists. This caused by another display manager still enabled, but I don’t know which one. Fortunately, running sudo systemctl enable gdm -f will force GDM to be enabled and another display manager will be disabled. Removed symlink /etc/systemd/system/display-manager.service.

Remove Entry from Known Host

Sometimes I am moving my domain from one server to another and facing this problem Add correct host key in /home/rezha/.ssh/known_hosts to get rid of this message. Offending key in /home/rezha/.ssh/known_hosts:60 RSA host key for has changed and you have requested strict checking. Host key verification failed. I am just too lazy to find line 60 of known_host I ended up deleting the entire known_host. Use this command to

Installing or Upgrading PostgreSQL 9.4 on Ubuntu 14.04

I am currently having a side project that requiring JSON Blob feature on PostgreSQL 9.4. But Ubuntu 14.04 only delivering PostgreSQL 9.3 on their repositories. Now I’ll posting step by step how to install or upgrade if you already using PostgreSQL 9.3 on ubuntu 14.04 to PostgreSQL 9.4.