See the Summary section.
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, { useState, useEffect } from "react"; | |
import { | |
StyleSheet, | |
Text, | |
View, | |
ActivityIndicator, | |
Alert, | |
Button, | |
} from "react-native"; | |
import * as Location from "expo-location"; |
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 { useEffect, useState } from "react"; | |
import { useSelector } from "react-redux"; | |
export const FIRESTORE_META_ID = "__META_ID__"; | |
/** | |
* A custom hook to query the "vehicles" top collection of a Firestore database. | |
* | |
* @param {Firestore} firestore - instance of firestore, such as you get in props when a parent component is wrapped in `withFirestore()` | |
* @param {number} pageNum - the current page number to fetch; first page is 0, second page is 1, etc... |
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
#include <ESP8266WiFi.h> | |
#include <ESP8266HTTPClient.h> | |
const char* ssid = "xxx"; | |
const char* password = "xxxxxxx"; | |
const char* url = "https://api.angelcam.com/v1/events/"; | |
const char* fingerprint = "51 87 10 92 52 38 41 A9 SD 23 V3 23 72 58 SE EF 06 8D 35 4C"; |
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
/** | |
* A React component: | |
* r1. name starts with a Capital letter | |
* r2. gets a single argument, typically referred to as "props", that is an object containing all properties passed in | |
* r3. can use hooks (useState, useEffect, useRef, etc...) | |
* r4. returns JSX | |
**/ | |
/** r1. name starts with a Capital letter */ | |
/** r2. gets a single argument, typically named "props" */ |
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
// This answer comes in 2 flavours: the "plays nice with others" version and the "hax0rz rUlez!!" version. | |
// | |
//-------------------------------------------------------------------------------------- | |
// PLAYS NICE WITH OTHERS: | |
// | |
const arr2num = (arr) => { | |
return arr | |
.reverse() // work from least-to-most significant digits | |
.reduce( |
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
09-26 13:53:23.229 1397 5471 W audio_hw_generic: Not supplying enough data to HAL, expected position 2427928 , only wrote 2427853 | |
09-26 13:53:23.236 6517 6654 E unknown:ViewManager: Error while updating prop left | |
09-26 13:53:23.236 6517 6654 E unknown:ViewManager: java.lang.reflect.InvocationTargetException | |
09-26 13:53:23.236 6517 6654 E unknown:ViewManager: at java.lang.reflect.Method.invoke(Native Method) | |
09-26 13:53:23.236 6517 6654 E unknown:ViewManager: at abi38_0_0.com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagersPropertyCache.java:7) | |
09-26 13:53:23.236 6517 6654 E unknown:ViewManager: at abi38_0_0.com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackShadowNodeSetter.setProperty(ViewManagerPropertyUpdater.java:2) | |
09-26 13:53:23.236 6517 6654 E unknown:ViewManager: at abi38_0_0.com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:14) | |
09-26 13:53:23.236 6517 6654 E unknown:ViewMa |
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 from "react"; | |
import Login from "../components/Login"; | |
import Landing from "../Pages/Landing"; | |
function Home(props) { | |
const [user, setUser] = useState(); | |
return ( | |
<div> | |
{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
#!/bin/bash | |
set -e # exit when any command fails | |
function LOG() { | |
printf 'LOG: %s %s\n' "$(date '+%b-%d %T')" "${1}" | |
} | |
function CLONE_GITHUB_REPO() { | |
# | |
# EAS_SCRT_GITHUB_CONFIG_REPOS_TOKEN is an account-level Secret stored in our Expo account's Settings |
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, {useContext, useState} from 'react'; | |
import {StyleSheet, Dimensions, View, Platform} from 'react-native'; | |
import {List, Button, Text} from 'react-native-paper'; | |
import * as Sentry from '@sentry/react-native'; | |
import * as Updates from 'expo-updates'; | |
import Constants from 'expo-constants'; | |
import { | |
widthPercentageToDP as wPct, |
OlderNewer