jQuery Each

Don’t forget that $(each) and $.each() do two different things in jQuery.

I’ve spent ages before banging my head because a piece of code wasn’t working as expected, and it ended up being because I wrote the wrong version of $.each.

$('selector').each(...) will iterate over the selected elements, while $.each(variable, ...) will iterate over the object/array.

Windows 10 + Vagrant + Homestead + NFS

Just a quick note – Vagrant on Windows runs horribly until you enable NFS. At the time of writing this note, Vagrant 1.8.3 wasn’t installing plugins correctly, so I’ve switched back to 1.8.1.

All you need to do is to add the nfs plugin: vagrant plugin install vagrant-winnfsd

After that update your Homestead.yml file:

- map: E:/Web/Code
to: /home/vagrant/Code
type: nfs
mount_options: ['nolock,vers=3.02,udp,noatime,actimeo=1']

Extending the mount options seems to do the trick.