How to debug plugin activation errors in WordPress

If you have ever developed a plugin for WordPress you may remember seeing one of those unhelpful messages saying your plugin generated N characters of unexpected output.

The problem with those messages, apart from not knowing what exactly is what your plugin generated, is that sometimes the errors are not easy to reproduce. You go to your Plugins section, deactivate the plugin in question, try to activate it again and now all you see is “Plugin activated”, no errors.

The last time that happened to me I decided I wanted to see the content of those errors every time they occurred, and I came up with a solution to achieve just that. Is not pretty, but it works. Basically, I stop WordPress execution when this errors occur and show the output in my screen:

Continue reading

Control MPlayer using the mouse only

MPlayer is the only player I use. MPlayer supports almost any format you may need; if you want to watch a movie or show episode it has simple ui that let you do exactly that and no more, so no distractions. If you want to work on more complex tasks involving audio or video MPlayer and MEncoder also offer powerful features that I prefer not to discuss but that I encourage you to read about them if you’re interested.

One thing that was bothering me is that when I was watching a movie and I was away from my computer I had to go near the laptop to do things like pause the video or change the volume level. I could avoid this using a wireless keyboard but I don’t want to buy one. However, I do own a wireless mouse and it would be great to be able to use it to control MPlayer. Continue reading

Como escuchar la W Radio y Radioacktiva en tu PC

La W Radio y Radioacktiva son dos emisoras Colombianas que se pueden escuchar a través de internet desde sus respectivos sitios web. Sin embargo, sería conveniente poder escucharlas utilizando un software reproductor de audio cualquiera, sin necesidad de cargar en el navegador el sitio web de la cadena radial. En este post encontraran las URL de los streams de audio para las emisoras y unas breves instrucciones para escucharlas en Linux, utilizando MPlayer. Continue reading

How to add a subpages menu to WordPress pages

WordPress allows the creation of nested pages. That’s a great feature when you need to split a rather long content into several parts and give them some structure. However, the problem is you’ll have to manually add links to the additional pages in order to make it easy for the user to navigate through all the content. Wouldn’t it be great if you could automatically add a menu, right inside the content of your pages, with links to the subpages or parent of current page? I think it would, and I’ll show you how… Continue reading

How to Install R in CentOS 5.6

R is in EPEL (Extra Packages for Enterprise Linux):

EPEL (Extra Packages for Enterprise Linux) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise Linux (RHEL) and its compatible spinoffs, such as CentOS and Scientific Linux.

As part of the Fedora packaging community, EPEL packages are 100% free/libre open source software (FLOSS).

All you need to install R is to add the EPEL repository and then install R the same way you do with any other package: Continue reading