How to reduce the size of JavaScript & CSS file?
Compress JavaScript / CSS file with the help of gzip:- With the help of php ob_start() function we can create gzip file for JavaScript. <?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], ‘gzip’)) ob_start(“ob_gzhandler”); else ob_start(); ?> We can use above code at the beginning of the JavaScript and <? …
How to get domain name from URL using javascript.
Use following javascript function to get domain name from URL. function fnGetDomain(url) { return url.match(/://(.[^/]+)/)[1]; } For ex: <script language=”javascript”>fnGetDomain(“http://mail.google.com/mail/?source=navclient-ff”);</script> will return “mail.google.com”
Edit whatever you want on any page – Images, Texts
>Open any web page, clear the address bar, and paste the code: javascript:document.body.contentEditable=’true’; document.designMode=’on’; void 0; and hit enter. Feel free to edit whatever you want on the page. With Firefox, you can even edit and save the modified pages to your computer.
How to mount external ntfs USB in RHEL?
>Follow the steps to mount external ntfs USB in RHEL or in any linux system. Get your kernel version: uname -r2.6.9-42.ELsmp (For my RHEL)……………..Install the package downloaded according to your kernel versionhttp://rpmfind.net/linux/sourceforge/l/li/linux-ntfs/rpm -ivh kernel-module-ntfs-2.6.9-42.ELsmp-2.1.20-0.rr.10.0.i686.rpm……………../sbin/modprobe ntfs (as root)……………..cat /proc/filesystems……………..Check volume names of your USB Drive.cat /etc/fstab………………Mount …
Export data to a CSV file using MySQL command prompt
> SELECT tableColumnName1, tableColumnName2 INTO OUTFILE ‘/path/to/file/data.csv’ FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘”‘ LINES TERMINATED BY ‘n’ FROM tableName; Access Denied Even if you have been granted the SELECT privilege, you will still need to be granted the FILE privilege, or else access will …

