Skip to content

Instantly share code, notes, and snippets.

View mikehardy's full-sized avatar

Mike Hardy mikehardy

View GitHub Profile
mikehardy /
Last active September 2, 2022 19:15
Android emulator performance on macos-11 Github Actions Runners

Performance characteristics of Android emulators on GitHub Actions

Lots of projects need to test android apps, and use GitHub Actions infrastructure to do so.

This document intends to show current timings for a sample workload, to inform what emulators are a good match for testing.

Test Conditions

  • We use the AnkiDroid androidTests
  • they are long enough to execute that they form a nice balance between cold start emulator time so neither dominates
mikehardy / Connect react-native-firebase and expo-apple-authentication
Last active February 24, 2021 11:30
react-native-firebase + apple sign-in (via expo-apple-authentication
/* This is pretty unstructured typescript but gives the idea */
import * as AppleAuthentication from 'expo-apple-authentication';
import { sha256 } from 'react-native-sha256';
private _appleSignIn = async () => {
this.setState({ isSigninInProgress: true });
try {
let linkSuccess = await UserStore.appleSignIn(true);
mikehardy / limit.maxfiles.plist
Created August 22, 2019 01:03
Fixing too many open files on macOS
<!-- put this in in /Library/LaunchDaemons/limit.maxfiles.plist -->
<!-- load it with launchctl load /Library/LaunchDaemons/limit.maxfiles.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
mikehardy /
Created September 4, 2018 12:42
A script to manage suspend/resume/stop for all libvirt guests
# Inspired by
# Configure timeout (in seconds).
# List running domains.
list_domains_by_state() {
mikehardy /
Created August 31, 2018 18:50
Android emulator fleet management - shutdown
# I was having trouble with ADB daemon startup, this hack seems to work though it's terrible
adb devices -l > /dev/null
sleep 2
adb devices -l > /dev/null
sleep 2
# Try the nice way
for EMU_ID in `adb devices -l | grep emulator | cut -d' ' -f1`; do
mikehardy /
Last active August 31, 2018 18:49
Android emulator fleet management - startup
for AVD in `emulator -list-avds`; do
echo -n Found $AVD...
NORMAL_ARGS="-no-boot-anim -sdcard $SDCARD"
case "$AVD" in