Marcus

Marcus is a fullstack JS developer. He’s passionate about the hapi framework for Node.js and loves to build web apps and APIs. Creator of Futureflix and the “learn hapi” learning path.


JavaScript — Get Battery Status

Browsers become powerful when it comes to interacting with the user’s system. For example, the Battery API allows you to retrieve information about the system’s battery charge level. You may check whether a device is charging and has enough energy. This tutorial shows you how to retrieve the …

Continue Reading

JavaScript — Test for LocalStorage Support

One of our projects serves thousands of users every day. The users are non-technical and have all sorts of technical devices. The devices may be old and outdated, but they’re still used. We need to ensure the website works on such devices too. All major browsers support localStorage. It’ …

Continue Reading

MySQL — Fixing Invalid JSON Text in Argument 1 to Function json_extract: "Invalid value."

We’re using MySQL as the relational data store in most of our projects. MySQL is a solid foundation, even with complex data types, like JSON. Sometimes we’re integrating apps with external APIs. We typically store responses from external services when requesting from them or synchronizing data with them. …

Continue Reading

MySQL — Get Weekday From Date

Storing and working with dates in the database is a common use case. You’re storing data and want to keep a reference of the creation date or when an update happens. MySQL comes with dozens of date and time functions. It facilitates your work when filtering or grouping rows …

Continue Reading

MySQL — Group Ranges Into Buckets

We’re working on a running project and want to calculate statistics. For example, how many 10k runs happened during the competition? Or how many half-marathons and marathons did people run? Runners in the event use Strava to track their activities. We’re using Strava webhooks to process and store …

Continue Reading

MySQL — Group by Date or Time

MySQL allows you to group data by certain attributes. Typically you’re grouping data when creating statistics. For example, you want to count the number of users made on a given day or within a selected month. This tutorial shows you how to group data in MySQL by date or …

Continue Reading
Page 1 of 67

Explore the Library

Find interesting tutorials and solutions for your problems.