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
// Easing.easeInElastic(percent); | |
var Easing = { | |
// t: current time, b: begInnIng value, c: change In value, d: duration | |
swing: function (x, t, b, c, d) { | |
if (arguments.length === 1) { | |
t = arguments[0]; x = 0; b = 0; c = 1; d = 1; | |
} | |
return Easing.easeOutQuad(x, t, b, c, d); | |
}, |
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
/* Component CSS for TestName */ | |
.app-component.app-test-name { | |
width: 100px; | |
height: 100px; | |
} | |
.app-component.app-test-name.app-test-name_state-test { | |
width: 223px; | |
} | |
.app-component.app-test-name .app-test-name_header { | |
width: 100px; |
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
@component TestName { | |
width: 100px; | |
height: 100px; | |
.state-test & { | |
width: 223px; | |
} | |
.header { | |
width: 100px; |
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 would add variable support and inline JS support | |
var RCSPreprocess = (function () { | |
var varRegExp = /\$([a-z0-9-_]+)/ig, | |
singleVarRegExp = /\$([a-z0-9-_]+)/i, | |
codeRegExp = /\$\{([\s\S]+)\}\$/igm, | |
varDefineRegExp = /\$([a-z0-9-_]+): ([^;]+);/ig, | |
rcsVars = {}; | |
function process (example) { | |
example = example.replace(varDefineRegExp, function (string, name, value) { |
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 WrappedOverlayExample = React.createClass({ | |
handleClose: function () { | |
this.refs.overlay.fadeOut(function () { | |
this.props.onClose(); | |
}.bind(this)); | |
}, | |
render: function () { | |
return ( | |
<Overlay ref="overlay"> |
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(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) | |
/******/ return installedModules[moduleId].exports; |
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
// routes/products.js | |
module.exports = [ | |
{ | |
method: 'GET', | |
path: '/products', | |
config: { | |
validate: { | |
query: { | |
name: Joi.string().required(), |
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 RCSPropertiesInit (Properties) { | |
Properties.setBaseUrl('/'); | |
// defaulting number values to px values | |
Properties.registerProperty(/.*/, function (name, value) { | |
var stringValue = String(value), | |
numberPropertyKeys = /^(?:column-count|fill-opacity|flex|flex-grow|flex-shrink|font-weight|line-clamp|opacity|order|orphans|widows|z-index|zoom)$/, | |
numberValues = /^([a-z0-9.]+) ?(?:([a-z0-9.]+) ?)?(?:([a-z0-9.]+) ?)?(?:([a-z0-9.]+) ?)?$/; | |
if (name.match(numberPropertyKeys) || !numberValues.test(stringValue)) { |
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() { | |
var tag = document.querySelector( | |
'script[type="application/javascript;version=1.7"]' | |
); | |
if (!tag || tag.textContent.indexOf('window.onload=function(){') !== -1) { | |
alert('Bad JSFiddle configuration, please fork the original React JSFiddle'); | |
} | |
tag.setAttribute('type', 'text/jsx;harmony=true'); | |
tag.textContent = tag.textContent.replace(/^\/\/<!\[CDATA\[/, ''); | |
})(); |
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
// | |
// GameControls.h | |
// Hiss | |
// | |
// Created by Chad Scira on 6/21/14. | |
// Copyright (c) 2014 Chad Scira. All rights reserved. | |
// | |
#import <SpriteKit/SpriteKit.h> |