Skip to content

Instantly share code, notes, and snippets.

View 509dave16's full-sized avatar

David Fall 509dave16

  • ex-Gopuff
  • Spokane, WA
View GitHub Profile
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
View,
TouchableHighlight,
Button
} from 'react-native';
@509dave16
509dave16 / yarn_and_yarn_run_test-runners_output.txt
Created January 5, 2018 20:05
Output from 'yarn' and 'yarn run test-runners' output
realm-js git:(master) ✗ nvm use default
Now using node v8.6.0 (npm v5.3.0)
➜ realm-js git:(master) ✗ yarn
yarn install v1.3.2
[1/5] 🔍 Validating package.json...
[2/5] 🔍 Resolving packages...
[3/5] 🚚 Fetching packages...
[4/5] 🔗 Linking dependencies...
[5/5] 📃 Building fresh packages...
$ node-pre-gyp install --fallback-to-build
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
} from 'react-native';
class DogModel {
public static schema: Realm.ObjectSchema = {name: 'Dog', properties: {name: 'string'} };
public name: string ;
{
"compilerOptions": {
"jsx": "react",
"target": "es5",
"module": "es2015",
"types": ["react", "react-native", "jest", "realm"],
"lib": ["es2015", "dom"],
"moduleResolution": "node",
"experimentalDecorators": true,
"noEmit": true,
{
"name": "AwesomeProjectTS",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "react-native start --transformer node_modules/react-native-typescript-transformer/index.js --skipflow --sourceExts ts,tsx",
"test": "jest"
},
"dependencies": {
"react": "16.2.0",
@509dave16
509dave16 / sample-json-schema.json
Last active June 14, 2018 17:54
Sample JSON Schema
{
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"pattern": "^\\w+\\s\\w+$"
},
"username": {
"type": "string",
import './style';
import react, {Component} from 'react';
import { render } from 'react-dom';
import Framework7 from 'framework7';
import Framework7React, {App as F7App, View, Page} from 'framework7-react';
import Something from './something/something';
Framework7.use(Framework7React);
class TestPage extends Component {
render() {
@509dave16
509dave16 / preact.config.js
Created June 24, 2018 02:05
Sample preact.config.js with wepback modifications
/**
* Function that mutates original webpack config.
* Supports asynchronous changes when promise is returned.
*
* @param {object} config - original webpack config.
* @param {object} env - options passed to CLI.
* @param {WebpackConfigHelpers} helpers - object with useful helpers when working with config.
**/
import AggressiveMergingPlugin from "./node_modules/webpack/lib/optimize/AggressiveMergingPlugin";
import CompressionPlugin from "compression-webpack-plugin";
@509dave16
509dave16 / .eslintrc.json
Created June 24, 2018 02:06
Sample eslint config file
{
"rules": {
"indent": ["error", 2],
"linebreak-style": ["error", "unix"]
}
}
@509dave16
509dave16 / firebase.json
Created June 24, 2018 02:08
Example firebase config file
{
"hosting": {
"public": "www",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{