Skip to content

Instantly share code, notes, and snippets.

View frankcalise's full-sized avatar

Frank Calise frankcalise

View GitHub Profile
@frankcalise
frankcalise / withFlipperDisabled.ts
Last active January 24, 2024 03:40
Flipper Disabled Config Plugin
import { ConfigPlugin, withAppBuildGradle, withMainApplication } from "expo/config-plugins"
/**
*
* Expo Config Plugin to disable Flipper entirely in Android
*
* How it works:
* 1) Remove the dependency from app/build.gradle
* 2) Remove ReactNativeFlipper initialization from MainApplication.kt
*/
@frankcalise
frankcalise / expand-pr.js
Created May 24, 2023 11:53
Expand GH PR
// for really long PR pages, execute this function to auto press "Load more" until done
function expandPR()
{
var loadMore = document.querySelector('.ajax-pagination-btn');
if (loadMore.length !== 0)
{
console.log('Clicking all these "Load more": ' + loadMore.length);
loadMore.click();
setTimeout(expandPR, 500);
return;
@frankcalise
frankcalise / the-new-architecture-resources.md
Last active May 17, 2023 23:09
The New Architecture - Useful Resources
@frankcalise
frankcalise / withReactNativeFirebase.ts
Created December 15, 2022 00:46
Expo Plugin to fix react-native-firebase 16.4.6, you'll also need to EAS build with --clear-cache
// See this recommendation for the native fix
// https://github.com/invertase/react-native-firebase/issues/6725#issuecomment-1342808185
import { ExpoConfig, ConfigContext } from "@expo/config"
import { ConfigPlugin, withDangerousMod } from "expo/config-plugins"
import { mergeContents } from "@expo/config-plugins/build/utils/generateCode"
import * as fs from "fs"
import * as path from "path"
const withReactNativeFirebase: ConfigPlugin = (config) => {
@frankcalise
frankcalise / ShareViewController.swift
Created October 17, 2022 02:51
react-native-share-menu iOS Share without preview UI
//
// ShareViewController.swift
// RNShareMenu
//
// DO NOT EDIT THIS FILE. IT WILL BE OVERRIDEN BY NPM OR YARN.
//
// Created by Gustavo Parreira on 26/07/2020.
//
// Modified by Veselin Stoyanov on 17/04/2021.
const useProxyDefault = !API_CONSTANTS.PRODUCTION
const useProxy = Platform.select({ web: false, default: useProxyDefault })
const redirectUri = useProxyDefault
? AuthSession.makeRedirectUri({ useProxy })
: `scheme://yourauth0domain.us.auth0.com/${API_CONSTANTS.OS}/${API_CONSTANTS.BUNDLE_ID}/callback`
// ...
const [request, result, promptAsync] = AuthSession.useAuthRequest(
@frankcalise
frankcalise / AndroidExpoClientAppiumSetup.test.js
Created April 7, 2022 13:12
Expo Android Appium setup from Aug 2021
import { remote } from "webdriverio";
jest.setTimeout(60000);
const appPackage = "host.exp.exponent";
const appActivity = `${appPackage}.experience.HomeActivity`;
const capabilities = {
platformName: "android",
deviceName: "89RX0E545", // Change to the name of the AVD you're using
@frankcalise
frankcalise / Microsoft.PowerShell_profile.ps1
Created April 17, 2019 02:14
Remove backspace bell and shorten prompt for PowerShell
Set-PSReadlineOption -BellStyle None
function prompt {
$p = Split-Path -leaf -path (Get-Location)
"$p> "
}