Skip to content

Instantly share code, notes, and snippets.

const React = require('react');
const TestUtils = React.addons.TestUtils;
const Checkbox = React.createClass({
render() {
return <input type="checkbox"></input>
}
});
describe('Checkbox', function() {
# Box https://github.com/phusion/open-vagrant-boxes
Vagrant.configure("2") do |config|
config.vm.box = "phusion-open-ubuntu-12.04-amd64"
# This is a built box that builds boxes
config.vm.provision "docker",
images: ["phusion/baseimage"]
end
@marr
marr / app.js
Created March 1, 2014 10:53 — forked from Siedrix/app.js
var express = require('express');
var app = express();
app.get('/', function (req, res) {
res.send('Express.js Hello world');
});
app.listen(8000);
use Test::More;
use strict;
plan (($ENV{TESTING_APP_ID} and $ENV{TESTING_SECRET}) ? (tests => 1) : (skip_all => 'TESTING_APP_ID and TESTING_SECRET both need to be set'));
use_ok 'Dancer';
var gulp = require('gulp'), livereload = require('gulp-livereload'),
gutil = require('gulp-util'),
dest = 'build';
gulp.task('staticsvr', function(next) {
var staticS = require('node-static'),
server = new staticS.Server('./' + dest),
port = 8000;
require('http').createServer(function (request, response) {
request.addListener('end', function () {
@marr
marr / gist:66b6720bb8149ba9aef1
Created September 23, 2014 18:49
From generator-react-webpack
(function() {
var Ap = Array.prototype;
var slice = Ap.slice;
var Fp = Function.prototype;
if (!Fp.bind) {
// PhantomJS doesn't support Function.prototype.bind natively, so
// polyfill it whenever this module is required.
Fp.bind = function(context) {
/** @jsx React.DOM */
'use strict';
var Form = require('newforms');
var React = require('react');
module.exports = React.createClass({
propTypes: {
form: React.PropTypes.object,
choices: React.PropTypes.array,
var self = this;
var setupCanvas = function() {
var w = this.naturalWidth,
h = this.naturalHeight,
aspectRatio = w / h;
var scaled = (h != this.naturalHeight || w != this.naturalWidth);
var sixteenByNine = 16 / 9;
@marr
marr / patch
Created February 10, 2015 07:12
diff --git a/campaign.json b/campaign.json
index e69de29..dbe4cff 100644
--- a/campaign.json
+++ b/campaign.json
@@ -0,0 +1,34 @@
+{
+ "campaign": {
+ "id": 1,
+ "guid": "CMP12345",
+ "title": "Senior Prank: Dumpsville College",
var webpack = require('webpack'),
bourbon = require('node-bourbon').includePaths;
var envPlugin = new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV || 'development')
}
});
module.exports = {