Playlist MyTV untuk smart TV berserta intisari rancangan bermula RM4.99 sebulan. Selanjutnya →

Mac 2012

Bank Islam phishing site through e-mail

12 September 2011, 12:20 pm

Isnin, 12 September 2011, 12:20 pm0 This is one phishing mail I received today. If you hover the link, the URL seems correct, but you can’t fool me waltersgreenhouse.ca / rumahhawa.com, see the bottom left of the browser windows, it shows the link it’ll redirect you to. Don’t enter your info to that site!!! P/S: I […]

Singleton class

11 September 2011, 9:18 pm

Ahad, 11 September 2011, 9:18 pm0 This is continuation from singleton pattern post. Here’s the abstract class for singleton pattern, and other classes that need to be singleton just need to extend this class. We can’t directly use self::$instance = new self(); because self will refer to this singleton class itself, not the class we […]

Git basic

7 September 2011, 11:22 pm

Rabu, 7 September 2011, 11:22 pm0 I’m a noob in using Git, and I’m using Github to host some of the code I wrote. Here are some basic commands to host a project with Github (or using Git revision control generally) (sometimes I forgot the command or the order of which command goes first) Global […]

GIMP Single Window Mode

6 September 2011, 3:33 pm

Selasa, 6 September 2011, 3:33 pm0 I’ve been using Gimp as my primary image editing software. I never used photoshop (and I don’t want to). The only thing that make using Gimp quite difficult is the user interface – the main application window is separated into 3 (sometimes 2) tiny windows. I used to promote […]

PHP timezone handling

5 September 2011, 1:11 pm

Isnin, 5 September 2011, 1:11 pm0 Within PHP app, we need to set the timezone to only one timezone – UTC. All timestamp data that going in and out of the database must use UTC timezone so that it’s easier to convert to other timezone value. It’s a basic in PHP script to first set […]

PHP async request with auth

5 September 2011, 12:07 pm

Isnin, 5 September 2011, 12:07 pm0 In http://stackoverflow.com/questions/962915/how-do-i-make-an-asynchronous-get-request-in-php, it shows how to send asynchronous request from PHP script, so that the webpage is immediately rendered without waiting the request to finish. This technique is important if you want to implement background processing in web app, just by send a request to own script that going to […]

PHP Templating

2 September 2011, 4:34 pm

Jumaat, 2 September 2011, 4:34 pm0 Here’s a simplified template class that was inspired by PHP Tip: Extract, Variable Variables and Templating. It supports template inheritance, it’s object oriented & got auto escaping variables. Furthermore, it doesn’t need to be compiled, since it’s using plain PHP The class: tpl.class.php This class is just a basic […]

Singleton pattern

2 September 2011, 2:36 pm

Jumaat, 2 September 2011, 2:36 pm0 Singleton class is class that allow only one instance of its class to be instantiated. A lot of examples I see the way to implement singleton pattern whether: 1. Extends a base singleton class 2. Each class apply singleton pattern (get_instance() method, has static $instance attribute) 3. Using registry […]

PHP Hooks System

2 September 2011, 11:19 am

Jumaat, 2 September 2011, 11:19 am0 After reading Explaining Hooks, finally I understand the concept of hooks in PHP and why people use it in WordPress and say WP codes is poetry. The general idea is, in a web application, during the runtime of the program it go through stages of processes, such as connecting […]