WordPress: Disqus Language

Update: Code on this post has been made into a plugin. Are you having problems to get the Disqus Comment System WordPress plugin to work with your site language (Arabic, French…). Here is the code you are looking for:

Drop this code in your theme functions.php file, in your custom plugin, or better yet: … Read more

Refactoring code with the command line (files, folders and possibly variables)

These are a few commands I use in situation where I can’t use Eclipse for refactoring my code, you can use them by replacing from and to with the names you want. No need to remind you to take backups to prevent irreversible loss of data. Rename files and folders

Rename variables

Rename … Read more

Git: How to revert changes in a single file or in all files

If you have modified or deleted a file by mistake on a git tracked project, you can still revert your action and reset the file like this: For a single file (file.txt)

For all files You may just want to revert all your changes altogether, to do so, fire this command:

Joomla 3.0 – Fix Application Instantiation Error

Joomla 3.0 Instantiation error

Everything went smoothly as usual in my local machine, but as soon as I moved the website to the client server, it wouldn’t run normally, instead it gives me the dreaded error message:

After a small search on Google, I found that all people were saying to check that the database connection credentials were … Read more

PHP: empty() is your friend

The right question is: Is it empty?

It’s easy to miss things that are very obvious, this is the proper way to check that a variable has a value that is not nothing (null, 0, FALSE, “false”, array(), etc) without getting PHP E_NOTICE messages (that I encourage you to show when developing):