Skip to content

Instantly share code, notes, and snippets.

@natew
natew / 1stdout
Last active January 20, 2016 06:30
➜ ~ npm install -g flint
npm WARN install:[email protected] ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/flint/node_modules/flint-runner/node_modules/alphanum-sort' -> '/usr/local/lib/node_modules/flint/node_modules/alphanum-sort'
npm WARN install:[email protected] ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/flint/node_modules/flint-runner/node_modules/amdefine' -> '/usr/local/lib/node_modules/flint/node_modules/amdefine'
npm WARN install:[email protected] ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/flint/node_modules/flint-runner/node_modules/ansi-styles' -> '/usr/local/lib/node_modules/flint/node_modules/ansi-styles'
npm WARN install:[email protected] ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/flint/node_modules/flint-runner/node_modules/ansi-wrap' -> '/usr/local/lib/node_modules/flint/node_modules/ansi-wrap'
npm WARN install:[email protected] ENOENT: no such file or directory, rename '/usr/local/lib/node_mo
@natew
natew / firsttry.js
Created February 4, 2016 00:58
attempting to corral giant view
function getSource() {
if (source.hasOwnProperty('length')) {
return new Map(source.map((item) => [item, item]))
} else {
return new Map(Object.keys(source).map((key) => [key, source[key]]))
}
}
function getQuery(key) {
return !multiple && value ? getSource().get(key) : ''
@natew
natew / v1.js
Last active February 14, 2016 19:02
view Gallery {
let data
(async () =>
data = await fetch.data($`
User {
pictures(first: 10) {
count, pictures
}
}
@natew
natew / carousel.js
Created February 20, 2016 21:21
carousel-motion-derivable
/*! __LICENSE__ */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Horizon=e():t.Horizon=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}(function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(typeof t[e]){case"function":break;case"object":t[e]=function(e){var n=e.slice(1),r=t[e[0]];return function(t,e,o){r.apply(this,[t,e,o].concat(n))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(t,e,n){"use strict";n(89),n(88),n(90),n(91),"undefined"!=typeof window&&("undefined"!=typeof window.Rx||(window.Rx=n(10))),t.exports=n(77)},[188,74,51,9],function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")()
'use strict'
/* @flow */
import { Emitter, CompositeDisposable } from 'sb-event-kit'
import { getRandomInt } from '$helpers.js'
import type { Disposable } from 'sb-event-kit'
type Config = {
host: string
}
import Database from '$stores/db'
import Select from 'react-select'
import * as T from '../../types'
type HeaderState = { value: number }
type PropsState = { data: { items: Array<T.ItemEntry> } }
@Database.provide()
@component
export default class Header {
{
"Profiles": [
{
"Link Color" : {
"Red Component" : 0.5272001028060913,
"Color Space" : "Calibrated",
"Blue Component" : 0.9352657198905945,
"Alpha Component" : 1,
"Green Component" : 0.7122980356216431
},
<VictoryChart
height={height}
width={width}
>
<VictoryArea
animate={{ duration: 100 }}
interpolation="stepAfter"
style={{
data: {
fill: '#fff178',
{
"data": {
"get": {
"getDimensions": {
"lows": "[[null,null],[-1.5896538496,1.42131984234],[-1.59024405479,1.42128765583],[-1.59193897247,1.42103493214],[-1.59193098545,1.42079949379],[-1.60010409355,1.42653727531],[-1.59683990479,1.42475187778],[-0.222584158182,-0.503785014153],[-0.218509122729,-0.506726443768],[0.463188052177,-1.20419502258],[-0.216254755855,-0.508005559444],[-1.88223266602,1.60256564617],[-1.082924366,0.409523248672],[-0.273515462875,-0.561486005783],[-1.84869134426,1.54470205307],[-1.07305586338,0.40146163106],[-1.06311476231,0.393994688988],[0.453633099794,-1.28270220757],[-0.254591584206,-0.576505601406],[-1.58123731613,1.42022931576],[-0.210219934583,-0.509812355042],[0.485451281071,-1.21823740005],[0.516267478466,-1.24821436405],[0.411454707384,-1.28829181194],[0.417188256979,-1.29346489906],[0.375967681408,-1.25528919697],[0.376130640507,-1.25581371784],[-0.300871729851,-0.564482271671],[-1.82346487045,1.48116350174],[-1.07748162746,0.414052993059],[-1.0755376815