jQuery’s hide() and show() slow in Chrome

Whilst working on a project where I’m filtering elements on the client using JavaScript I came across a very interesting issue with Chrome.

I filter elements by running jQuery’s hide() or show() on them depending on what the user entered and there’s around 750 elements that need this filtering. I noticed that this was quite slow in Chrome as it took around 2-3 seconds for the page to become responsive whilst filtering. I tested the page in Internet Explorer 9 to confirm that the code I had written was to blame, but the filtering was instant. What the hell Chrome?

Read on! →

No Comments Posted in Programming
Tagged bug, chrome, jquery, speed
Fixing 500 OOPS: vsftpd: refusing to run with writable root inside chroot ()

After upgrading vsftpd or vsftpd-ext you may be getting the following message when trying to log in.

500 OOPS: vsftpd: refusing to run with writable root inside chroot ()

This is due to the following update:

– Add stronger checks for the configuration error of running with a writeable
root directory inside a chroot(). This may bite people who carelessly turned
on chroot_local_user but such is life.

The problem is that your users root directory is writable, which isn’t allowed when using chroot restrictions in the new update.

To fix this you must either remove write permissions on the users root directory with the following command, replacing the directory with your users root:

chmod a-w /home/user

Or you can work around this security check by adding either of the two below into your configuration file.

For the standard vsFTPd build (vsftpd):

allow_writeable_chroot=YES

For the extended vsFTPd build (vsftpd-ext):

allow_writable_chroot=YES

Removing the write permission on the root isn’t a perfect solution as doing this can cause a few problems with things that need to write to the root directory, such as the bash history file or some graphical environments.

Dmitriy has suggested 3 ways to also overcome this problem, be sure to check them out.

101 Comments Posted in Linux
Tagged 500 oops, chroot, vsftpd
WP Super Cache Benchmarks

Today I will be covering an amazing plugin called WP Super Cache that aims to help speed up a WordPress blog. If you’re ever listed on the front page of Reddit or some other popular social media website you’re probably going to get flooded with visitors, which in turn will put a lot of pressure on your server to keep up with all of the requests. On every page view PHP will be executed along with a bunch of MySQL queries, this can put a lot of strain on your server if you happen to have a lot of active users. This is where WP Super Cache comes in.

WP Super Cache reduces this strain by storing a static HTML version of the pages the visitors view. This in turn reduces the amount of PHP executed thus reducing the strain. When a cached page changes, such as when someone comments or the post is altered, this HTML cache is simply updated.

I’ve also included benchmarks so you can compare the different options it has.

Read on! →

No Comments Posted in WordPress
Tagged benchmark, compressed, plugin, speed, wp super cache