Home
David Angulo - Software Engineer
Cancel

Doing CS50's Lab 6: World Cup problem in Ruby

Yesterday, I experienced a power outage where I’m left with just a laptop at 50% battery with Ruby interpreter and a mobile phone with limited internet access. With nothing else to do I tried to d...

Password protect your Sinatra app with basic HTTP authentication

Have you ever visited a site that asks you to provide a username and password on a form that resembles a JavaScript alert? That is an example of a basic HTTP auth. Sometimes we don’t need to imple...

Use react-responsive 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. If you also have been developing web apps using React you might have...

Use getRandomValues 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 useful Web API that can be nice to have is Crypto.getRandomValue...

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...