Home
David Angulo - Software Engineer
Cancel

Use URL class in React Native

If you have been coding React Native for a while you may have noticed that some of Web APIs aren’t implemented in React Native. One Web API that I commonly use is the URL interface, it allows us t...

Detect outside press in React Native

onPress and onClick events are one of the most common events used on mobile, web, and desktop apps development. But what if we want the opposite? We want to detect the press event outside of a comp...

Generate PKCE challenge in React Native

auth0’s post titled “Which OAuth 2.0 Flow Should I Use?” recommends that you use Authorization Code Flow with Proof Key for Code Exchange (PKCE) flow for you mobile apps. What is PKCE? PKCE (prono...

Change Android navigation bar color in React Native

Having bottom tab navigator is one of the commonly used navigators in React Native. Usually we customize the UI of this navigator to match our needs. The problem arises when the Android’s navigati...

Dirty Ruby script to migrate comments from Disqus to giscus

Use the script at your own risk. Please try it first on a sample repository before committing too hard as it may bombard your discussions page. Only tested on <1k of comments, so far I haven’...

Force www website in Cloudflare

Usually when setting up DNS, you point your domain and the www subdomain to the same address. Meaning, the same website will be accessed on both non-www and www version. This can cause issues in s...

Force HTTPS website in Cloudflare

If you installed an SSL on your website, you want it to be accessed on https rather than http. If you are also using Cloudflare I will show you how I forced my website to use https. Step 1: Login ...

Convert Blob to base64 in JavaScript

I usually pass files as base64 string to my REST APIs to upload them. Here is my go to utility function that converts blob to base64. function base64FromBlob(blob) { return new Promise((resolve...

Use Trix WYSIWYG editor in Next.js

Trix editor have been my go to WYSIWYG editor on both React and non-React projects, sometimes I am required to use it on a Next.js project, encountered some hiccups but manage to make it work with ...

Whitelist domain in JavaScript

I recently migrated this blog from WordPress to Jekyll and I currently host this blog for free at DigitalOcean App Platform. If you’re DigitalOcean App Platform you can access your website via som...