Detectar cuándo se ha abierto una página web usando Javascript

Detectar cuándo se ha abierto una página web usando Javascript

Tiempo de lectura: < 1 minuto Reading time: < 1 minute Hello, today we will learn how to detect when a web page has been opened using JavaScript, for example, to refresh its content. To detect when the web page has been opened, we use the following function: $(window).focus(function () { console.log("focus web opened"); }); To detect when it is closed, ... Read more

Ejecutar test Selenium en un contenedor Docker Compose

Ejecutar test Selenium en un contenedor Docker Compose

Tiempo de lectura: < 1 minuto Reading Time: < 1 minute Today I’m going to show you how we can run Selenium tests in a Docker container. First, let’s create a Docker Compose container with Selenium (using this image https://github.com/nixel2007/docker-selenium-side-runner) version: '3' services: chromedriver: image: robcherry/docker-chromedriver privileged: true restart: always environment: - CHROMEDRIVER_WHITELISTED_IPS='' # ports: # - '4444:4444' selenium-side-runner: image: nixel2007/docker-selenium-side-runner ... Read more

Crear un contenedor de Expo (EAS) con Docker para generar Build Android para React Native

Crear un contenedor de Expo (EAS) con Docker para generar Build Android para React Native

Tiempo de lectura: 2 minutos Reading time: 3 minutes Hello, today we are going to see how we can create a Docker container that generates Android Builds (APKs) locally using React Native. First, we are going to generate our docker-compose.yml file as follows: version: “3.1” services: react_native_dev: build: context: ./Dockerfile dockerfile: react_native restart: unless-stopped container_name: react_native_dev environment: EXPO_CLI_NO_PROMPT: 1 EXPO_TOKEN: … Read more

Create Flutter Environment with Docker Compose to Generate Web/Android/Linux Builds

Create Flutter Environment with Docker Compose to Generate Web/Android/Linux Builds

Tiempo de lectura: < 1 minuto Reading time: < 1 minute Hello everyone, today we are going to see how we can create a Flutter environment using Docker containers that will allow us to generate a build of our project. This environment will allow us to both develop and generate an APK or web with our Flutter project. The first thing ... Read more

Deploy Docker Container with SonarQube and Integrate with Jenkins for Code Analysis

Deploy Docker Container with SonarQube and Integrate with Jenkins for Code Analysis

Tiempo de lectura: 2 minutos Reading time: 4 minutes Today we are going to see how to install SonarQube using a Docker container. To do this, we will use the following Docker container: version: “3.1” services: sonarqube: image: sonarqube:lts-community container_name: sonarqube hostname: sonarqube ports: – 9000:9000 environment: – sonar.jdbc.url=jdbc:postgresql://posgres_db:5432/sonar – sonar.jdbc.username=posgres – sonar.jdbc.password=adminposgres – sonar.search.javaAdditionalOpts=-Dbootstrap.system_call_filter=false volumes: – ./config/sonarqube/logs:/opt/sonarqube/logs – ./config/sonarqube/data:/opt/sonarqube/data … Read more

Analyze Javascript code (React Native, Typescript, Nodejs etc) with Sonarqube and Jenkins (or local)

Analyze Javascript code (React Native, Typescript, Nodejs etc) with Sonarqube and Jenkins (or local)

Tiempo de lectura: 3 minutos Today we’re going to see how to analyze JavaScript, React Native, or Node.js code using SonarQube and Jenkins. Install Node.js with Jenkins If we want to execute a project with JavaScript, we need to install Node.js on the machine where the scan is performed. In this case, on Jenkins. To do that, we install the … Read more

SonarQube Scanner PLUGIN for Jenkins, send your code to your Sonarqube server for analysis

SonarQube Scanner PLUGIN for Jenkins, send your code to your Sonarqube server for analysis

Tiempo de lectura: 2 minutos Reading time: 4 minutes Hello, today I’m going to show you how to install and send code to SonarQube using SonarQube Scanner Plugin and Jenkins. This way, we can create a stage within the CI/CD pipeline that is responsible for analyzing the code integration. The first thing we need to do is open Jenkins and … Read more

Fix stderr: error: object file .git/objects/ad/… is empty error using JENKINS

Fix stderr: error: object file .git/objects/ad/… is empty error using JENKINS

Tiempo de lectura: < 1 minuto Reading time: < 1 minute Today, I’m going to show you how to fix the error when synchronizing a GIT project with Jenkins, which returns: stderr: error: object file .git/objects/ad/.... is empty error: object file .git/objects/ad/.... is empty This occurs because there is a corrupt file in the Jenkins Git. To fix it, we need ... Read more

Refreshing Screen on Return in React Native

Refreshing Screen on Return in React Native

Tiempo de lectura: < 1 minuto Reading time: < 1 minute If we want to refresh a screen when returning from another screen using React Native, we have to do the following: First, we import react-navigation import { useFocusEffect } from '@react-navigation/native'; Then, we add it in our render: useFocusEffect( React.useCallback(() => { }, []) ); Inside the React.useCallback block, we … Read more