Pages

Your Ad Here

This Blog is not to read or go through

because, I have never been such a mess


Search the blog instead

Wednesday, May 25, 2011

SSH Socks Proxy


$ssh -D 9999 username@ip-address-of-ssh-server


Listens to Port 9999 and tunnels the connection via the ssh-server connected

Tuesday, May 17, 2011

base_url() function for php



function base_url(){
    $pathinfo = pathinfo($_SERVER["SCRIPT_NAME"]);
    $dirname = $pathinfo["dirname"];
    if($_SERVER["HTTPS"] == "on"){
    $protocol = "https";
    }else{
        $protocol = "http";
    }
    $base_url = $protocol."://".$_SERVER["HTTP_HOST"].$dirname."/";
    return $base_url;
}

Thursday, May 12, 2011

Thursday, January 6, 2011

Adding network printer in linux

$ lpadmin -p some-printer-name -E -v ipp://network-ip-address/printers/printer-name

forexample
$ lpadmin -p LBP3050_on_server -E -v ipp://192.168.144.1/printers/LBP3050

Local printer alias - LBP3050_on_server
Server 192.168.144.1
Server Printer - LBP3050

Friday, July 30, 2010

Google Chrome - Your Profile could not be opened correctly ...

You might have encountered this issue.  Well I did too. Here is a solution I found and posted to the Google Discussion Thread on this same issue.
http://www.google.com/support/forum/p/Chrome/thread?tid=08e9aa36ad5159cb&start=40

So, here is what happened in my case.


I have been using Ubuntu Hardy 8.04 and Google Chrome 5.0.375.70
...

After facing similar problem, I tried as said above in the discussions and also at the Ubuntu Forums page mentioned here.

However, I could not make it solved, and the message saying 'Your profile could not be opened correctly' popped every time I restarted my browser.
....

So, I checked each single file, in the following order inside the directory ~/.config/google-chrome/Default
1) databases (dir)
2) Local Storage (file)
3) Web Data(file)

and on my third trial, I just found it working without the pop up.

Hence, according to my findings, its the 'Web Data' file which when removed I got the problem solved.
......................

Further,
I could not find my saved passwords restored still.

Any suggestions will be highly appreciated.

Friday, July 16, 2010

VIM Editor - Search and Replace

  • /searchkey - search something
  • :[range]s/search/replace/ - replace something within range
  • :8,10 s/search/replace/g  - replace something within range
  • :%s/search/replace/g - replace something full document
  • :%s/search/replace/gc.  - prompt

Wednesday, July 14, 2010

PHP Jabber Web Chat

Searched a LOT And LOT and finally found one.


PHP/Ajax based Jabber Web Chat Client.


http://blog.jwchat.org/jwchat/
Your Ad Here