Blog

learnings

Single Page Bulma template with Smooth Scroll and Scroll Spy JavaScript

I was building a single page website using Bulma, and I wanted to achieve effects similar to what I was familiar with using Bootstrap’s Creative one page theme. As you know, Bulma (mostly) does not provide any JavaScript code, so I had to code the Smooth Scrolling and Scroll Spy features I missed. I intentionally avoided jQuery! So I present my solution using plain-old JavaScript.

Continue reading...

Word Macro to paste MS Office Drawing / TIFF image as PNG

I really don’t know how to explain today’s post. In short: I want to copy drawings and images out of Microsoft Office in PNG format. On macOS, copy-and-paste seems to prefer the TIFF format, resulting in large Office files. I’d rather the images be converted to PNG, preserving transparency but providing high compression. However, this is more complicated than it seems, because of limitations in Office and PowerPoint in particular...

Continue reading...

Prototyping with a Node-RED container

16 Apr 2019dockerregex

If the preceding posts on Node.js and MongoDB have been too complex for you, let me introduce you to a simpler drag-and-drop “flow-editor,” Node-RED.. It was developed and open-sourced by IBM, and is now hosted by the OpenJS Foundation (the same foundation that hosts projects like jQuery, and Dojo). I’ve used Node-RED for quick prototypes and demos, as it’s easy to explain each step of the flow. It saves a lot of coding effort and reduces errors buy providing built-in and pre-built third-party “nodes”.

Continue reading...

Wiring up Node.js and MongoDB containers

Previously, I described my development environment setup using Docker containers. I do it in a totally different way from most tutorials, which I don’t believe leverage containers and complicate things by having to build images for development.

Here I explain how I wire up (i.e. network) a few containers - a MongoDB database, a Mongo Express User Interface to manage the database, and a Node.js container using JSON Web Tokens (JWT) to authenticate users against the database.

Continue reading...

Setting up Node.js in a Docker container

12 Apr 2019dockernodejs

In this post I share with you how I set up a simple Dockercontainer for Node.js development. I’ve never found a simple tutorial for beginners that meets my needs!

My requirement is to do all development debugging in a container, so I am assured of consistent behaviour in any environment. I do not want to install Node.js or npm locally on my mac! I cannot be bothered to use a Makefile or Dockerfile to build images - this is only required in the final stage for production!

Continue reading...