Skip to main content

Posts

Showing posts from 2012

Consumer and producer

One of the great advantage of living in the digital age is that it is much more cheaper and easier to become a producer. And by producer I mean producing any kind of content at all. Not just films but also photos, writing and others.Almost any tom, dick and harry can pick up a computer, register himself on the internet and now he's a published writer read by hundreds or even millions or maybe nobody. Point being is that it is that much easier to put your ideas out there and effectively become a producer.But then there's another side of the coin. All these contents have to be viewed by someone, liked by someone,  shared by someone. So now it becomes a choice for every single person,  do I want to be a consumer or producer. And most of the time the easy choice is to just be a consumer. Just spend your eyeballs time. Just browsing around, reading around, sharing around. Sometimes even when you have this great idea you think would be good to publish and share with the world,  you …

Update to "Solat Malaysia"

Alhamdullillah finally I have done it. I have finally took enough time to upgrade the "Solat Malaysia" app to save the solat schedule for a whole month from e-solat.gov.my. So now it would update to the current day schedule even though the site is currently down (which it comes down a lot, and people start blaming the app for not updating). To be fair, it could be that the app was "part" of the reason the website kept on going down considering that there was thousands of "Solat Malaysia" users at least updating their app every single day (and every single solat schedule app that uses the same update model). It kept on going down so many times that I even though about proposing to JAKIM to let me have a go at properly setting up their server to cache, balance and handle such traffic for free. But never got round to that and finally just upgraded my own software to play nice instead.

Apart from the all important downloading the whole month schedule update, …

Using CTreeView with NestedSetBehavior in Yii

Getting this whole thing to work took me a few days of experimenting. Finally I've got it working. Posting it here hoping that it would save others some time and if I need it back in the future.

The Yii nested set behavior extension can be found at http://www.yiiframework.com/extension/nestedsetbehavior/.

Download the zip file and then extract it into the "app root"/protected/extensions/NestedSetBehavior folder. Make sure that the NestedSetBehavior.php can be found at "app root"/protected/extensions/NestedSetBehavior/NestedSetBehavior.php.

Then modify the model file which you want to use the behavior with. For example, I have a model Areas and the file "app root"/protected/models/Areas.php. Add to the mentioned file the following lines:
public function behaviors() { return array( 'nestedSetBehavior'=>array( 'class'=>'application.extensions.NestedSetBehavior.NestedSetBehavior', 'leftAttribute'=>&#…

Thoughts on Linus "F*ck you nvidia" video

I FINALLY took the time to actually see the whole video. And I find the whole video quite thought provoking. I would admit unabashedly that Linus is a hero for me. I look up to him and find the way he thinks to be interesting and worthwhile my time to actually get familiar with. That said, I'm going to talk about some of the highlights which I found interesting (apart from the f*ck nvidia part which I think is just Linus being Linus, not much to learn from there, except for maybe if I'm running Nvidia the company).

It is interesting for me that his level of programming is not just a passion and hobby thing, but all the way up to the level of a habit. He programmed a lot of his own tools. And Linux was originally written just because he couldn't afford Unix and he thought it wouldn't be very hard to write his own Unix. That is just awesome. And early on he would even program directly in machine code by doing the assembly by hand, and just output the machine code directl…

Where has the love gone?

I am a bit late about this as I have only read it on twitter a few minutes ago, but the case of Hamza Kashgari really makes me sad. My heart aches every time something like this happens and I feel so sorry for the state of the ummah currently. The man said a few things on twitter regarding the prophet, and now it seems that his life might be on the line.

It makes me sad whenever people make fun of the prophet, the muslims rather than teach how the prophet was really like and his contribution to their lives and in doing so makes them understand why it is so disrespectful to make fun of such a person, choose to collectively call for murder of these people. Early in the days of his da'wah, people made fun of the prophet in even worse way, they called him even worse things, they put trash in his path, they even flung camels dung and intestines on him while he prayed. But when he finally won the conquest of Mecca, did he do the same to the people who hurt him so? No, he forgave them. W…

Running Android SDK on Arch Linux x86-64

A funny thing happens once you've downloaded it. Running ./adb in the platform-tools folder will yield a command not found error. But it's right there in clear view. Why wasn't it found. The answer seems to be because the android sdk itself is only 32bit thus you would be required to enable the multilib repos. Follow the instructions here on the things you need to do after you have enabled multilib support, namely you need to install the multilib-devel package which would replace the base-devel package.

Ice Cream Sandwich on the cheap

My son keeps on playing with my htc phone until the batteries run dry. People can barely contact me because if my son answers the phone he doesn't want to pass it on to me. What's a techie to do? Why, get his son something else to play with of course.. :P So I scoured the low yatt plaza looking for something that would be cheap enough that if my son breaks it, I wouldn't mind, but fast enough that he can play his games on it. After searching high and low, the best I could find was the android pocket pc. It's basically just a very cheap android tablet that comes with a casing with a keyboard in it. Funny thing is, the keyboard is usb, the tablet only accepts mini usb (not even a micro usb) and so they also give an adapter from usb to mini usb. It costs rm 699 a pop. If it's still running by the year end, I'd consider that already as ROI. They claim the cpu is 1.5 Ghz and memory 1 GB. I haven't installed any diagnostics software to make sure, but the internal…