Select Page

Author: admin

Authentication and Authorization Using Auth0 in PHP

In this article, we’re going to explore the Auth0 service, which provides authentication and authorization as a service. Auth0 allows you to set up basic authentication and authorization features for your apps in the blink of an eye. What Is Auth0? Auth0 is an authentication as a service tool that makes implementation of authentication-related features in your site a breeze. If you’ve built an app and you want to just outsource the authentication and authorization features, a service like Auth0 is something you should consider. Let me quickly summarize what Auth0 has to offer: single sign-on multifactor authentication passwordless logins...

Read More

Here’s the thing about “unused CSS” tools

There are a lot of tools that aim to help you remove “unused CSS” from your project. Never a week goes by that I don’t see a tool for this being shared or promoted. It must strike some kind of perfect chord for some developers. I care about performance, and I know that reducing file sizes is good for performance. Indeed, it is. I bet we have CSS that is unused in our stylesheets, if we removed that, that’s a performance win. Yep, it would be. We should automate that. Ehhhhhh, I’m not so sure. There are major performance tooling players that play up this idea, like Lighthouse and how it gives you CSS and JS “Coverage”, which will surely tell you that you’re shipping code you don’t need to be. The tools that claim to help you with unused CSS have to perform analysis to be able to tell you what is unused and what isn’t. Here’s one way to do that analysis. Render a page of your site and get the complete DOM. Then get the complete CSSOM as well, which can give you an array of all the selectors in your CSS. Loop over those selectors and do a querySelector in the DOM and see if it matches anything. If it doesn’t, that CSS selector is unused. Clever, right?! I think so. But that analysis paints...

Read More

Get Started With Pusher: Introducing Channels

Real-time communication is a holy grail of web development, and we finally have the ability to incorporate it in our applications, thanks to the Web Sockets API. But as with most browser APIs, the Web Sockets API is rather low level, and if you have spent any amount of time with it, then you know how difficult it can be to use effectively.  Today, however, we have supercomputers in our pockets that we use every single day, and users expect the same real-time experience across web, mobile, and even desktop. In this series, you’ll learn about Channels, a platform...

Read More

WordPress Gutenberg Block API: Extending Blocks

Welcome back to our series on creating custom blocks with the WordPress Gutenberg Block API. This tutorial is all about extending the random image block we created in the previous post. We got as far as adding a drop-down control to select an image category. We’ll continue with this by adding more block options to allow further customization. Specifically, we’ll see how to add block settings in various parts of the editor. That’s right, you’re not just limited to adding block controls directly on the block itself! The final my-custom-block plugin code is available to download. Just click the link in the sidebar...

Read More

Getting Started With the Fabric Python Library

Fabric is a Python library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks. Fabric is very simple and powerful and can help to automate repetitive command-line tasks. This approach can save time by automating your entire workflow.  This tutorial will cover how to use Fabric to integrate with SSH and automate tasks. Installation Fabric is best installed via pip: $ pip install fabric Getting Started With Fabric Usage Below is a simple function demonstrating how to use Fabric. def welcome(): print("Welcome to getting started with Fabric!") The program above is then...

Read More
000webhost logo