"scripts": { "postinstall": "rndebugger-open" }
This file contains hidden or 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
// Firebase rules for restricting logged in users to their own bucket. SOmething like multi tenancy | |
{ | |
"rules": { | |
"users": { | |
"$uid": { | |
".read": "$uid === auth.uid", | |
".write": "$uid === auth.uid" | |
} | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
This file contains hidden or 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
const courseMap = { | |
C: ['A', 'B', 'F', 'H', 'D', 'G'], | |
B: ['K', 'L'], | |
H: ['E', 'J'], | |
D: ['A', 'B'] | |
}; | |
const learnCourse = (course) => { | |
const coursesChecked = {}; |
This file contains hidden or 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 UIKit | |
func bottlesLyrics(numberOfBottles: Int) { | |
for bottles in (1...numberOfBottles).reversed() { | |
let bottlesMinusOne = bottles - 1 | |
let bottleTag = bottles == 1 ? "bottle" : "bottles" | |
var computedString = "" | |
if bottlesMinusOne == 0 { | |
computedString = "no more bottles" |
This file contains hidden or 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 method of solving the fibonacci sequence assumes that since the first three values never change, just state it | |
// and start index 3 | |
// Fibonacci sequence example: [0, 1, 1, 2, 3, 5, 8, 13, 21, 34] | |
// Under *Dynamic Programming*: https://www.ics.uci.edu/~eppstein/161/960109.html | |
// 1st iteration | |
func fibonacci(until: Int) { | |
var f = [0, 1, 1] | |
for i in 3...until { | |
f.append(f[i-2] + f[i-1]) |
This file contains hidden or 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, { PureComponent } from 'react'; | |
import { View, Text, NetInfo, Dimensions, StyleSheet } from 'react-native'; | |
const { width } = Dimensions.get('window'); | |
function MiniOfflineSign() { | |
return ( | |
<View style={styles.offlineContainer}> | |
<Text style={styles.offlineText}>No Internet Connection</Text> | |
</View> |
This file contains hidden or 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, { PureComponent } from 'react'; | |
import { View, Animated } from 'react-native'; | |
import AddButton from './AddButton'; | |
import MinusButton from './MinusButton'; | |
import Counter from './Counter'; | |
export default class CompleteComponent extends PureComponent { | |
state = { | |
counter: 1 | |
}; |