Wednesday, November 14, 2012

Augmented Reality with Layar

Start developing the Layar APP following the tutorial from

In the test page by default the Layar API is set to 3.0, which will not work with the supplied tutorials.
Change the API to 5.0 to work without error.

Excellent third party tools for Layar is available at

Drupal Extension for LAYAR

Right now struggling with the customised CIW for Layar App.
I have uploaded the custom icons for the CIW as per the recommendation, but it is not showing up anywhere.(

Wednesday, June 13, 2012

How to reset MySQL password?

Following this procedure, you will disable access control on the MySQL server. All connexions will have a root access. It is a good thing to unplug your server from the network or at least disable remote access.

To reset your mysqld password just follow these instructions :
  • Stop the mysql demon process using this command :
<![if !supportLists]>o                     <![endif]>   sudo /etc/init.d/mysql stop
  • Start the mysqld demon process using the --skip-grant-tables option with this command
<![if !supportLists]>o                     <![endif]>   sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &
Because you are not checking user privs at this point, it's safest to disable networking. In Dapper, /usr/bin/mysgld... did not work. However, mysqld --skip-grant-tables did.

  • start the mysql client process using this command

<![if !supportLists]>o                     <![endif]>   mysql -u root
  • from the mysql prompt execute this command to be able to change any password
<![if !supportLists]>o                     <![endif]>   FLUSH PRIVILEGES;
  • Then reset/update your password
<![if !supportLists]>o                     <![endif]>   SET PASSWORD FOR root@'localhost' = PASSWORD('password');
  • If you have a mysql root account that can connect from everywhere, you should also do:
<![if !supportLists]>o                     <![endif]>   UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';
  • Alternate Method:
<![if !supportLists]>o                     
<![endif]>   USE mysql
<![if !supportLists]>o                     <![endif]>   UPDATE user SET Password = PASSWORD('newpwd')
<![if !supportLists]>o                     <![endif]>   WHERE Host = 'localhost' AND User = 'root';
  • And if you have a root account that can access from everywhere:
<![if !supportLists]>o                     <![endif]>   USE mysql
<![if !supportLists]>o                     <![endif]>   UPDATE user SET Password = PASSWORD('newpwd')
<![if !supportLists]>o                     <![endif]>   WHERE Host = '%' AND User = 'root';
For either method, once have received a message indicating a successful query (one or more rows affected), flush privileges:
Then stop the mysqld process and relaunch it with the classical way:

sudo /etc/init.d/mysql stop

sudo /etc/init.d/mysql start
When you have completed all this steps ,you can easily access to your mysql server with the password you have set in the step before. An easy way to have a full control of your mysql server is phpmyadmin (, software made in php that can give you a web interface that can be very usefull to people that havent got a lot of confidence with bash .To install phpmyadmin on you server you will need to have 4 things:
  • web server apache
  • php
  • mysql server/mysql client installed
  • php_mysql support for apache

  • All packages can be found browsing synaptic.

    Tuesday, May 29, 2012

    Adding Alias to Xampp / Add alias folder

    The first thing you have to do is add an alias directory to your XAMPP install. If you’re running Windows, create the following folder.
    Next, you’ll need to modify your Apache configuration file. You can find it under C:\xampp\apache\conf\httpd.conf. To make changes, you’ll need to edit it as an administrator. If you’re running Windows Vista or Windows 7, your best bet is to open Notepad as an administrator and then open httpd.conf. To open Notepad (or any other application) as an administrator, right click on it and select “Run as administrator”.
    Once you’ve opened httpd.conf, add the following to the end and save it.
    Include "conf/alias/*"
    Now Apache will look in the alias folder for additional configuration files. This way all you have to do to add an alias is add a new alias configuration file to the alias folder.
    Let’s do that now. Suppose you want to add an alias called “dev”. First, download this alias template file and place it in the alias folder. Rename it to “dev.conf” (or whatever you’re alias is called). You’ll need to edit the template (again, as an administrator) and replace “DIRECTORY” (it’s there twice) with the path to the alias and “ALIAS” with the name of your alias. In our example, it looks something like this:
    <Directory "C:\users\foo\programming\dev">
        # Possible values for the Options directive are "None", "All",
        # or any combination of:
        #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
        # Note that "MultiViews" must be named *explicitly* --- "Options All"
        # doesn't give it to you.
        # The Options directive is both complicated and important.  Please see
        # for more information.
        Options Indexes FollowSymLinks Includes ExecCGI
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        AllowOverride All
        # Controls who can get stuff from this server.
        #     Order allow,deny
        Allow from all 
    Alias /dev "C:\users\foo\programming\dev"
    Restart Apache (you can do so from the XAMPP control panel) and check out http://localhost/dev

    Tuesday, May 15, 2012

    How to create and extract zip, tar, tar.gz and tar.bz2 files in Linux


    To compress a directory with zip do the following:
    # zip -r directory_to_compress
    Here’s how you extract a zip archive:
    # unzip


    Tar is probably the Linux/UNIX version of zip – quick and dirty.
    # tar -cvf archive_name.tar directory_to_compress
    And to extract the archive:
    # tar -xvf archive_name.tar.gz
    This will extract the files in the archive_name.tar archive in the current directory. Like with the tar format you can optionally extract the files to a different directory:
    # tar -xvf archive_name.tar -C /tmp/extract_here/


    This format is my weapon of choice for most compression. It gives very good compression while not utilizing too much of the CPU while it is compressing the data. To compress a directory use the following syntax:
    # tar -zcvf archive_name.tar.gz directory_to_compress
    To decompress an archive use the following syntax:
    # tar -zxvf archive_name.tar.gz
    This will extract the files in the archive_name.tar.gz archive in the current directory. Like with the tar format you can optionally extract the files to a different directory:
    # tar -zxvf archive_name.tar.gz -C /tmp/extract_here/


    This format has the best level of compression among all of the formats I’ve mentioned here. But this comes at a cost – in time and in CPU. Here’s how you compress a directory using tar.bz2:
    # tar -jcvf archive_name.tar.bz2 directory_to_compress
    This will extract the files in the archive_name.tar.bz2 archive in the current directory. To extract the files to a different directory use:
    # tar -jxvf archive_name.tar.bz2 -C /tmp/extract_here/


    Friday, November 11, 2011

    Install Bigbluebutton + PHP ( nginx + PHP+ red5 + freeswitch + tomcat)

    Install Bigbluebutton + PHP

    Install Ubuntu 10.04 server 32bit or 64bit (lucid / maverick)
    Note: natty will not work

    During installation select OpenSSH alone (Do not select Lamp or other server applications)
    Note: I selected both LAMP and OpenSSH, later stopped apache.

    After installation,

    Log in as administrator

    To install bigbluebutton

    wget -O- | sudo apt-key add –
    echo "deb bigbluebutton-lucid main" | 
    sudo tee /etc/apt/sources.list.d/bigbluebutton.list
    echo "deb lucid multiverse" | sudo tee -a /etc/apt/sources.list
    sudo apt-get install python-software-properties
    sudo add-apt-repository ppa:freeswitch-drivers/freeswitch-nightly-drivers
    sudo apt-get update
    sudo apt-get install bbb-freeswitch-config
    sudo apt-get install bigbluebutton
    sudo bbb-conf --clean
    sudo bbb-conf --check

    Default configuration of the Nginx server at
    sudo vim /etc/nginx/sites-available/bigbluebutton

    Root of Nginx server at

    cd /var/www/bigbluebutton-default

    Install fast CGI from


    PHP and nginx on Ubuntu

    I've now changed my slice from running apache to nginx. Here's the simplest way, in around 6 commands, to get PHP up and running via FastCGI.

    Install PHP 5:
    sudo aptitude install php5-cgi
    Install nginx:
    sudo aptitude install nginx
    Create PHP 5 FastCGI start-up script:
    sudo nano /etc/init.d/php-fastcgi
    Inside, put:
    PHP_CGI_NAME=`basename $PHP_CGI`
    start() {
          echo -n "Starting PHP FastCGI: "
          start-stop-daemon --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- $PHP_CGI_ARGS
          echo "$PHP_CGI_NAME."
    stop() {
          echo -n "Stopping PHP FastCGI: "
          killall -q -w -u $USER $PHP_CGI
          echo "$PHP_CGI_NAME."
    case "$1" in
          echo "Usage: php-fastcgi {start|stop|restart}"
          exit 1
    exit $RETVAL
    Make start-up script executable:
    sudo chmod +x /etc/init.d/php-fastcgi
    Launch PHP:
    sudo /etc/init.d/php-fastcgi start
    Launch at start-up:
    sudo update-rc.d php-fastcgi defaults
    That's it. All installed and ready to go.


    Change server config at /etc/nginx/sites-available/bigbluebutton
    location ~ \.php$ {
        fastcgi_index   index.php;
        fastcgi_param   SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;
        include         fastcgi_params;
    Restart nginx:
    sudo /etc/init.d/nginx restart
    Create a file in your web root (in the example above, /var/www/bigbluebutton-default/test.php):
    Visit the page in your browser and you should see the standard PHP info page. And you're done.
    Clean restart BBB
    sudo bbb-conf –clean

    Sunday, July 3, 2011

    View BigBlueButton's salt

    To view the bigbluebutton's salt

    Install GIT for Windows 7

    Git for Windows -- Download a Git repository using windows

    First install MySysGit on your windows machine
    Downloading and executing it will give you a working development environment and compile Git automatically!

    I installed it on the C: drive(C:\msysgit) on my machine. A git comandline interface willl open up as shown below.
    Navigate to the location where you want to download the repository.

    Eg: I like to download the repository to E:/bbb/github/

    So I used the command
    cd /E/bbb/github

    then give the command below to download the repository
    git clone git://