Skip to content

Instantly share code, notes, and snippets.

View captainill's full-sized avatar

Jonathan Thomas captainill

View GitHub Profile
define(function () {
'use strict';
var _ = require('underscore');
var EDITABLE_STATE = 'editable',
SUBMITTING_STATE = 'submitting',
SUBMITTED_STATE = 'submitted';
define(function () {
'use strict';
var _ = require('underscore');
var ValidationMixin = {
getInitialState: function () {
return {
errors: []
// Usage example:
//
// willTransitionTo(transition, params) {
// transition.wait(
// observeStore(
// DraftStore,
// s => s.isLoaded()
// ).then(() => {
// if (DraftStore.isMissingTitle()) {
// transition.redirect('composeDraft', params);
/** @jsx React.DOM */
'use strict';
var React = require('react'),
Spinner = require('../atoms/Spinner');
function createAsyncPage(handlerPromiseFactory, displayName) {
var cachedHandler = null;
return React.createClass({
define(function () {
'use strict';
var _ = require('underscore');
var ValidationMixin = {
getInitialState: function () {
return {
errors: []
/** @jsx React.DOM */
/* jshint trailing:false, quotmark:false, newcap:false */
define(function (require) {
'use strict';
var React = require('react'),
Promise = require('bluebird'),
$ = require('jquery');

How to Post to a Google Spreadsheet

Part 1 - Setting up the Google Document

  • Go to Google Docs and create your spreadsheet
  • Give column names and make note of them as they become the names of your input fields
  • Give the spreadsheet the tab name of "DATA"
  • Click Tools > Script Editor
  • Choose 'Spreadsheet' under 'Create Script for'
@captainill
captainill / forego start output
Created February 25, 2014 01:15
forego start output
forego | starting web on port 5000
forego | starting worker on port 5100
web | Your Gemfile lists the gem pg (~> 0.17.0) more than once.
web | You should probably keep only one of them.
web | While it's not a problem now, it could cause errors if you change the version of just one of them later.
worker | Your Gemfile lists the gem pg (~> 0.17.0) more than once.
worker | You should probably keep only one of them.
worker | While it's not a problem now, it could cause errors if you change the version of just one of them later.
web | bin/web: line 6: unicorn: command not found
forego | shutting down
@captainill
captainill / bundle install issue
Created February 25, 2014 01:12
bundle install issue
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/vagrant/.rvm/rubies/ruby-2.0.0-p451/bin/ruby extconf.rb
Command 'qmake -spec linux-g++ ' not available
Makefile not found
Gem files will remain installed in /home/vagrant/.rvm/gems/ruby-2.0.0-p451/gems/capybara-webkit-1.1.1 for inspection.
Results logged to /home/vagrant/.rvm/gems/ruby-2.0.0-p451/extensions/x86_64-linux/2.0.0/capybara-webkit-1.1.1/gem_make.out
An error occurred while installing capybara-webkit (1.1.1), and Bundler cannot continue.
@captainill
captainill / Git list files changed in commit by name
Created December 5, 2013 22:24
Git list files changed in commit by name
git diff-tree --no-commit-id --name-only -r 0699061