Preventing CloudFlare from caching a website.

Preventing CloudFlare from caching a website.

Tiempo de lectura: 2 minutos Today we’re going to learn how to prevent CloudFlare from caching a website’s information. Step 1: Log in to your Cloudflare account Log in to your Cloudflare account on the official website. Step 2: Select the website Select the website for which you want to configure page rules in the Cloudflare dashboard. Step 3: Navigate … Read more

Creating a redirection with Nginx Proxy Manager

Creating a redirection with Nginx Proxy Manager

Tiempo de lectura: 2 minutos Today we’re going to learn how to create a redirection using Nginx Proxy Manager. The first thing we’ll do is open the Nginx Proxy Manager interface and select Hosts > Redirection Hosts. We fill in the data: We will put the name of the original domain we want to redirect from, to the domain we … Read more

Fixing error Could not find Ninja on PATH or in SDK CMake bin folders in React Native with Expo

Fixing error Could not find Ninja on PATH or in SDK CMake bin folders in React Native with Expo

Tiempo de lectura: < 1 minuto Today we are going to solve the following error: A problem occurred evaluating project ‘expo’. A problem occurred configuring project ‘expo-modules-core’. [CXX1416] Could not find Ninja on PATH or in SDK CMake bin folders. This error occurs when we try to generate the development build with Expo: npx run:android To solve this error, we need … Read more

Google Analytics in React with Next + Extra Trick

Google Analytics in React with Next + Extra Trick

Tiempo de lectura: < 1 minuto Today we’re going to add the Google Analytics tag using React and Next. To add the tag, we need to have a Google Analytics account created. We’ll go to our <Head> tag and add: <script async src={`https://www.googletagmanager.com/gtag/js?id=${IDGoogleAnalytics}`} /> Where IDGoogleAnalytics will be our ID: G-XXXXXX Extra: Improve bounce rate performance. With this script, we can … Read more

SEO on Web: Character Count for Meta

Tiempo de lectura: < 1 minuto I provide you with a guide on the optimal character limits for each META tag: Title: maximum 60 characters. Description: maximum 160 characters. Keywords: maximum 12 keywords. (Comma-separated). DevCodeLightdevcodelight.com

Adding Dark Mode to React using Mui

Adding Dark Mode to React using Mui

Tiempo de lectura: 2 minutos Today we’re going to learn how we can add dark mode using React and the MUI design library. The first thing we’ll do is to create two dark and light themes: Theme.tsx // theme.ts import { createTheme, Theme } from ‘@mui/material/styles’; import ‘@fontsource/roboto’; import ‘@fontsource/roboto/100.css’; import ‘@fontsource/roboto/300.css’; import ‘@fontsource/roboto/400.css’; const lightTheme: Theme = createTheme({ palette: … Read more

Deja de instalar servicios en tu VPS, usa Docker

Tiempo de lectura: 2 minutos What is Docker? Docker is an open-source platform that automates the deployment of applications within software containers. These containers encapsulate all the necessary dependencies for an application to run efficiently in any environment, from development to production. Unlike traditional virtual machines, Docker containers do not include a complete operating system, making them extremely lightweight and … Read more

Adding Google AdSense in React

Adding Google AdSense in React

Tiempo de lectura: 2 minutos Today we’re going to learn how to add Google Adsense to React. The first thing we need to do is to create an account on Google Adsense and obtain our page code. Now we need to add the code inside our head like this: <head> <script async src=”https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-XXXXXXXXXXXXX” crossOrigin=”anonymous”></script> </head> Where in ca-pub-XXXXXXXXXXXXX we must … Read more

Validate ReCaptcha token using PHP

Tiempo de lectura: < 1 minuto In this example, we pass the obtained reCaptcha code through the JSON body and validate it. Replace SECRET_CODE with the secret code obtained when creating the captcha. To send the remote IP, you can use HTTP_CLIENT_IP or HTTP_X_REAL_IP if you are using a reverse proxy like NPM. Finally, validate the captcha token and allow the … Read more

Add reCAPTCHA Google Captcha to React

Add reCAPTCHA Google Captcha to React

Tiempo de lectura: 2 minutos Today we’re going to learn how we can validate a form, including a reCAPTCHA to prevent spam attacks by BOTS. The first thing we need to do is register our reCAPTCHA code on Google: https://www.google.com/recaptcha/about/ And click on v3 Admin Console Click on the plus (+) button to create a new one, and in this … Read more