404 error on custom wordpress form

Submitting a custom wordpress form was generating a 404 not found error.
After some quick googling I found the reason was because I had a form field which was named "name". Apparently this was interfacing with wordpresses internals. Once I changed it everything worked flawlessly.

http://wordpress.org/support/topic/404-pops-after-custom-form-submission-by-post

force generate image styles/image cache on the fly

image_cache(drupal 6) which is now part of core in drupal 7 provides the ability to generate images on the fly. This is great, It allows us to resize, scale images and apply different types of effects on the fly. However the images are not actually created until the resource is specifically requested by the browser. This created a problem for me when generating a pdf with a style whose images were not yet created. While trying to load the images for the pdf I realized that the images didn't exist at this point.

fatal error: Uncaught exception ... BadMethodCallException

I'm diving in Zend Framework 2. The is a skeleton application available to get up and running quickly. This is never a good way to learn. So I decided to bootstrap and configuration the framework myself. I during the bootstrapping phase I get getting the following error. PHP Fatal error: Uncaught exception 'Zend\\Stdlib\\Exception\\BadMethodCallException' with message 'The option "module_path" does not have a matching setModulePath setter method which must be defined' in

Installing spotify on Ubuntu 12.04 and 12.10

I was a big fan of rhapsody until lately. After 4 years with the service I became unhappy with the lack of support for other systems. Being a Web developer, I found myself  using OSX, Linux a majority of the time. With no native support on these system I started looking for alternative. It took a while but the alternative I came across was Spotify.

Installing spotify on linux was a piece of cake.

Programmatically create a profile with the profile2 module in drupal

I was recently using the profile2 drupal module and needed to create a profile in code. To do this we need 2 functions. profile2_create() and profile2_save()
//the user key can be a user object or the uid of the user //type is the machine name of the profile $profile = profile2_create(array('user' => 251, 'type' => 'main')); // populate some of the fields that are attached to the profile $profile->field_firstname['und'][0]['value'] = 'John'; //save the profile profile2_save($profile);

Installing kcachegrind, qcachegrind Snow Leopard

Installing qcachegrind the Mac OSX version of kcacheqrind is very simple to do. 
I followed a great tutorial that I found at http://langui.sh/2011/06/16/how-to-install-qcachegrind-kcachegrind-on-mac-osx-snow-leopard/.

Step 1 - Install QT

I decided to install it manually. I dowloaded and installed qt-mac-opensource-4.8.3.dmg from this page

Installing nginx on centos

Remove all previously installed version of php and centos.
Sudo yum remove http* php* Before we install it, we need to add the epel repo and the remi repo to get php-frm because it is not available from the default repo. Grab the latest epel release from the repo "http://dl.fedoraproject.org/pub/epel/6/x86_64/" wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm #now we can locate the repo definitions

Pages