Future Studio Tutorials

Public tutorial on Thursday. Wednesday is only.

Ubuntu/Debian — How to Test a Cron Job

Cron jobs are a nice way to automatically run scheduled tasks. The cron service in Linux systems is the typical approach when scheduling commands on the operating system. {{outline}} Testing a Cron Job Recently the certbot from Let’s Encrypt didn’t automatically renew SSL certificates anymore. We used a …

Continue Reading

Generate a Random Number in Range With JavaScript/Node.js

JavaScript has built-in methods to generate a single, random number. You can leverage this feature to create your own method generating a random number in a range between two other numbers. {{outline}} Random Integer Between X and Y (Exclusive Y) Let’s say you want to generate an integer in …

Continue Reading

Node.js — Run Async Functions in Batches

When working with arrays of data, you may need to run an asynchronous operation on each item. The Promise.all() method provides a convenient interface to run a list of promises in parallel, but it has some limitations. Using Promise.all() may overload the available resources, especially when reaching out …

Continue Reading

learn hapi — Bringing Back JWT Claims in the JWT Payload

The recent tutorials in this series on JSON web tokens introduced a handful of code changes. For example, you switched the packages creating JWTs from jsonwebtoken to node-jose to support encrypted and nested tokens. A downside of this switch: the JWT-related claims were added jsonwebtoken automatically when creating a new …

Continue Reading

Clone/Copy an Array in JavaScript and Node.js

You’re naturally in the needs of handy utilities when working with JavaScript handling arrays. Modern JavaScript frameworks —especially the frontend frameworks— abstract most of the DOM interaction. You’re focusing on the actual logic and implement the data handling. When implementing the logic, a handy utility related to JavaScript …

Continue Reading

Explore the Library

Find interesting tutorials and solutions for your problems.