Some quick tips

Find and replace text within all files within a directory find PATH_TO_DIRECTORY -type f | xargs perl -pi -e ‘s/SEARCH_KEYWORD/REPLACE_KEYWORD/g’ Find a text in files in a directory and subdirectories find PATH_TO_DIRECTORY -exec grep -l ‘SEARCH_KEYWORD’ {} \; Find all modified file in last few …

Webpage screen capturing using khtml2png

Webpage screen capturing using khtml2png

Recently, we were working on one PHP project, where we required to have “webpage screen capturing” functionality. I googled and found some tools… some window based, some paid… obviously I was looking for *FREE* tool . As we are working on Lamp (Linux, Apache, MySQL …

Open training program at Lamp

Hello all, Finally we started our first “open training program” at Lamp, Surat. We were having training programs every first and third saturday, but as time passed, people lost interest. So, we decided to invite outside people (who are ready to learn new things) to …

Multilingual support in PHP website

Multilingual support in PHP website

So many developers thinks that its hard to provide multilingual support to website. Are you one of them? No problem. Here are some helpful tips to provide basic multilingual support for you website. There are 3 different cases CASE#1 Provide multilingual to static contents of …

Is there a way to change YouTube player skin?

Many of you have tried embedding YouTube video in webpage using EMBED tag. It’s very easy. Just copy the code and paste it in webpage, it will start streaming video. You may think, what’s new here? Yes, you are right there is nothing tricky here. …

Use a CDN to improve your website’s performance

“80-90% of the end-user response time is spent downloading all the components in the page: images, stylesheets, scripts, Flash, etc. Rather than starting with the difficult task of redesigning your application architecture, it’s better to first disperse your static content. This will achieves a bigger …

Book Review: High Performance Web Sites – Steve Souders

High Performance Web Sites by Steve Souders is one of the most important books front end engineers should read to be able to develop a proper web sites. In 14 chapter, you will know 14 of the best tips to enhance the performance of your …

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 <? …

Add a user to a group under Linux operating system

One can use useradd or usermod commands to add a user to a group. useradd command creates a new user or update default new user information. usermod command modifies a user account i.e. it is useful to add user to existing group. There are two …

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”);&lt/script> will return “mail.google.com”