Skip to content

Instantly share code, notes, and snippets.

View nandorojo's full-sized avatar

Fernando Rojo nandorojo

View GitHub Profile
#To view the page go here: http://langadv.myshopify.com/pages/spanish. In the top right corner click enter password which is arcoiris11
<h3>Arcoiris Level 1</h3>
<a name="arcoiris1"></a>
<div data-embed_type="product" data-shop="langadv.myshopify.com" data-product_name="Arcoiris Level 1 Spanish Workbook &amp; Audio CD" data-product_handle="arcoiris-level-1-spanish-workbook-cd" data-has_image="true" data-display_size="compact" data-redirect_to="product" data-buy_button_text="Arcoiris 1" data-button_background_color="7db461" data-button_text_color="ffffff" data-variant_id="4094347589"></div>
<a href="https://langadv.myshopify.com/products/arcoiris-level-1-spanish-workbook-cd?channel=buy_button&amp;referer=http%3A%2F%2Flangadv.myshopify.com%2Fpages%2Fspanish&amp;variant=4094347589"><script type="text/javascript">// <![CDATA[
document.getElementById('ShopifyEmbedScript') || document.write('<script type="text/javascript" src="https://widgets.shopifyapps.com/assets/widgets/embed/client.js" id="ShopifyEmbedScrip
@nandorojo
nandorojo / App.js
Last active March 23, 2020 18:58
Doorman + React Navigation Example (v5)
// IN ORDER TO USE THIS, YOU NEED TWO THINGS
// 1. Your firebase config, to be replaced on line 12
// 2. Your Doorman public project ID, to be replaced on line 27. (Go to https://app.doorman.cool to find it.)
import * as React from 'react';
import { DoormanProvider, AuthGate } from 'react-native-doorman'
import AuthStack from './Stack' // <-- made in step #2 😇
// initialize firebase
@nandorojo
nandorojo / App.js
Last active March 26, 2020 03:13
Doorman + React Navigation Example (v4)
// IN ORDER TO USE THIS, YOU NEED TWO THINGS
// 1. Your firebase config, to be replaced on line 13
// 2. Your Doorman public project ID, to be replaced on line 30. (Go to https://app.doorman.cool to find it.)
import * as React from 'react';
import AuthStack from './Stack' // <-- made in step #2 😇
import { DoormanProvider, AuthGate } from 'react-native-doorman'
import { createAppContainer } from 'react-navigation'
import { Text } from 'react-native'
@nandorojo
nandorojo / WithAuthGate.tsx
Created April 1, 2020 08:24
AuthGate example
import React from 'react'
import { useAuthGate } from 'react-native-doorman'
class LoadingScreen extends React.Component {
componentDidMount() {
const { loading, user } = this.props
// ...navigate here
}
@nandorojo
nandorojo / main.js
Created May 23, 2020 02:40
Expo Electron main.js
// electron/main/index.js
// in your expo project, after following the docs instructions, run:
// yarn expo-electron customize
// then set your electron/main/index.js to look like this
import { BrowserWindow, Tray, app } from 'electron'
import * as path from 'path'
import { format as formatUrl } from 'url'
import debug from 'electron-debug'
We couldn’t find that file to show.
@nandorojo
nandorojo / Popover.js
Created January 27, 2021 02:07 — forked from rjerue/Popover.js
React Native Web Popovers
// web
import P, { ArrowContainer } from 'react-tiny-popover'
import React from 'react'
export default ({
visible = false,
position,
onClose,
children,
content = null,
@nandorojo
nandorojo / expo-dev-launcher+0.3.4.patch
Last active June 10, 2021 19:24
Expo EAS monorepo patches
diff --git a/node_modules/expo-dev-launcher/plugin/build/withDevLauncher.js b/node_modules/expo-dev-launcher/plugin/build/withDevLauncher.js
index 04c1d7d..a166618 100644
--- a/node_modules/expo-dev-launcher/plugin/build/withDevLauncher.js
+++ b/node_modules/expo-dev-launcher/plugin/build/withDevLauncher.js
@@ -20,7 +20,7 @@ const DEV_LAUNCHER_ON_NEW_INTENT = `
`;
const DEV_LAUNCHER_WRAPPED_ACTIVITY_DELEGATE = `DevLauncherController.wrapReactActivityDelegate(this, () -> $1);`;
const DEV_LAUNCHER_ANDROID_INIT = 'DevLauncherController.initialize(this, getReactNativeHost());';
-const DEV_LAUNCHER_POD_IMPORT = "pod 'expo-dev-launcher', path: '../node_modules/expo-dev-launcher', :configurations => :debug";
+const DEV_LAUNCHER_POD_IMPORT = "pod 'expo-dev-launcher', path: '../../../node_modules/expo-dev-launcher', :configurations => :debug";
@nandorojo
nandorojo / no-cache-swr.js
Created October 21, 2020 17:20
No-cache policy with Vercel's SWR
import useNativeSWR from 'swr'
import { useRef } from 'react'
// inspired by https://github.com/vercel/swr/discussions/456
export default function useSWR(key, fetcher, options = {}) {
const { cachePolicy, ...opts } = options
const random = useRef(new Date())
return useNativeSWR(
() => {
@nandorojo
nandorojo / reanimated-shared-element-gallery.tsx
Created November 10, 2020 22:07
React Native Reanimated v2 Shared Element Transition Image Gallery