Friday, December 7, 2012

Install GUI in Ubuntu Server

First of all, make sure that you have enabled Universe and multiverse repositories in /etc/apt/sources.list fi.
After enabling, you need to use the following command to install:
sudo apt-get update
  • If you want to install GNOME desktop:

          sudo apt-get install ubuntu-desktop
  • If you want to install light weight desktop install xfce using the following command:

          sudo apt-get install xubuntu-desktop
  • If you want to install KDE desktop use the following command:

          sudo apt-get install kubuntu-desktop

Thursday, December 6, 2012

What is Node.js?

Node.js is a server-side JavaScript platform that consists of a very small core library. It runs on the top of V8 JavaScript engine which is Chrome's JavaScript runtime.

Node.js allows us to easily build fast, scalable network applications. From "":

"Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices."

JavaScript has come of age and it works really well on server side. JavaScript as a server-side platform supports continuous integration, continuous deployment, connections to relational databases, service-oriented architecture.

Node.js solves I/O bound problems which are alleviated by increased throughput in I/O such as disk, memory, and network bandwidth. Node.js provides a non-blocking I/O model using JavaScript. JavaScript is a single threaded language. When doing slow I/O operations such as reading a database, the program does not wait. Instead, it immediately continues to the next line of code. When the I/O operation returns, it triggers a callback function and the result can be processed.

Installing and Running CoffeeScript in Windows

Some web frameworks such as Ruby on Rails3 and the Play! framework4 support CoffeeScript by default. If you’re using such a framework, none of this installation is necessary; just place your .coffee files in the correct place and the framework will compile them for you.

Installation Steps
  • First of all, install Node.js from
  • Once the install is complete, you should be able to run Node.js from your terminal
    via node command.
    • node --help
  • The next step is to install coffee via Node.js supported NPM (Node's Package Manager). 
  • To install the coffee script module, use the following command:
    • npm install -g coffee-script
  • This will fetch the module and make it available via Node.js.
  • Open new command prompt and check if the coffee script is installed properly by using the following command:
    • coffee --help
  • Now you can save your coffee script code as .coffee file and run the files using the following command:
    • coffee
  • To compile the coffeescript into Javascript, use -c (compile) flag:
    • coffee -c
    • This generates a JavaScript file of the same name in the same directory, but with the .js extension.

What is CoffeeScript?

CoffeeScript is a wrapper written over JavaScript. CoffeeScript code is transcompiled directly into JavaScript code which leverage the ubiquity of the web browser, which is the widely used execution environment for JavaScript.

Now the question arises simply: Why write a language that’s simply a copy of another language?
  •  The primary purpose of CoffeeScript is to provide a simpler version of JavaScript. 
  • CoffeeScript aims to highlight and retain the fantastically powerful parts of JavaScript while and repairing its rough spots. 
  • It aims to be more expressive.