Customizing Push Notifications using the Firebase Messaging Library in Expo and React Native

Customizing Push Notifications using the Firebase Messaging Library in Expo and React Native

Tiempo de lectura: < 1 minuto You’ll learn how to customize the push notification icon launched in React Native with the @react-native-firebase/messaging library today. We’ll go to app.json: “notification”: { “icon”: “./src/assets/notification-icon.png”, “color”: “#d76d6d” }, We also added to the config plugin: “@react-native-firebase/messaging” With this, we’re halfway done. Now we need to create our notification icon. Only applies to Android. The … Read more

Rescaling an image using the Nearest Neighbor algorithm with Python and Pillow.

Rescaling an image using the Nearest Neighbor algorithm with Python and Pillow.

Tiempo de lectura: < 1 minuto Hoy you are sharing a small function that allows image scaling using nearest neighbor and directly from the server. You will reduce the computational cost of the front to scale images. I recommend using it for pixel art style. Although it may work with other images or you’ll need to change the resizing algorithm. First, … Read more

Implementing In-App Purchases using expo-iap in React Native Expo for Android/IOS

Implementing In-App Purchases using expo-iap in React Native Expo for Android/IOS

Tiempo de lectura: 4 minutos Today we’re going to learn how to implement in-app purchases using Expo IAP for Android or iOS on React Native. First we’re going to install the library we need (expo-iap): npx expo install expo-iap Now we need to add our code inside app.config.js: { “plugins”: [ “expo-iap” ] } Remember to create subscriptions inside Google … Read more

Implementing Google Login in Android with React Native and Expo and Validating with a Python Server

Implementing Google Login in Android with React Native and Expo and Validating with a Python Server

Tiempo de lectura: 4 minutos This is how we can implement Google Sign in using React Native and Expo in a simple way. The first thing we will do is use this library @react-native-google-signin/google-signin The installation is: npx expo install @react-native-google-signin/google-signin We will configure it once installed. First we will create our handler in Typescript: html import React from “react”; … Read more

Show larger files in Linux

Show larger files in Linux

Tiempo de lectura: < 1 minuto Today I’m sharing a command that will help us find the largest files using Linux. We use the following command in the console: sudo find / -type f -exec du -Sh {} + 2>/dev/null | sort -rh | head -n 50 This will show the largest files and we can delete them. Si queremos resetear … Read more

Activating Docker Log Rotation to Prevent Excessive Disk Usage.

Activating Docker Log Rotation to Prevent Excessive Disk Usage.

Tiempo de lectura: < 1 minuto For Docker to not run out of space for logs: Edit or create /etc/docker/daemon.json: { “log-driver”: “json-file”, “log-opts”: { “max-size”: “10m”, “max-file”: “3” } } Maximum log size (e.g. 10m) Number of log files to store before deleting Later, Docker is reloaded: sudo systemctl restart docker DevCodeLightdevcodelight.com

Connecting a Domain to Shopify

Connecting a Domain to Shopify

Tiempo de lectura: 2 minutos Today we are going to learn how we can connect a domain that already owns, for example OVH to our Shopify store. The first thing we will do is enter our Shopify account and go to the control panel. Now we will go into Domains And we click on Connect existing: Now we write the … Read more

Creating a URL Redirect in CloudFlare

Creating a URL Redirect in CloudFlare

Tiempo de lectura: < 1 minuto This is what we will learn to create a 301 redirect using Cloudflare today. The first thing we do is go to the control panel of Cloudflare and then click on the domain we want to configure. Next, we click on Rules. We can choose all of these: We can choose Redirect from root to … Read more

Implementing Request Tracking Transparency in iOS and AdMob Ad Permissions using React Native and Expo

Implementing Request Tracking Transparency in iOS and AdMob Ad Permissions using React Native and Expo

Tiempo de lectura: 2 minutos We will today learn to implement request tracking transparency using React Native and Expo. To do this, we will create the following utils file: // utils/AdsPermissions.ts (or similar) import { Platform } from ‘react-native’; import mobileAds, { AdsConsent } from ‘react-native-google-mobile-ads’; import { getTrackingPermissionsAsync, PermissionStatus, requestTrackingPermissionsAsync } from ‘expo-tracking-transparency’; export async function solicitartPermissionATT(): Promise<boolean> { … Read more