Ultimate Web Tips

your Wordpress, jQuery, PHP, MySQL, Linux and CSS guide to a successful website
Read more:

Storing an array in a cookie using a serialized value can be a bit tricky. Problem lies in magic_quotes_gpc, in PHP 5.4 that was removed. When using set_cookie the quotes are being escaped.
More

Why jQuery live is bad to usejQuery offers a very powerful range of tools to select elements. These are influenced from CSS and some created of their own.
More

July 19th, 2012

How to disable sudo password

No Comments, Linux, by Joakim Ling.

Sudo is a way to give users administrative rights, without giving them the root password. Very useful in a large environment where you a a mix of workstations and servers.
More

HTML5 PlaceholderHTML5 introduced many new features, one of them is the placeholder attribute. What it does is showing text in a field until any value is entered, then hides the text. Very useful to show users example of what to enter in a field. You’ve probably seen this techinque a lot with Javascript, but native HTML5 support is even better.
More

Customize wp_list_categories outputIf you are using the hook ‘content_save_pre’ and want to save custom values from an XMLRPC call, you have to do a cleaver little workaround. The problem is that the ID is generated when the call is executed which is after this hook.
More

PCRE documentationHad a problem with a cloud server a while ago with updating subversion. This is a kernel error and I found out that its the random pool thats not working correctly. Here is a simple way how to recreate it.
More

Custom post typesCustom post type is a great way to customize your WordPress and adding new taxonomies makes it even more powerful. All functionality comes with WordPress core but it can be difficult to specific posts on a custom taxonomy. The key in this is the new tax_query argument.
More

Create a WordPress custom AJAX functionI came across a bit of complication when I for the first time needed to pass parameter to a function with setTimeout. The setTimeout() method calls a function or evaluates an expression after a specified number of milliseconds. It’s also supported in most browsers, brilliant tool if you want to create a javascript ticker.
More

ReflectionClassTo find out where a class is defined could be quite difficult is you are using frameworks you are not so familiar with. The ReflectionClass is a great tool to find out everything about your class and turn into objects.
More

March 2nd, 2012

Disk quota exceeded error in Linux

2 Comments, Linux, by Joakim Ling.

Index-node (inode) is a data structureAll of your services have disk storage space allocated to you. When you fill your disk storage space, you will receive a notification message “Disk quota exceeded” when you try to perform operations, such as storing cache files or sending email. Even if you have free space left on your disk, doesn’t say that you have space to add new files.
More