Three Ways of Dealing with CORS

What is CORS and why do we need it? AJAX has been popular for over 10 years now, and is a part of almost any web site that is anything more than a static display case for a digital brochure. Requests from in-page script languages such as JavaScript have to… »

How to Fix SoundCloud is Gold in WordPress 3.9

I don't often admit it, but I actually use WordPress for my other blog: http://www.osirisguitar.com Usually, upgrading to a new WordPress version is smooth sailing but this time the editor broke down completely - TinyMce didn't show up at all, just a white empty space. Turns out… »

Watch out for Erlang-style callbacks in RabbitMQ

When using RabbitMQ, you're probably going to use the amqp-node library. It's good even though it really only has the bare minumum of functions you need for Rabbit connectivity. The biggest gotcha of the all though is that this library, at least for some functions, uses a different callback pattern… »

Mocking AngularJS services in unit test

When unit testing controllers in AngularJS, there are good mechanisms in place for mocking injected services, as such: var controller; var myServiceMock = { myServiceMethod: sinon.stub() }; module('myApp'); inject(function($rootScope, $controller) { var scope = $rootScope.$new(); var controller = $controller('MyController', { $scope: scope, MyService: myServiceMock }); } } So now we've created a mock of… »