Latest articles under Quick Tips category

Adding new lines to beginning of files.

I needed to do this when I want to debug my scripts for memory usage. My problem at that time was that as I include libraries, for some reasons PHP uses more memory even though I haven’t run a single code (other than require_once). So my idea is to add memory_get_usage() function call on the […]

Posted on May 5th, 2009 under General Unix, Quick Tips  •  No Comments

Split screen in vi

This is pretty simple to do. It’s also very usable if you just want to compare 2 files or different sections on the same file. Here’s what you do while in vi or vim. Split screen horizontally :split The above code will split vi horizontally like the screenshot below. You can also supply an optional […]

Posted on February 17th, 2009 under Quick Tips  •  14 Comments

Keep replication in mind when writing SQL code.

This is something I got "bitten" once, especially if you have a development server with its own database not replicated and production database is replicated. That slight difference is enough to cause production problems that may not be noticeable days after production release. As a wise man say: When programming SQL statements, be mindful of […]

Posted on February 8th, 2009 under General SQL, Quick Tips  •  No Comments

Customizing grep tool to exclude svn.

I mostly do programming by SSH-ing to development server. The code I’m working on are often managed by using SVN. There are many occasions when I need to search all source code to find a particular string. If you’ve worked on a source code that’s managed by SVN before, you’ll pretty soon notice that there […]

Posted on February 4th, 2009 under General Unix, Quick Tips  •  No Comments