This Gist was automatically created by Carbide, a free online programming environment.
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
;(function(){ | |
/** | |
* Require the given path. | |
* | |
* @param {String} path | |
* @return {Object} exports | |
* @api public | |
*/ | |
function require(path, parent, orig) { |
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'; | |
(function() { | |
var $window, parallaxItems, addParallaxItem, removeParallaxItem, updateParallax; | |
angular.module('app.Components.ParallaxBox', []) | |
.directive('parallaxBox', function() { | |
return { |
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
(function () { | |
'use strict'; | |
angular.module('app.Components.InputTypeFile', []) | |
// When required, this module will automatically handle | |
// `ng-model` in file inputs. | |
// | |
// Usage: | |
// |
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 { Observable } from 'rx'; | |
import Cycle from '@cycle/core'; | |
import { makeDOMDriver, hJSX } from '@cycle/dom'; | |
import isolate from '@cycle/isolate'; | |
// A helper method to streamline the creation of CycleJS components | |
export function makeComponent(...funcs) { | |
return (isolationName) => isolate(function(sources) { | |
const sinks = funcs.reduce((steps, f) => { |
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
// A Mobx friendly utility to ease the late dereference of | |
// objects' observable properties. | |
// Using Ramda here but you can use your own version of these functions | |
import { path, init, last, mapObjIndexed } from 'ramda'; | |
// This is the supporting class, see `late` and `deref` later for actual use | |
class LateDeref { | |
constructor(obj, field) { | |
this.obj = obj; |
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
function makeSubject() { | |
const COMPLETE = {}; | |
let send; | |
let error; | |
let deferred; | |
const subject = async function * () { | |
while(true) { | |
const data = await deferred; | |
if (data === COMPLETE) { | |
return; |