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
var defaults = function(obj, source) { | |
for (var prop in source) { | |
if (obj[prop] === undefined) obj[prop] = source[prop]; | |
} | |
return obj; | |
} | |
var stringifyGETParams = function(url, data) { | |
var query = ''; | |
for (var key in data) { |
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 { createRafDriver, ISheet, val } from '@theatre/core' | |
import WebMMuxer from 'webm-muxer' | |
export const rafDriver = createRafDriver({ name: 'Hubble rAF driver' }) | |
export const useRenderer = ({ | |
sheet, | |
fps = 30, | |
bitrate = 1e6, | |
}: { |
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
const fs = require('node:fs'); | |
const cp = require('node:child_process'); | |
const path = require('node:path'); | |
const { optimize } = require('svgo'); | |
const renderSvg = require('lottie-to-svg'); | |
const paper = require('paper'); | |
const { JSDOM } = require('jsdom'); | |
const svgFlatten = require('svg-flatten'); |
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
.env | |
node_modules/ | |
*.png |
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
// Welcome! require() some modules from npm (like you were using browserify) | |
// and then hit Run Code to run your code on the right side. | |
// Modules get downloaded from browserify-cdn and bundled in your browser. | |
const React = require('react'); | |
const ReactDOM = require('react-dom'); | |
let interval | |
const COUNT = 20 |
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 supercluster from 'supercluster' | |
import tilebelt from 'tilebelt' | |
import { max } from 'd3-array' | |
import db from './db' | |
import getMarkers from './markers' | |
const MIN_ZOOM = 1 | |
const MAX_STATE_ZOOM = 7 | |
const MAX_COUNTY_ZOOM = 9 |
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
var runner = document.querySelector('.ticker'), // a <ul> | |
frames = runner.children, | |
timeout = 4000; // in ms | |
var cycleFrames = function() { | |
var child = runner.removeChild(frames[0]).cloneNode(true); | |
runner.appendChild(child); | |
} | |
// from https://gist.github.com/joelambert/1002116 |
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
var SelectView = Backbone.View.extend({ | |
el: '#my-select', | |
events: { | |
'change': 'addToList' | |
}, | |
render: function() { | |
this.collection.each(function(item) { | |
var optionView = new OptionView({model: item}); |
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
var allTheaters = []; | |
var nycZips = [ | |
// Greenpoint | |
11211, 11222, | |
// Bushwick & Williamsburg | |
11206, 11221, 11237, | |
// Greenwich Village & Soho |
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
ReactDOM = require 'react/lib/ReactDOM' | |
ReactElement = require 'react/lib/ReactElement' | |
ReactElementValidator = require 'react/lib/ReactElementValidator' | |
SVGDOMPropertyConfig = require 'react/lib/SVGDOMPropertyConfig' | |
MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE | |
createFactory = if __DEV__ | |
ReactElementValidator.createFactory | |
else | |
ReactElement.createFactory |
NewerOlder