Sunday, August 22, 2010


Share Orkut

Me and my friends have been fiddling with an idea of a 'Code Library' for a long time now. So I've finally decided to put some code together.

This site will be used as a code journal, till the final release is out. Request friends and folks to come out with ideas to improve the product and/or any of its features.

Saturday, November 21, 2009

Ubuntu & Chromium OS

Share Orkut

After Google recently announced their intention of developing their latest venture, the Chromium OS, as an open source project, it has lead to cheers from all corners. An example of this openness was given at the Ubuntu Developer Summit in Dallas.

Here is an interesting excerpt from the Canonical blog,

In the interest of transparency, we should declare that Canonical is contributing engineering to Google under contract. In our discussions, Sundar Pichai and Linus Upson made it clear that they want , wherever feasible, to build on existing components and tools from the open source community without unnecessary re-invention. This clear focus should benefit a wide variety of existing projects and we welcome it.

Something else that struck me on the issue is from this Chromium site,

You need to have Linux. We currently support the following:

  • Ubuntu (Hardy 8.04 or newer, Karmic 9.10 recommended)
  • An account with root access (needed to run chroot and modify the mount table)
  • Chromium prerequisites (needed to build a Chromium-based browser as part of building Chromium OS)

So, Google seems to be using a tried & tested platform as a foundation for their Chromium OS. The year 2010, seems to be getting interesting, with Lucid Lynx & Chromium OS. At least, we get to spend some good time; before the Mayans get the better of us, two years later.

Sunday, November 15, 2009

LAMP server on Ubuntu

Share Orkut

If you want to have a LAMP server on your Ubuntu machine, but found if difficult to install the different components seperately, the geeks (developers) at Ubuntu have literally made it as good as spoon-feed. For the un-initiated, LAMP is a software bundle for Linux, consisting of Apache HTTP server, MySQL (database component), PHP (for scripting).

The result of their efforts is the following command,

sudo apt-get install lamp-server^

Note: The carrot is not a typo-error, its part of the command. It refers to the 'Tasksel packages' for different tasks. If you need to see the complete list type "sudo tasksel" in the console.

Follow the onscreen instructions, you will be prompted to confirm all the packages, reply with 'YES'. While the installation is halfway, you will be prompted to chose a password for the root user on the MySQL database. Enter your password and confirm it.

Thats it, the install is done; now for the configuration part.

1] Apache2: Open "http://localhost/" in a browser window, if you see a page with "It Works" written on it; then you apache2 installation has succeeded.

Open a terminal window, and paste the following into it, to open up apache2.conf;
sudo gedit /etc/apache2/apache2.conf

add an entry to the end of the file; ServerName (you will have to replace

2] PHP: Open a console, and type
sudo gedit /var/www/phptest.php

here, enter the following code in the gedit document,

<? php phpinfo(); ?>

restart apache2 with the following command
sudo /etc/init.d/apache2 restart

Now open your browser to "http://localhost/phptest.php"; if your PHP install was succesful, this page will list out the details of the PHP installation.

3] MySQL
Open the MySQL configuration,
sudo gedit /etc/mysql/my.cnf

Make sure the following setting is proper.
bind-address =

(This is an optional step)
Installing phpMyAdmin
sudo apt-get install libapache2-mod-auth-mysql phpmyadmin

Follow the onscreen instructions to complete the install, you can access it at "http://localhost/phpmyadmin/"

Finally restart the apache2 server;
sudo /etc/init.d/apache2 restart

There you go, your machine is up and running

Friday, November 13, 2009

GO - A brand new programming language from Google

Share Orkut

Big news for developers out there: Google has released a new, open source programming language, Go. Go, is currently experimental, and it combines the performance and security benefits associated with using a compiled language like C++ with the speed of a dynamic language like Python. The official mascot of Google Go is a nice little Gopher.

Here’s how Google describes Go in its blog post:

Go attempts to combine the development speed of working in a dynamic language like Python with the performance and safety of a compiled language like C or C++. In our experiments with Go to date, typical builds feel instantaneous; even large binaries compile in just a few seconds. And the compiled code runs close to the speed of C. Go is designed to let you move fast.

We’re hoping Go turns out to be a great language for systems programming with support for multi-processing and a fresh and lightweight take on object-oriented design, with some cool features like true closures and reflection.

For more details check out

Here's a sample of the 'Hello, World' program:
package main

import "fmt"

func main() {
fmt.Printf("Hello, 世界\n")

Wednesday, November 11, 2009

Fix the Monitor from xorg.conf

Share Orkut

Most Linux distros have some sort of control centres from where we can change display settings and make it optimum for our monitors or graphics cards. Sadly sometimes we come across a distro which doesn't support the resolutions native to our card or monitor, in such cases we can directly modify the 'xorg.conf' file which is responsible for the changes in the display.

Before you proceed, back up your old 'xorg.conf'

$sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup

Now, open up 'xorg.conf' in any text editor you have, I'll use gedit for this example.

$sudo gedit /etc/X11/xorg.conf

Here's an example xorg.conf file from my machine, only the section corresponding to the monitor is shown

Section "Monitor"
Identifier "0-CRT1"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
Option "PreferredMode" "1280x1024"
Option "TargetRefresh" "60"
Option "Position" "0 0"
Option "Rotate" "normal"
Option "Disable" "false"

Take care before you change any value, its very tempting to try a high resolution, but it might damage your monitor permanently, so always get the specs right from the manufacturers before you change any value.