Easy DNS Names for Virtual Hosts in Mac OS X

I got tired of manually inserting lines into my /etc/hosts file and decided to look for other solutions. The DD-WRT router has a DNSMAsq feature in which I list domains that are supposed to be internal domains to be resolved to its local IP. I still have to insert lines but now it’s more organized and better than seeing mumbo jumbo in your hosts file. Here are my steps: [gist][/gist] ...

April 28, 2012 · Batista Harahap

Hacking CodeIgniter for Persistent Timestamped Cache with Memcache

I’ve got myself a long title for a blog post this time. This post is exactly what the title says. Been twisting my head figuring out how to bypass CodeIgniter’s internal to hack CodeIgniter’s ability to do a persistent timestamped cache of generated HTML contents using Memcached. I couldn’t find any other way to speed up cached HTML content serving within the framework, so after a long talk with @chazzuka, I made the choice to skip framework. ...

February 2, 2012 · Batista Harahap

MongoDB With CodeIgniter

Today was started with a big curiosity towards Urbanesia’s recent performance drop. This week we discovered that although we have completely revamped our codes to hack CI to use MongoDB as its session storage instead of MySQL, we found that Memcache is the bottleneck. When I woke up today, I was devastated to know that it took at minimum 5.7 seconds to load any of our business profiles. So I went hunting for the source of this irritating loading time. The Memcache problem was because our Sofvia server is at its limit, we’ve pushed the CPU utilization to her max and Memcache is simply not getting enough CPU Power. The main cause is putting 2 Memcache instances in Sofvia which in turn made CPU utilizations soar. When Memcache was out of CPU resource, the server was on an endless loop with load averages sky rocketing to > 100. Reference is here. ...

December 30, 2010 · Batista Harahap

Coding with Code Igniter

Wow it’s been too long since I actually do any hands-on coding with PHP. This time I’m choosing Code Igniter as my framework of choice for an e-commerce project for one of Mediafusion’s client. [caption id=“attachment_287” align=“alignnone” width=“423” caption=“My Dreamweaver with CI Controller Codes”][/caption] After these past few weeks dwelling with complicated Java and all its glory, going back to my comfort zone, it felt great! I really feel that this is the right time to code in PHP again. It’s already giving me more coding confidence with Java. I mean if you’re stuck, go back to your roots and you might learn a thing or two to inspire you. ...

April 30, 2010 · Batista Harahap