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
// Simple stopwatch. Make a new stopwatch with any html element. | |
// Usage: var sw = new Stopwatch('span.elapsedTime'); | |
// or: var sw = new Stopwatch(el); | |
// Output: 0.1s, 7.3s, etc | |
function Stopwatch(selector) { | |
this.element = typeof selector === 'string' ? document.querySelector(selector) : selector; | |
this.time = 0; | |
this.accuracy = 1; | |
this.element.innerText = '0.0s'; |
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
"use strict"; | |
var defaults = { | |
message: { | |
idle: { | |
main: 'Drop an image here', | |
sub: '(or click to select a file)' | |
}, | |
loading: { | |
main: 'Loading...', |
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
// SettingsController.test.js | |
import { SettingsController } from '../SettingsController' | |
const defaultOptions = [{ | |
name: 'Enable sunshine', | |
value: false | |
}, { | |
name: 'Enable moonlight', | |
value: true |
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
// src/api.js | |
require('dotenv') | |
const { API_CLIENT_ID, API_CLIENT_SECRET } = process.env | |
const API_BASE = 'https://api.typeform.com' | |
class Api { | |
} |
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 { StyleSheet, Text, View, | |
TouchableOpacity, Linking, ActivityIndicator } from 'react-native' | |
import Api from './api' | |
export default class App extends React.Component { | |
state = { | |
loading: true, | |
loggedIn: false, | |
loginError: false |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"lambda:CreateFunction", | |
"s3:Get*", | |
"iam:CreateRole", |
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
service: oauth | |
app: helpful-oauth | |
tenant: alexbass | |
provider: | |
name: aws | |
runtime: nodejs8.10 | |
profile: serverless |
OlderNewer