Onur Özgür ÖZKAN

Php, Ruby, Kebab, Git Geek

Zen Coding for Gedit

Zen Coding is powerful abbreviation engine which allows you to expand expressions into HTML code. The hint of zen coding is using css selectors to generate code which is pretty cool like access the dom elements.

Install Sun Java JDK on Ubuntu

I usually use open source software but sometimes we haven’t choice. When i started to use PhpStorm IDE, i got notification over Performans Issue over Open JDK. Yes i also don’t believe it. PhpStorm offered me that Sun JDK instead of Open JDK. So i decided that switch Sun JDK. This short post is helped us how to install Sun JDK on Ubuntu.

Set the Default Browser on Ubuntu From the Command Line

Open your terminal

1
sudo update-alternatives --config x-www-browser

Choice your browser

1
2
3
4
5
6
7
8
9
There are 2 choices for the alternative x-www-browser (providing /usr/bin/x-www-browser).

  Selection    Path                    Priority   Status
------------------------------------------------------------
* 0            /usr/bin/google-chrome   200       auto mode
  1            /usr/bin/firefox         40        manual mode
  2            /usr/bin/google-chrome   200       manual mode

Press enter to keep the current choice[*], or type selection number:

Thats all.

Rails 3.1 and ExecJS::RuntimeUnavailable Error

When i start the rails server

1
rails server -b 0.0.0.0 -p 3000 -e development

I get the

1
2
/gems/execjs-1.2.4/lib/execjs/runtimes.rb:45:in `autodetect': Could not find a JavaScript runtime. See
https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

Configure Hostname on Ubuntu

1
sudo hostname your-hostname

Add 127.0.0.1 your-hostname

1
sudo nano /etc/hosts

Write your-hostname in

1
sudo nano /etc/hostname

Verify that hostname is set

1
hostname

Best Regards.

Configure Timezone on Ubuntu

Time zone is very important at web applications. This is the solution to set up the servers.

1
2
3
sudo dpkg-reconfigure tzdata
sudo apt-get install ntp
sudo ntpdate ntp.ubuntu.com

Best Regards.

Github Repository Installer for Kebab Project

We support a lot of our customer project in these days. Installing and setting new kebab project and its vendors are become very boring. I decided to write a simple installer for this problem. If you want, you can also modified for your project. You can find the source code on Github. https://gist.github.com/1158767 . If the link is broken, please send me a comment.