Dan Cotton

Convert Degrees to Radians And Vice Versa

// degrees -> radians
var radians = degrees * Math.PI / 180;
// radians -> degrees
var degrees = radians * 180 / Math.PI;
Read more…

Displaying a list of elements in a grid


Say you have an array of elements that you wish to display as a grid. The general formula for this would be:

var numColumns = Math.floor(viewport.width / itemWidth);
for(var i = 0; i <
Read more…

Deploying a Laravel Site Using Git


So when I was happy enough with my new Laravel site it was time to deploy it to my live hosting. The hosting company I use are called TSO Host who provide a great pro level shared hosting

Read more…