Skip to content

Instantly share code, notes, and snippets.

Eric Hulburd erichulburd

  • UC Berkeley
  • Berkeley, CA
Block or report user

Report or block erichulburd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View epics5.js
const applyForce = (action$, store) =>
action$.ofType(actions.APPLY_FORCE_CLICK)
.throttleTime(100)
// Do not apply force unless game is ongoing.
.filter(_action => selectors.isGameOngoing(store.getState()))
.map(action => actions.applyForce(action.payload));
const game = (action$, store) =>
action$.ofType(actions.START_CLICK)
// Do not start game if it is already ongoing.
View epics4.js
const game = (action$, store) =>
action$.ofType(actions.START)
.mergeMap(() => {
const interval = Observable.interval(250)
.takeUntil(action$.ofType(
actions.PAUSE,
actions.RESET,
actions.END
));
const incrementTime = interval
View epics3.js
const game = (action$, store) =>
action$.ofType(actions.START)
.mergeMap(() => {
const interval = Observable.interval(250)
.takeUntil(action$.ofType(
actions.PAUSE,
actions.RESET,
actions.END
));
});
View epics2.js
const game = (action$, store) =>
action$.ofType(actions.START)
.mergeMap(() =>
Observable
.interval(250)
// ...
);
View epics1.js
const applyForce = (action$, _store) =>
action$.ofType(actions.APPLY_FORCE_CLICK)
.throttleTime(100)
// Where payload here would be the index of the ball that the user is applying force on.
.map(action => actions.applyForce(action.payload));
View keybase.md

Keybase proof

I hereby claim:

  • I am erichulburd on github.
  • I am erichulburd (https://keybase.io/erichulburd) on keybase.
  • I have a public key ASB59L_ZFIs_yV9MGQdr6oRlHCq7Lw5XalGdIclR4Xwpkgo

To claim this, I am signing this object:

View composable_button.js
import React from 'react';
import styles from './styles.scss';
import classnames from 'classnames';
/**
* Button params:
* size: {'xs', 'sm', 'md', 'lg'}
* rounded: {true, false}
* color = {'gray', 'red','blue','green'}
* weight = {'xtralight', 'light', 'normal', 'bold'}
View autofill.html
<!-- current component -->
<input type="email"
name="email"
class="form-control"
placeholder="Email Address"
value="{this.login.email}"
onChange="{this.loginFieldChanged.bind(this)}"
required/>
<!-- refactored component -->
View route_link.js
@erichulburd
erichulburd / route.js
Created Sep 29, 2016
Spike Route class
View route.js
import * as S from 'underscore.string';
import queryString from 'query-string';
export default class Route {
constructor(route_definition){
let route = this;
route.params = {};
route.data = route_definition;
}
You can’t perform that action at this time.