Javascript

Improve shell start-up time when using nvm

I was finding terminal sessions took a long time to start up on my machine, and eventually discovered that nvm was taking the majority of the start-up time.

In order to mitigate this, I came up with a way to only load nvm when it was really needed, but still keep access to my default node installation.

Read more…
Improve shell start-up time when using nvm

Relative URLs in Javascript - A Solution

I've previously written about absolute and relative paths in web development, and this follow-up post is here to show the method I've been using to get around the problem.

The secret sauce is the old HTML <base> tag. Simply output this in the <head> section of your template, with the href attribute set to the full URL of your site's root, then you can use a simple helper function like the one below to build full URLs in your javascript!

Read more…
Relative URLs in Javascript - A Solution
Mat Gadd