Recent Updates RSS Toggle Comment Threads | Keyboard Shortcuts

  • Purab 7:14 AM on January 22, 2010 Permalink | Reply
    Tags:   

    How to append html end of body tag 

    I created the following script putting the html at the end of body tag.
    If you are using or following web 2.0(Table less HTML) standards for creating the HTMLs then this script will work 100%
    Just Put this script in your HTML and see the html source. You will able to see the div id named “purab” with the test content.
    <script type=’text/javascript’>
    var purab = document.createElement(‘div’);
    purab.id = ‘form_purab’;
    var all_divs = document.getElementsByTagName(‘div’);
    if (document.body.firstChild){
    document.body.insertBefore(purab, all_divs[all_divs.length] );
    } else {
    document.body.appendChild(purab);
    }
    var oldHTML = document.getElementById(‘form_purab’).innerHTML;
    var newHTML = “test content”;
    //document.getElementById(‘form_purab’).innerHTML = newHTML;
    var all_divs = document.getElementsByTagName(“div”);
    //alert(all_links[all_links.length - 1].innerHTML);
    all_divs[all_divs.length - 1].innerHTML = newHTML;
    </script>

    Have fun!

     
  • Purab 7:07 AM on January 22, 2010 Permalink | Reply
    Tags:   

    How to change the time zone on linux box 

    Please use following commands for changing the timezone.

    [root@ip-purabk-pc purab]# date
    Fri Jan 22 06:35:11 MST 2010

    [root@ip-purabk-pc purab]# ln -sf /usr/share/zoneinfo/
    Africa/ Cuba GMT0 Japan Poland Universal
    America/ EET GMT-0 Kwajalein Portugal US/
    Antarctica/ Egypt GMT+0 Libya posix/ UTC
    Arctic/ Eire Greenwich MET posixrules WET
    Asia/ EST Hongkong Mexico/ PRC W-SU
    Atlantic/ EST5EDT HST Mideast/ PST8PDT zone.tab
    Australia/ Etc/ Iceland MST right/ Zulu
    Brazil/ Europe/ Indian/ MST7MDT ROC
    Canada/ Factory Iran Navajo ROK
    CET GB iso3166.tab NZ Singapore
    Chile/ GB-Eire Israel NZ-CHAT Turkey
    CST6CDT GMT Jamaica Pacific/ UCT

    [root@ip-purabk-pc purab]# ln -sf /usr/share/zoneinfo/EST /etc/localtime
    [root@ip-purabk-pc purab]# date
    Fri Jan 22 08:40:32 EST 2010
    [root@ip-purabk-pc purab]#

     
  • Purab 2:29 PM on January 21, 2010 Permalink | Reply
    Tags: ,   

    How we configure memcached on fedora with machine restart 

    First install the memcached on server- linux box
    # yum install php-pdo php-mcrypt squirrelmail php-pecl-apc php-xml php-gd php-devel php php-imap php-pgsql php-pear php-soap php-mbstring php-ldap php-mysql php-cli php-pecl-memcache

    Using this file you can change the cache and memory size.
    [root@Purabk-pc purab]# vim /etc/rc.d/init.d/memcached

    Aslo change the following file also. Do same setting in this file
    # /etc/sysconfig/memcached

    [root@Purabk-pc purab]# /etc/init.d/memcached restart
    Stopping memcached: [ OK ]
    Starting memcached: [ OK ]

    Following command will set command as wheneven machine reboots, memcached server will restart.

    [root@Purabk-pc purab]# /sbin/chkconfig memcached on

     
  • Purab 12:58 PM on January 14, 2010 Permalink | Reply
    Tags:   

    How to check the Linux OS version through command prompt 

    Use following Command:

    uname -a

    For more information you can check following page.

    http://www.computerhope.com/unix/uuname.htm

     
  • Purab 7:39 AM on January 8, 2010 Permalink | Reply
    Tags: ,   

    How to setup vnc-server on fedora 11 

    Use following steps

    [root@Purabk-pc purab]# yum install vnc-server
    Loaded plugins: refresh-packagekit
    Setting up Install Process
    Package tigervnc-server-1.0.0-2.fc11.i586 already installed and latest version
    Nothing to do

    [root@Purabk-pc purab]# vim /etc/sysconfig/vncservers

    In file use following lines (//PURAB IS MY USER NAME, YOU NEED TO USE YOUR USERNMAE)

    VNCSERVERS=”59:purab”
    VNCSERVERARGS[59]=”-geometry 1024×768 -nolisten tcp”

    Than set your password or change for VNC-viewer

    [purab@Purabk-pc ~]$ vncpasswd
    Password:
    Verify:

    Than Became root user
    [purab@Purabk-pc ~]$ su
    Password:

    Start the VNC server
    [root@Purabk-pc purab]# /sbin/service vncserver restart

    [root@Purabk-pc purab]# /sbin/chkconfig vncserver on

    Done!

    Now you can able to use your box from vnc viewer..

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
esc
cancel