This file contains hidden or 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
| "browserify-shim": { | |
| "react-module": { | |
| "depends": [ | |
| "react": "./vendor.js:react", | |
| "react-dom": "./vendor.js:react-dom" | |
| ] | |
| } | |
| }, |
This file contains hidden or 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 classnames from 'classnames' | |
| import React, { Component, PropTypes } from 'react' | |
| class Label extends Component { | |
| static propTypes = { | |
| input: PropTypes.object.isRequired, | |
| meta: PropTypes.object.isRequired | |
| }; | |
| render() { |
This file contains hidden or 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
| 12:03:39 PM web.1 | [nodemon] restarting due to changes... | |
| 12:03:39 PM web.1 | [nodemon] restarting due to changes... | |
| 12:03:39 PM web.1 | [nodemon] starting `node index.js` | |
| 12:03:39 PM web.1 | [nodemon] restarting due to changes... | |
| 12:03:39 PM web.1 | [nodemon] restarting due to changes... | |
| 12:03:39 PM web.1 | [nodemon] starting `node index.js` | |
| 12:03:39 PM web.1 | [nodemon] restarting due to changes... | |
| 12:03:39 PM web.1 | [nodemon] starting `node index.js` | |
| 12:03:39 PM web.1 | [nodemon] restarting due to changes... | |
| 12:03:39 PM web.1 | [nodemon] restarting due to changes... |
This file contains hidden or 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
| # OSX for Hackers (Mavericks/Yosemite) | |
| # | |
| # Source: https://gist.github.com/brandonb927/3195465 | |
| #!/bin/sh | |
| # Some things taken from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Ask for the administrator password upfront |
This file contains hidden or 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 async function findStaffById(id) { | |
| if (staff[id]) { | |
| return staff[id] | |
| } | |
| const url = endpoint(id).clone() | |
| const data = await secureFetch(url) | |
| staff[id] = camelify(data) |
This file contains hidden or 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 setRefunderOnRefund(historyItem) { | |
| historyItem.refunds.forEach(async refund => { | |
| const { requesterId } = refund | |
| if (staff[requesterId]) { | |
| refund.requester = staff[requesterId] | |
| } else { | |
| const requester = await findStaffById(requesterId) | |
| refund.requester = (requester.firstName.charAt(0) + requester.lastName).toLowerCase() | |
| staff[requesterId] = refund.requester | |
| } |
This file contains hidden or 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
| TypeError: Cannot read property 'done' of undefined | |
| at next (/Users/dm/cc/react-app/node_modules/co/index.js:98:14) | |
| at onFulfilled (/Users/dm/cc/react-app/node_modules/co/index.js:69:7) | |
| at /Users/dm/cc/react-app/node_modules/co/index.js:54:5 | |
| at Object.co (/Users/dm/cc/react-app/node_modules/co/index.js:50:10) | |
| at Object.toPromise (/Users/dm/cc/react-app/node_modules/co/index.js:118:63) | |
| at next (/Users/dm/cc/react-app/node_modules/co/index.js:99:29) | |
| at onFulfilled (/Users/dm/cc/react-app/node_modules/co/index.js:69:7) |
This file contains hidden or 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 'isomorphic-fetch' | |
| import { test } from 'tap' | |
| import nock from 'nock' | |
| nock('http://localhost') | |
| .get(/item\/(.*)/) | |
| .times(2) | |
| .reply(200, function(url, requestBody) { | |
| const user = url.substr(url.lastIndexOf('/') + 1) | |
| return `You found user ${user}` |
This file contains hidden or 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
| <Route path="/" component={App} onEnter={authenticate}> | |
| <IndexRoute component={HomePage} /> | |
| <Route path="feedback" component={Feedback} /> | |
| <Route path="search(/:query)" component={HomePage} /> | |
| </Route> |
This file contains hidden or 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 PIBY2 = Math.PI / 2; | |
| var ToDegrees = 180 / Math.PI; | |
| var x = 50; | |
| var y = 50; | |
| var vx = Math.random() - 0.5; | |
| var vy = Math.random() - 0.5; | |
| function update() { |