Laravel: Run Queue in the Background using PM2

In production you have to run this command using some process manager that will keep the command running. 2 most simple ways to do that is using Supervisor or PM2.I use pm2 in such cases, as this seems simpler to me. Let’s see how to use PM2 for running Laravel workers in the background.

JavaScript: this – [full explanation]

This ‘this’ keyword is very confusing when you are writing code, especially when you read others’ code.This article’s goal is to eradicate those confusions. You have to remember a few things about ‘this’ and consider where you are using it and how you are using it.

MySQL: Select Latest Record for Each Group

Select Latest Record for Each Group

In this article, we are discussing the process of getting the latest records for each group using SQL. For the demonstration, we have some data in a table (check the table below). In the table, there is entry_id, which is the primary key, there is city which is the name of the city, there is date, and rain_measurement.

Linux Command: Cheat Sheet

Linux has hundreds of commands. But most people need a minimal subset of those. This cheat sheet is here to help you with that.I have created a cheat sheet base on my most used commands. Hopefully, you will also find that useful.