Creating an instance of Ghost CMS in Docker

Watch out! This tutorial is over 1 year old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

Ghost CMS is a new blogging platform which is kinda similar to WordPress and may be a new game changer in the industry of blogging platforms. It is a fully open source, adaptable platform for building and running a modern online publication – powered by headless Node.js.

Continue reading

Node.js EventEmitter

Watch out! This tutorial is over 1 year old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

Node.js allows us to create and handle custom events easily by using events module. Event module includes EventEmitter class which can be used to raise and handle custom events.

Continue reading

Manage your XenServer or XCP-ng Pool with Xen Orchestra… inside Xen Orchestra!

Watch out! This tutorial is over 1 year old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

We use Xen Orchestra as the web interface for students to create and manage VMs via our XCP-ng Pool in PJ Carrolls. The login is found at https://xoa.comp.dkit.ie and most students are familiar with this excellent resource. But what if a student wanted to mange their own pool of virtualisation servers in a Specialist Lab, running either XCP-ng or XenServer?

Continue reading

Value Interpolation in JavaScript Code using Pug

Watch out! This tutorial is over 2 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

Interpolating values is helpful if you need to pass a server-side variable to client-side JavaScript (or other languages that require it).

In the case of variables, numbers, strings, and the like, you can pass these types of variables directly into your JavaScript with bracket syntax plus an explanation point (so that the code inside the brackets is not evaluated.) This is useful for parametrizing JavaScript code that require something from your server.

Continue reading

Server Side Variable Interpolation with Pug

Watch out! This tutorial is over 2 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

It’s possible to pass variables from your server into Pug for dynamic content or script generation. Pug templates can access variables passed to the res.renderfunction in Express (or pug.renderFile if you are not using Express, the arguments are identical).

Continue reading