Skip to content

Instantly share code, notes, and snippets.

export default React.createClass({
displayName: 'Oceans Navigation Category',
propTypes: {
list: React.PropTypes.arrayOf(
React.PropTypes.shape({
humanReadableName: React.PropTypes.string,
url: React.PropTypes.string
})
// bootstrap React Router
import React from 'react';
import { default as Router, Route, DefaultRoute, HistoryLocation, RouteHandler } from 'react-router';
import { Splash } from '../components_angular/splash';
import index from './index';
let oceans;
if (!PRODUCTION) {
oceans = (
<Route handler={require('./oceans/navigation')} path='oceans'>
import React from 'react';
const Component = React.Component;
import angular from 'angular';
const jqLite = angular.element;
export default function(outerHTML) {
class Wrapper extends Component {
static displayName = `React wrapper around Angular fragment ${outerHTML}`;
@AprilArcus
AprilArcus / Aphorisms & Principles
Last active August 29, 2015 14:20
aphorisms_and_principles.md
April's Aphorisms & Principles:
* [Rethink best practices](https://www.youtube.com/watch?v=x7cQ3mrcKaY).
* [A dogma is born when the solutions are presented without enough original context,
and newcomers feel pressured to delegate crucial decisions to an authority](https://medium.com/@dan_abramov/the-case-for-flux-379b7d1982c6)
* We like nice things:
* Pure functions when practical, side effects when necessary.
* Self contained, testable modules that do not leak implementation
// April Arcus 2015 Public Domain
// A higher order React component that will emulate CSS :hover, :active,
// and :focus pseudo selectors by decorating a component with appropriate
// listeners, tracking internal state, and passing it to the component
// argument as additional props.
// Somewhat like Radium, but will not interfere with the use of these
// same event listeners inside the decorated component.
/* eslint-env es6 */
import React from 'react';
import { addons } from 'react/addons';
const PureRenderMixin = addons.PureRenderMixin;
import { lighten, darken } from './colorHelpers'
import variables from './bootstrapVariables'
export default React.createClass({
mixins: [PureRenderMixin],
var webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
'./scripts/index'
],
output: {
path: __dirname + '/scripts/',
filename: 'bundle.js',
# While GNU coreutil's ls is generally more featureful (including colorization
# based on file extensions, SI size formats, ISO date and time formats,
# semantic version sort, etc.), OS X's fork of FreeBSD ls allows viewing HFS+
# extended attributes and access control lists through the -@ and -e flags,
# respectively.
#
# This script provides a shim to allow BSD ls to be invoked with GNU-style
# flags and .dircolor files, and a function that shadows ls, invoking coreutils
# ls by default but automatically switching to the shim when the -@ and/or -e
# flags are detected.