This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Determines whether an error is a QuotaExceededError. | |
* | |
* Browsers love throwing slightly different variations of QuotaExceededError | |
* (this is especially true for old browsers/versions), so we need to check | |
* different fields and values to ensure we cover every edge-case. | |
* | |
* @param err - The error to check | |
* @return Is the error a QuotaExceededError? | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/nativewind/dist/style-sheet/color-scheme.js b/node_modules/nativewind/dist/style-sheet/color-scheme.js | |
index c08e40b..0505525 100644 | |
--- a/node_modules/nativewind/dist/style-sheet/color-scheme.js | |
+++ b/node_modules/nativewind/dist/style-sheet/color-scheme.js | |
@@ -7,6 +7,16 @@ class ColorSchemeStore { | |
this.colorSchemeListeners = new Set(); | |
this.colorScheme = react_native_1.Appearance.getColorScheme() || "light"; | |
this.colorSchemeSystem = "system"; | |
+ react_native_1.Appearance.addChangeListener(({ colorScheme }) => { | |
+ if (this.colorSchemeSystem === "system") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import { | |
NativeSyntheticEvent, | |
StyleSheet, | |
TextInput, | |
TextInputFocusEventData, | |
TextInputProps | |
} from "react-native"; | |
interface State { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// A script for developing a browser extension with live-reloading | |
// using Create React App (no need to eject). | |
// Run it instead of the "start" script of your app for a nice | |
// development environment. | |
// P.S.: Install webpack-extension-reloader before running it. | |
// Force a "development" environment in watch mode | |
process.env.BABEL_ENV = "development"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* React-Native cross-platform elevations. | |
* Based on https://ethercreative.github.io/react-native-shadow-generator/ | |
* | |
* Usage: | |
* 1. Import "elevations" from this file | |
* import { elevations } from "config/elevations"; | |
* 2. Use it. Assuming you need an elevation of 2 (based on the Android | |
* elevation standard), doing the following will cast the same shadow | |
* on both platforms: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, PropTypes } from 'react' | |
import { Dimensions, Modal, StyleSheet } from 'react-native' | |
import { View } from 'react-native-animatable' | |
const DEVICE_WIDTH = Dimensions.get('window').width | |
const DEVICE_HEIGHT = Dimensions.get('window').height | |
const DEFAULT_COLOR = '#001a33' | |
export default class CustomModal extends Component { | |
static propTypes = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { call, put } from 'redux-saga/effects' | |
import * as parseService from '../services/parseService' | |
import { actionTypes as authActionTypes } from '../reducers/authReducer' | |
import { actionTypes as navigationActionTypes } from '../reducers/navigationReducer' | |
import * as routes from '../config/routes' | |
export function* autoLogin (action) { | |
const user = yield call(parseService.currentUser) | |
if (user) { | |
yield call(loginSuccess, user) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect, useRef } from "react"; | |
interface Parameters { | |
key: string; | |
ctrlKey?: boolean; | |
shiftKey?: boolean; | |
metaKey?: boolean; | |
onKeyDown?: (e: KeyboardEvent) => void; | |
onKeyUp?: (e: KeyboardEvent) => void; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Deno CLI script to add reminders to Apple's Reminders app parsing the | |
// due date with natural language. | |
// Requires reminders-cli (https://github.com/keith/reminders-cli) to be | |
// installed in order to run. Uses reminders-cli instead of Applescript/JXA | |
// because reminders-cli is much faster. | |
// Uses chrono-node (https://github.com/wanasit/chrono) to parse the date (which | |
// in my opinion works better than reminders-cli natural lanaguage parser). | |
// | |
// Example usage: | |
// ``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<link | |
rel="stylesheet" | |
href="https://unpkg.com/purecss@2.0.6/build/pure-min.css" | |
integrity="sha384-Uu6IeWbM+gzNVXJcM9XV3SohHtmWE+3VGi496jvgX1jyvDTXfdK+rfZc8C1Aehk5" | |
crossorigin="anonymous" | |
id="purecss" | |
/> | |
<p>Hello world</p> |