https://firebase.google.com/docs/functions/config-env?hl=es-419
firebase functions:config:set gmail.email='someEmail' gmail.password='somePass'
const admin = require('firebase-admin'); | |
const fs = require('fs'); | |
const serviceAccount = require('../../../../../../Private/myschool-data_transfer-key.json'); | |
admin.initializeApp({ credential: admin.credential.cert(serviceAccount) }); | |
const schema = require('./schema').schema; | |
const firestore2json = (db, schema, current) => { |
https://firebase.google.com/docs/functions/config-env?hl=es-419
firebase functions:config:set gmail.email='someEmail' gmail.password='somePass'
{ | |
// TODO: remember: save changes of this on https://gist.github.com/sturmenta/eb93a8e1367d445b2bb81f5263db05f7 | |
// | |
// ─── rust ───────────────────────────────────────────────────────────────────────────── | |
// | |
"println": { | |
"prefix": "prt", | |
"body": [ | |
"println!(\"$1 = {:#?}\", $1);" | |
], |
import React from 'react'; | |
import { View, Text, StyleSheet } from 'react-native'; | |
const styles = StyleSheet.create({ | |
container: { | |
width: '100%', | |
alignItems: 'center', | |
height: 1, | |
marginBottom: 10, | |
marginTop: 10, |
export const arrayRemoveObject = (array: Object[] = [], toRemove: Object): Array<Object> => { | |
const tempArray = array.slice(); | |
if (JSON.stringify(tempArray).includes(JSON.stringify(toRemove))) { | |
return JSON.parse( | |
JSON.stringify(tempArray) | |
.replace(JSON.stringify(toRemove), '') | |
.split('},]') | |
.join('}]') | |
.split('",]') |
guide of how to use react-native-vector-icons on web with webpack and react-app-rewired
react-scripts start/build/test
) "start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test --env=jsdom",
const values = [ | |
{ K: 1000 }, | |
{ M: 1000000 }, | |
{ B: 1000000000 }, | |
{ Qd: 1000000000000 }, | |
{ Qt: 1000000000000000 }, | |
{ St: 1000000000000000000 }, | |
{ Sp: 1000000000000000000000 }, | |
{ O: 1000000000000000000000000 }, | |
{ N: 1000000000000000000000000000 }, |
const w = window.innerWidth; | |
export const isPhone = w >= 320 && w < 480; | |
export const isTablet = w >= 480 && w < 768; | |
export const isLargeTablet = w >= 768 && w < 1024; | |
export const isDesktop = w >= 1024 && w < 1280; | |
export const isLargeDesktop = w >= 1280; |
import React, { PureComponent } from 'react'; | |
import { AppNavigator, setTopLevelNavigator } from './navigation'; | |
import { KeyboardProvider } from './utils/keyboardContext'; | |
export default class App extends PureComponent { | |
render() { | |
return ( | |
<KeyboardProvider> | |
<AppNavigator ref={navigationRef => setTopLevelNavigator(navigationRef)} /> |
const numToRad = (num) => (num * Math.PI) / 180; | |
export const getDistFrom2GpsLocations = ({ lat1, long1, lat2, long2 }) => { | |
lat1 = parseFloat(lat1); | |
long1 = parseFloat(long1); | |
lat2 = parseFloat(lat2); | |
long2 = parseFloat(long2); | |
const R = 6371e3; | |
const φ1 = numToRad(lat1); |