View fire.js
import {random} from 'lodash';
// import {run} from 'modules/engine';
// run();
const width = 320;
const height = 200;
const maxHeat = 255;
const size = width * height;
View testThing.js
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()
}
}
View rcl.sublime-snippet
<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
};
View index.js
export {default as Parallax} from './parallax.js';
export {default as default} from './parallax.js';
export {Layer as Layer} from './layer.js';
View cloudServers.js
// 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
View staggeredTransitionGroup.js
import React, {PropTypes} from 'react';
import TransitionGroup from '../transitionGroup';
class StaggeredTransitionGroup extends React.Component {
constructor(props) {
super(props);
this.state = {
count: 0
};
}
View dark-top.css
.cc_banner-wrapper {
z-index: 9001;
position: relative
}
.cc_container .cc_btn {
cursor: pointer;
text-align: center;
font-size: 0.6em;
transition: font-size 200ms;
line-height: 1em
View holdListener.js
import React from 'react'
class HoldListener extends React.Component {
constructor() {
super();
}
handleMouseDown() {
this.timeout = setTimeout(this.props.onHold, this.props.threshold);
}
View wrappedResource.js
var wrappedResourceMethods = [
'get', 'query'
];
var wrappedResource = function (resource) {
_.each(wrappedResourceMethods, function (method) {
if (_.has(resource, method)) {
var originalMethod = resource[method];
resource[method] = function () {
var result = originalMethod.apply(this, arguments);