Skip to content

Instantly share code, notes, and snippets.

View fastestOrange's full-sized avatar
🎯
Focusing

Chris Oliver fastestOrange

🎯
Focusing
  • Alden, MI
View GitHub Profile
@fastestOrange
fastestOrange / index.js
Created April 12, 2015 06:53
requirebin sketch
var dist = require('euclidean-distance');
var _ = require('lodash');
var nodes =[
{ id: 0,
breed: 'Pitbull',
genes: {
big: 7,
likesWater: 3,
shortHair: 10,
@fastestOrange
fastestOrange / index.js
Created April 12, 2015 06:53
requirebin sketch
var dist = require('euclidean-distance');
var _ = require('lodash');
var nodes =[
{ id: 0,
breed: 'Pitbull',
genes: {
big: 7,
likesWater: 3,
shortHair: 10,
const TCUserQuery = useCallback(() => {
return Object.keys(defaultTCs).map((tc) =>
rtdb.ref(`users/${tc}`).once('value'),
);
}, [defaultTCs, rtdb]);
useEffect(() => {
async function getTCContacts() {
const transactionCoordinatorsResponse = await Promise.all([TCUserQuery()]);
const whatMachine = Machine({
id: 'whatDoIDo?',
initial: 'loading',
context: {
retries: 0
},
states: {
loading: {
on: {
SUCCESS: "loaded",
import React from "react";
import { Machine, mapState, matchesState } from "xstate";
import cx from "classnames";
import nested from "nested-property";
import objectToNotation from "object-to-dot-notation";
export default class Lights extends React.PureComponent {
constructor(props) {
super(props);