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
/* | |
From https://github.com/gulpjs/gulp/issues/101. Organize gulpfile.js using concept of environment variables. | |
1. Set up sub-tasks to behave in a certain according to env var; may be env agnostic. | |
2. Set up high-level tasks to run a group of sub-tasks to orchestrate a behaviour (testing, staging, prod, etc) | |
*/ | |
var R = 0; | |
var ENV_SWITCH = void 0; |
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
/* gulpfile.js - https://github.com/wearefractal/gulp */ | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var coffee = require('gulp-coffee'); | |
var path = require('path'); | |
var srcCoffeeDir = './coffee/'; | |
var destDir = './src/'; |
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
#!/bin/sh | |
# script for optimizing images in a directory (recursive) | |
# pngcrush & jpegtran settings from: | |
# http://developer.yahoo.com/performance/rules.html#opt_images | |
# pngcrush | |
for png in `find $1 -iname "*.png"`; do | |
echo "crushing $png ..." | |
pngcrush -rem alla -reduce -brute "$png" temp.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
const Immutable = require('immutable'); | |
const Cursor = require('immutable/contrib/cursor'); | |
const immstruct = require('immstruct'); | |
const Iterable = Immutable.Iterable; | |
/** | |
(work in progress) | |
Wrapped immutable.js cursors: |
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
/** | |
* Events utility mixin for immstructor | |
*/ | |
var | |
Promise = require('bluebird'); | |
var | |
// TODO: Expose this? | |
/** |
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
// custom jshint-loader reporter | |
// Based on https://github.com/sindresorhus/jshint-stylish | |
var | |
beeper = require('beeper'), | |
chalk = require('chalk'), | |
table = require('text-table'), | |
stringLength = require('string-length'), | |
logSymbols = require('log-symbols'); | |
function pluralize(str, count) { |
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 structure = immstruct({turtles: []}); | |
var TurtlesComponent = React.createClass({ | |
componentWillMount: function() { | |
this.setState({turtlesCursor: structure.cursor()} | |
structure.on('swap', () => | |
this.setState({turtlesCursor: structure.cursor()})); |
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"; | |
/** | |
* Deps: | |
* npm install benchmark EventEmitter3 | |
*/ | |
var EventEmitter = require('events').EventEmitter; | |
var bus = new EventEmitter(); | |
function nextTick(callback) { | |
// setTimeout(callback, 0); |
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 mori = require("mori"); | |
function Calendar(appointments, previousCalendar) { | |
appointments = appointments; | |
var cal = {}; | |
cal.add = function(appointment) { | |
var withAppointments = mori.conj(appointments, appointment); | |
return Calendar(withAppointments, cal); |
NewerOlder