Skip to content

Instantly share code, notes, and snippets.

Example of a–seemingly–undocumented TouchableBounce React Native component

import { Text } from "react-native";
import TouchableBounce from "react-native/Libraries/Components/Touchable/TouchableBounce";

<TouchableBounce>
 Bounce

Keybase proof

I hereby claim:

  • I am tylergaw on github.
  • I am tylergaw (https://keybase.io/tylergaw) on keybase.
  • I have a public key ASDUq1i0bxWkQI89mmJ0Occv0SdvX29wx3Lg4JDbWtKU5Qo

To claim this, I am signing this object:

Example of a Git cherry-pick and rebase flow

Often when working on a feature branch, I'll make a commit or commits that are useful outside the immediate scope of work for that feature. And at the same time, that feature branch needs more time to get finish, but I need to get the commit(s) into master either to ship them or to help other feature branches.

Here's a flow I use to get those commits merged to master without trying to fast-track the original feature branch.

In this scenario I have a feature branch named new-feature-a. I've made a handful of commits related to feature-a and two that are useful for feature-a, but also useful for other work. I want to get those two into master now before I'm ready to merge feature-a.

Cherry Pick Flow


2020 Democratic Presidential Candidate Websites

(NOTE: These are quick stats I ran in Chrome with Lighthouse audits, not gospel)

Quick tidbits

  • None of the sites use a service worker
  • Warren and Booker's are the only ones with zero reported color contrast issues

HTML Video Format Play Support Per Browser

I couldn't find a handy chart of this. This was a quick test based on a single video.

Tested on 2019-01-31

Browser/version mp4 ogg webm
Chrome/71
Firefox/64
Safari/12 🚫 🚫
jest.mock("CameraRoll", () => ({
getPhotos: jest
.fn()
.mockImplementation(() => Promise.resolve({ edges: [], page_info: {} })),
saveToCameraRoll: jest
.fn()
.mockImplementation(() => Promise.resolve("protocol://the-new-uri"))
}));

Notes on a Gradle Bug Fix in a React Native Android project

Posted 2018-11-30

The problem

After adding native Android dependencies the app was crashing right after startup. This was happening on both Android emulators and live devices. Using abd logcat I was able to see the error causing the crash:

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zz

This was hard to find a fix for, it took me–cumulatively–about two work days to get it fixed. 😬 Google searches for the error return quite a few other folks with the same or similar issue. Using those examples I was able to piece something together that worked for our situation.

Push Notifications Options