How to Keep Server Processes Running After Closing SSH

We’ve all experienced it: you’ve SSH-ed into a server and started a long-running task. Unexpectedly, it’s taking much longer than anticipated, and now you can’t close your laptop without interrupting the process. Fortunately, there’s a simple solution to close the terminal window without killing the ongoing task. Quick and Easy Method Follow these steps to […]

Read More

Search in the Database Without Considering HTML Tags in MySQL

Have you ever needed to search your database for specific text, but HTML tags got in the way? Here’s a nifty MySQL query that solves this problem: This query uses REGEXP_REPLACE to strip out HTML tags before performing the search. Let’s break it down: This approach allows you to search your content as if it […]

Read More

Get element by XPath: Tutorial for Web Scraping

Introduction to XPath Hey there! Let’s talk about XPath, a powerful tool for web scraping. XPath is a language that helps you navigate through XML and HTML documents. It’s especially useful when you’re using Scrapy, a popular web scraping framework. Why use XPath? The Basics Imagine HTML as a tree. The root isn’t part of […]

Read More

Understanding Global Variables in TypeScript: A Beginner’s Guide

Hey there, fellow TypeScript enthusiasts! Today, I want to share something that often confuses newcomers to TypeScript: working with global variables. Don’t worry, I’ve been there too, and I’m here to help you to make global variables in Node.js using TypeScript and make sure the types are correct. Prerequisites: VSCode and TypeScript should be already installed. Let’s start […]

Read More

How to Handle Global Variables in TypeScript

Hey there, fellow developers! Today, I want to share something that tripped me up when I first started using TypeScript: dealing with global variables. Specifically, I’m going to show you how to work with global variables that are defined outside your TypeScript code. Let’s set the scene. Imagine you’re building a web app where you […]

Read More

Using relative paths in Vite builds

I have a simple project setup using Vite: I’m using Vite’s default configuration without a custom config file. After building the project, the index.html in the dist folder uses static paths for assets: This also affects url() paths in CSS, converting them to static paths. I want Vite to output relative paths instead, like this: […]

Read More

CSS Viewport Units: vh, vw, vmin, and vmax

In this article, we’ll look in detail at four handy length units that are relative to the browser viewport: vh, vw, vmin and vmax. These are truly “responsive length units” in the sense that their value changes every time the browser resizes, and they introduce incredibly useful options for sizing elements in CSS.

Read More