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
// this file should actually be in reducers/index.js | |
import {combineReducers} from 'redux'; | |
const rootReducer = combineReducers( | |
allReducers(require.context('.', false, /^\.\/(?!index)\w+$/)) | |
); | |
export default rootReducer; |
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
/** | |
* Double Linked list | |
*/ | |
export default class LinkedList { | |
constructor() { | |
this.head = null; | |
this.tail = null; | |
this.size = 0; | |
} |
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
circle { | |
.nthloop(8); | |
} | |
.nthloop(@counter) when (@counter > 0) { | |
.nthloop((@counter - 1)); | |
&:nth-of-type(@{counter}) { | |
animation-delay: (@counter * .1s); | |
} | |
} |
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 React, {Component, PropTypes} from 'react'; | |
const DEFAULT_STROKE_WIDTH = 0.15; | |
const DEFAULT_STROKE_COLOR = '#e1e1e1'; | |
/** | |
* SVGPath is an svg <path> element with utitlities | |
* | |
* @param {object[]} points - Array of Point objects - {x, y} - to plot this path | |
* @param {string} color - stroke color of path |
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
/** | |
* Get the offset of an element relative to another element (body by default) | |
* @param {element} elem - DOM element to use | |
* @param {element} relativeElem - DOM element to compare against | |
* @returns {object} - {top, left} | |
*/ | |
export default function offset(elem, relativeElem = document.body) { | |
const | |
elemRect = elem.getBoundingClientRect(), |
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 {Map} from 'immutable'; | |
/** | |
* Accrue redux middleware will only return actions that have accured enough interest | |
* | |
* change in accrued interest is calculated by interest += (next - prev) | |
* Math.abs(interest) >= resistance for action to recieve accrued flag | |
* | |
* To opt into this functionality add {meta: {resistance: <value>, accrue: <field>}} to the dispatched action. |
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 React, {Component, PropTypes} from 'react'; | |
import connectContent from 'components/ConnectContent'; | |
// import container components | |
// import ExampleApp from 'components/ExampleApp'; | |
// map imports to strings so they can be selected with data | |
const sectionTypes = { | |
// example: ExampleApp, |
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
// Vendor | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import {Router, browserHistory} from 'react-router'; | |
import {Provider} from 'react-redux'; | |
import routes from './routes'; | |
import configureStore from './store/configureStore'; | |
import {loadState, saveReduxStore} from './store/localStorage'; |
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 localforage from 'localforage'; | |
import throttle from 'lodash/throttle'; | |
const forageConfig = { | |
name: 'myproject', | |
storeName: 'myproject-data', | |
}; | |
const appStore = localforage.createInstance(forageConfig); |
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
<p class="pseudo-content" before="“" after="”">You can quote me on this</p> | |
<!-- will render as: | |
"You can quote me on this" | |
--> |