See also:
Service | Type | Storage | Limitations |
---|---|---|---|
Amazon DynamoDB | 25 GB | ||
Amazon RDS | |||
Azure SQL Database | MS SQL Server | ||
👉 Clever Cloud | PostgreSQL, MySQL, MongoDB, Redis | 256 MB (PostgreSQL) | Max 5 connections (PostgreSQL) |
import { Entypo, Feather } from '@expo/vector-icons'; | |
import faker from 'faker'; | |
import * as React from 'react'; | |
import { Dimensions, FlatList, Text, TouchableOpacity, View } from 'react-native'; | |
const { width, height } = Dimensions.get('screen'); | |
faker.seed(10); | |
const data = [...Array(20).keys()].map(() => ({ |
/** | |
* Converts pixel size to rem and accepts the base as second argument. default base is 16px | |
* | |
* @param {number|string} px | |
* @param {number} base | |
* @return {string} | |
*/ | |
const remCalc = (px: number | string, base: number = 16) => { | |
const tempPx = `${px}`.replace('px', '') |
function sleep(delay) { | |
var start = new Date().getTime(); | |
while (new Date().getTime() < start + delay) ; | |
} | |
function convertTime(hours) { | |
var realHours = Math.floor(hours); | |
var minutes = (hours - realHours) * 60; | |
var realMinutes = Math.round(minutes); | |
var realSeconds = ((hours - realHours) + (minutes - realMinutes)) * 60; |
See also:
Service | Type | Storage | Limitations |
---|---|---|---|
Amazon DynamoDB | 25 GB | ||
Amazon RDS | |||
Azure SQL Database | MS SQL Server | ||
👉 Clever Cloud | PostgreSQL, MySQL, MongoDB, Redis | 256 MB (PostgreSQL) | Max 5 connections (PostgreSQL) |
If you are using Firebase on a Spark (free) plan, you can only make outbound networking requests to Google services. Unfortunately, that does not include Web app deployed from App Script (script.google.com/macros/s/.../exec). (Stackoverflow #43330192)
This is a crude example showing how to execute Apps Script using the scripts.run
method of Apps Script API.
In this example, the Firebase app does not store the user's OAuth id token, does not validate the access token (e.g. the access token is issued for your project, not someone else's), and does not store the refresh token (access token will expire 60min after issue if not refreshed). For production, these issues must be resolved.
var count =Math.floor(Math.random()*100); | |
process.on('message', (msg)=>{ | |
console.log("CHILD: message received from parent process", msg); | |
count = parseInt(msg) +1; | |
console.log("CHILD: +1 from child"); |
service: service-name | |
provider: | |
name: aws | |
runtime: nodejs6.10 | |
functions: | |
myfunc: | |
handler: handler.myfunc |
import firebase from 'firebase' | |
import { filter, map } from 'lodash' | |
import { makeExecutableSchema } from 'graphql-tools' | |
firebase.initializeApp({ | |
databaseURL: 'https://grafire-b1b6e.firebaseio.com', | |
}) | |
const mapSnapshotToEntity = snapshot => ({ id: snapshot.key, ...snapshot.val() }) | |
const mapSnapshotToEntities = snapshot => map(snapshot.val(), (value, id) => ({ id, ...value })) |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.