Installing gearmand, libgearman and pecl gearman extension for php from source in Debian 6 & 7

I had a pretty rough evening today. No, not because the waiter forgot to add sugar in my tea, but because it was so boring to go through the trial and errors of installing gearman daemon and pecl gearman extension for php. First I tried with the pretty-obvious-awe-fucking-some way. In above steps, “apt-get install gearman” … Continue reading Installing gearmand, libgearman and pecl gearman extension for php from source in Debian 6 & 7

Install and Run Symfony 2.3.6 projects in OpenShift instances in just one minute with this boilerplate repository

Okay, I have written an article 2 days ago where I went through every details. But today. I have created a blank symfony container with all the necessary deploy hook and mods so that you can get your symfony 2 project up and running in an openshift container within a minute, fully automated, seriously! Github … Continue reading Install and Run Symfony 2.3.6 projects in OpenShift instances in just one minute with this boilerplate repository

How to login a user programatically in Symfony2

Sometime, you may need to log in an user manually from code, instead of generic form based log in. To do it, you need to use Two Security component “UsernamePasswordToken” and “InteractiveLoginEvent”. We will also use another exception object “UsernameNotFoundException” if the user is not found. Now from your controller, you can login an user … Continue reading How to login a user programatically in Symfony2

Get a list of Top 10 authors in a WordPress blog, and sort them by firstname and last name

Getting top 10 authors’s list from WordPress is actually pretty simple with a SELECT query. Here is the SQL for that which sorts the list by number of posts of each authors And sorting this list by first name is pretty simple as well However, sorting that list by Lastname is a little tricky, we … Continue reading Get a list of Top 10 authors in a WordPress blog, and sort them by firstname and last name

Improving UX in the WordPress Admin Panel with Interactive Meta Boxes

Our goal is simple today, we want to add interactivity to our boring metaboxes. Instead of showing lots and lots of irrelevant input boxes at once, we will properly group them into different metaboxe containers and then display the required one based on the action of another one. We will create a custom post called … Continue reading Improving UX in the WordPress Admin Panel with Interactive Meta Boxes