Bulk Delete Branches in Git

I end up doing a lot of work in feature and bugfix branches in git. Even though I get the server to delete my branch when a Pull Request gets merged, I'm still stuck with a local branch that I'll likely never need again. After a while these can become quite hard to manage, so I went in search of a simple way to delete a bunch of ...

Execute Functions In Series

A use case for this might be an event handler that needs to fire of a series of callbacks all with the same information. So instead of doing something like:

events.on('some.event', someFunc1);
events.on('some.event', someFunc2);
events.on('some.event', someFunc3);

You could do:

events.on('some.event', execSeries.call(this, someFunc1, someFunc2, someFunc3));


 * Execute a series of methods
 * Pass in a series of callbacks ...

Loader” on page load


Sometimes it's worth having a loader on pageload - something to block the UI so that JavaScript has a chance to apply event handlers to the UI.

To facilitate this we can put a small script at the very top of our <head> section that will apply a class to the <html> element. This way the loader can be hidden by default and will only show if JavaScript is enabled ...

JSON from WP-View / WP-Types

I use the Types and Views plugins on many of the Wordpress sites that I build if they require something even resembling Custom Post Types - they save me a lot of pain!

One of my gripes was that it's not an easy task to just get some JSON returned so I can manipulate stuff from the client side with JavaScript.

I've hacked together this little method to facilitate ...