Odd Occurrences In Array

Lately I have been doing a lot of code challenges and exercises. It is a great way to improve your coding abilities, but also to make better decisions. There are often concise way to do things and one challenge in particular was a good example of this. Lets set the scence. You have an array […] Read more

Mongoose – Modeling Relationships Between Connected Data

Referencing Documents // Customer Model const Customer = mongoose.model( ‘Customer’, new mongoose.Schema({ name: String }) ) // Review Model const Review = mongoose.model( ‘Review’, new mongoose.Schema({ rating: { type: Number, required: true }, customer: { // this tells MongoDB to store the ObjectID() for later reference type: mongoose.Schema.Types.ObjectId, ref: ‘Customer’ // references the Customer Model […] Read more

Microphone no Longer Working After Windows 1803 Updates

The Windows update 1803 brought with it what to us in Europe might be known as the GDPR update. Like any other major update, Windows will download, install and reboot. But this time, you will then be presented with some privacy options that Microsoft has forced users to revisit as a result of growing privacy […] Read more

Docker “Drive sharing seems blocked by a firewall” – kaspersky

Recently I installed Docker on my Windows 10 computer to test it out as a local tool for WordPress development. I followed the instructions and used a handy script by 10up to quickly set up an optimal WordPress environment. Everything was going so well until I encountered an error in the installation. Namely, my firewall […] Read more

How to Update NPM on Windows 10

The NPM team officially recommends this method of updating Node. (source below) Let’s begin. First, open PowerShell as administrator and run the following command. Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force npm install -g npm-windows-upgrade npm-windows-upgrade You will be prompted to select a version of NPM to install. Use arrow keys to move up and down and […] Read more

How to Install HTTP/2 with WHM and EasyApache 4

Recently I updated my server to enable HTTP/2 via mod_http2 from EasyApache 4 and the results are amazing, this has been something I have kept my eye on for quite some time. So now I will show you how to update your server and you too can benefit from HTTP/2. How to Enabled HTTP/2 with EasyApache 4 […] Read more

How to enable the Protocol Tab in Chrome Dev Tools

By default, Chrome shows you limited network tabs. With the recent implementation of HTTP/2, I needed a quick way to identify which protocol was in use. So here is a quick tutorial to show you how. Navigate to the Network tab in Chrome Dev tools and right click on one of the column headers, a […] Read more

How to Setup a Typescript Project

Before we can set up a TypeScript project, we first ensure that  Node.js and NPM are installed. Head over to the node.js download page and select the relevant package and follow the on-screen instructions. Note: I am using a Mac for this tutorial, but it’s the same for Windows 10. I am also using Visual […] Read more

JavaScript Function Statements vs Function Expressions

JavaScript function statements and function expressions are two ways you can write a function in your JavaScript code, but what is the difference? JavaScript is executed synchronously (line by line) however if you came across a snippet of code like this, you might think the function will not be executed because the code is executed […] Read more

JavaScript Primitives Types

JavaScript has 6 primitive data types (a primitive type is data that is not an object) which lets the JavaScript engine differentiate between different categories of data and they are as follows. string number boolean undefined null symbol (new in ECMAScript 2015) String // Strings “Hello World with double quotes” ‘Hello World with single quotes’ “28” // see […] Read more