I'm a big fan of the command line (much to the mirth of some of my co-workers). I do a lot of stuff through Git, Grunt and the like so I've usually got a Cmder window open somewhere.
When using Git, there are a bunch of commands that I use frequently so it’s handy to have a shortcut to these.
DOSKEY is a Windows…
Last week, we had a look at Mocking Angular’s $http Promise return type using the $q library. This gives you a great deal of control over when your mock promises are resolved. But, it comes at the cost of requiring both the $q library and manually calling $rootscope.$apply().
If you want to avoid those (and you don't…
The Angular $http service provides an easy way to interact with an API endpoint. If you want to query some data, you can simply do this:
var request = $http.get('/api/items');
request.success(function (data) {
console.log('I have data', data);
});
The request object above is an Angular HTTP promise (ng.IHttpPromise…
Jasmine spies are a great and easy way to create mock objects for testing. By using a Spy object, you remove the need to create your own function and class stubs just to satisfy test dependencies.
Some TypeScript Code
Let’s say you have this service for saving a person:
iperson-service.ts
/// <reference…
This might not work for your issue, but it’s fixed it for me a fair few times.
Every now and again, I'll fire up Sublime Text to be met with this:
Usually (as far as I can work out) it’s due to a folder that I was previously working on being deleted/missing and this is causing some issues when it tries to reload the…
Dear Software Development Managers,
I've been lucky enough to work with a fair few development teams over the years, both here and in Canada (you'd have to ask them if that feeling is reciprocated). As well as getting involved with some good projects and taking part in a multitude of technical discussions, I've also…
As much as all the cool kids are now using Gulp, I'm still using Grunt for a few few automated tasks.
In our current project, we're using it to compress all of our JS in the project, run the Jasmine tests through Karma, and generate test code coverage reports. As well as doing this locally, we need to be able to…
Git is great. And it’s easy to use from the command line.
One niggle though can be having to type in your username and password when pushing to and pulling from remote servers like TFS and BitBucket.
In the past, I've used Pageant for this sort of thing but it’s not exactly straight-forward.
There’s an easier way.
An…
Sometimes it gets to 4:59 on a Friday and you've got a bunch of files you've been mucking around with but don't really want to commit. This could be because you're just using throwaway code or because you've made changes to existing files that you don't want to break.
In these circumstances, you have a few…
As part of testing for our new Continuous Integration set-up, I needed to pull together a bunch of machines for testing deployments. I had planned on using Octopus Deploy to do this so Vagrant seemed like the best choice for getting new machines set up.
Provisioning
The entry point for creating a Vagrant box is…