Archive for October, 2011

Grep To Find Code

Wednesday, October 12th, 2011

Find code by using grep

The command line utility grep can be used to find specific code in files. I needed a way to find code snippets recently while designing a magento shopping cart. The documentation for magento is sparse.

Grep enabled me to find specific code and output the exact file name and its location. With grep, I was also able to find the exact line number for the code.


Tags: , , , , , , ,
Posted in Tips & Tricks | No Comments »

JavaScript Replace Text

Wednesday, October 5th, 2011

Find and replace Text using JavaScript

JavaScript can be used to replace text dynamically. JavaScript can eliminate the reloading of a page to replace text on the server side. JavaScript DOM objects can be utilized to find and replace text.

Specific identifiers will be used to speedup the process of finding and replacing text. Tips from the regular expressions article will be used to find specific text.


Tags: , , , , ,
Posted in Tips & Tricks | 1 Comment »