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 {random} from 'lodash'; | |
// import {run} from 'modules/engine'; | |
// run(); | |
const width = 320; | |
const height = 200; | |
const maxHeat = 255; | |
const size = width * height; |
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
export {default as Parallax} from './parallax.js'; | |
export {default as default} from './parallax.js'; | |
export {Layer as Layer} from './layer.js'; |
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 React, {PropTypes} from 'react'; | |
import TransitionGroup from 'react-addons-css-transition-group'; | |
import styles from './testThing.scss'; | |
function randomItem() { | |
return { | |
name: Array(Math.floor(Math.random() * 15)).join('a'), | |
key: Math.random() | |
} | |
} |
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
<snippet> | |
<content><![CDATA[ | |
import React, {PropTypes} from 'react'; | |
//import styles from './${TM_FILENAME/(.+).js/\1/g}.scss'; | |
class ${TM_FILENAME/(.+).js/\u\1/g} extends React.Component { | |
static defaultProps = { | |
$4 | |
}; |
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 React, {PropTypes} from 'react'; | |
import TransitionGroup from '../transitionGroup'; | |
class StaggeredTransitionGroup extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
count: 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
// This is a modified version of vps.js for use with cloudserver presales. | |
// TODO: refactor configurator to be a class which is extended by VPS and Cloud. | |
(function ($) { | |
'use strict'; | |
var capitalize = function (str) { | |
return str.charAt(0).toUpperCase() + str.slice(1); | |
}; | |
// Model |
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 ($) { | |
/** | |
* Override console in this scope so we can squash errors. | |
*/ | |
var con = window.console; | |
var console = { | |
log: function () { | |
con && con.log && con.log(Array.prototype.slice.call(arguments)); | |
}, |
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
$(document).on("click", ".edit_trigger", function () { | |
var $trigger = $(this); | |
// Find linked editable | |
var editableID = $trigger.data("editable"); | |
var $editable = $("#" + editableID); | |
// Replace editable with input. | |
var $input = $("<input>").val($editable.html().trim()); | |
$editable |
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 A = function (props) { | |
this.properties = props; | |
this.constructor.addModel(this); | |
}; | |
A.models = []; | |
A.addModel = function (model) { | |
model.properties.id = this.models.length + 1; | |
this.models.push(model); |
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 createPoller = function (pollFunc, interval) { | |
var timeout; | |
var poll = function () { | |
pollFunc(); | |
timeout = setTimeout(poll, interval); | |
}; | |
return { | |
start: function () { |
NewerOlder