A web developer's blog. PHP, MySQL, CakePHP, Zend Framework, Wordpress, Code Igniter, Django, Python, CSS, Javascript, jQuery, Knockout.js, and other web development topics.

Monthly Archives: October 2007

A Better Font for Programmers

Here is an interesting find. Someone blogged about a better programmer’s font. Like him, I have been using Courier New for years now. But this guy found a better alternative. It’s more compact and a lot more readable. It really … Continue reading

Posted in General | Tagged | Leave a comment

Simple CAPTCHA Tutorial with Zend Framework

UPDATE 2008-10-24 This guy has an updated post for Zend_Captcha. Mine is old an out-dated. Here is how to create a simple Captcha image with the Zend Framework. I have created this controller named: ImagegeneratorController. The job of this controller … Continue reading

Posted in General | Tagged , , | 43 Comments

Design Trance puts on its halloween costume

Design trance has puts on its halloween costume. I love it. Fire and it’s black. m/  (^_^)  m/.

Posted in General | Tagged | Leave a comment

MyLyricsFinder.com: Caching MySQL Queries

It is Saturday night and it is raining like it hasn’t rained in weeks. So I decided to spend the night to work on my pet project: MyLyricsFinder.com. It uses the Zend Framework. The latest addition tonight is Zend_Cache. I … Continue reading

Posted in General | Tagged , , , , | Leave a comment

I’m a Yahoo! Power Mailer!

When I logged in today, I found this: Pretty cool. I can now send up to 20MB! Anyways, here are the details: What is the Power User program? As one of the few in our Power User program, you can … Continue reading

Posted in General | Tagged , | 1 Comment

Get Difference Between 2 Dates Using PHP

Here is how to get the difference between two dates in PHP. … public static function toTimestamp($date){ $arrayDate=self::toArray($date); return mktime($arrayDate[’hour’],$arrayDate[’minute’],$arrayDate[’second’],$arrayDate[’month’],$arrayDate[’day’],$arrayDate[’year’]); }   public static function dateDiff($date1,$date2,$unit=’HOUR’){ $date1=self::toTimestamp($date1); $date2=self::toTimestamp($date2);   $secs=$date1-$date2;   switch(strtoupper($unit)){ case ‘WEEK’:return $secs/60/60/24/7; break; case ‘DAY’:return $secs/60/60/24; break; … Continue reading

Posted in General | Tagged , | Leave a comment

AJAX and PHP

Here is an excerpt from a book – Beginning Ajax with PHP: From Novice to Professional. While the concept of Ajax contains a handy set of functionality for creating actions on the fly, if you are not making use of … Continue reading

Posted in General | Tagged , , | 2 Comments

Subversion Crash Course

I have been using Subversion for almost a year now but I still only know the basics. Add-update-commit, that’s pretty much about it. But lately, I encountered something while coding pet project called MyLyricsFinder.com – I got conflicts. I had … Continue reading

Posted in General | Tagged | Leave a comment

Linux Graphical Vi Cheatsheet

I got this from linuxscrew.com. Just click the thumbnail below.

Posted in General | Tagged , , | Leave a comment

Useful PHP Regular Expressions: For usernames, emails, ip address and more

Here are eight examples of practical PHP regular expressions and techniques that I’ve used over the past few years using Perl Compatible Regular Expressions. This guide goes over the eight different validation techniques and describes briefly how they work. Usernames, … Continue reading

Posted in General | Tagged | 1 Comment