Skip to content

Instantly share code, notes, and snippets.

Avatar

Fernando Rojo nandorojo

View GitHub Profile
View gist:a7a31260b613c7564145
#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 Mar 23, 2020
Doorman + React Navigation Example (v5)
View App.js
// 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 Mar 26, 2020
Doorman + React Navigation Example (v4)
View App.js
// 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'
View WithAuthGate.tsx
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
Expo Electron main.js
View 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 Jan 27, 2021 — forked from rjerue/Popover.js
React Native Web Popovers
View Popover.js
// 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 Jun 10, 2021
Expo EAS monorepo patches
View expo-dev-launcher+0.3.4.patch
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 Oct 21, 2020
No-cache policy with Vercel's SWR
View no-cache-swr.js
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 Nov 10, 2020
React Native Reanimated v2 Shared Element Transition Image Gallery
View reanimated-shared-element-gallery.tsx