Skip to content

Instantly share code, notes, and snippets.

View derekr's full-sized avatar
💭
Chillin'

Derek Reynolds derekr

💭
Chillin'
View GitHub Profile

BarOurcq - https://foursquare.com/v/barourcq/4b7d76ecf964a5202cc02fe3
Rad little bar off of the canal. May fav spot probably.

Le Perchoir - https://foursquare.com/v/le-perchoir/5183f149498eff6233941d44
Hipster roof top scene w/ good cocktails and great views of the city

Balls - https://foursquare.com/v/balls/52c4387a498e83a98531634a
First restaurant I went to there, quaint and chill w/ sold food and staff (treated us well as tourists)

Pop In - https://foursquare.com/v/pop-in/4adcda05f964a520753221e3

Redux JSON-API Notes

  • Colocation of requests and where the properties at being used
  • Bubbling up/emrging duplicate requests (is this even really possible or good w/ json-api?)
  • Helpful warning messages for improving requests (eg "You're requesting all fields, but only selecting 3.")
  • Simplify selecting fields from the requested resource (eliminate caller needing to use safe-access)
  • Auto namespace requests
  • Select request state (use getLoadingFn internally)
  • Internalize all things like makeRefReducer… these are implementation details a caller shouldn't care about (maybe a separate module for all this tooling?)
  • Avoid abstracting away json-api details… it should be obvious that's the type of api we're working with?

/containers/App.jsx

import { Provider } from 'react-redux'

import Widget, { createStore as widgetStore } from 'components/Widget'
import Something, { createStore as somethingStore } from 'components/Something'

export default () => {
    onComponentDidMount() {
        this.setState({

Keybase proof

I hereby claim:

  • I am derekr on github.
  • I am drk (https://keybase.io/drk) on keybase.
  • I have a public key ASBbxQGbNRZ_cAH5ZqZbpckqhrjmkh1zNxmeAUS2jCTGsgo

To claim this, I am signing this object:

@derekr
derekr / data.json
Last active August 29, 2015 14:26
data! from editdata.org!
[{"key":1,"value":{"name":"Something","key":"Something"}}]
defaults write -app ‘sketch’ ApplePersistence -bool no
@derekr
derekr / personalfinance-twitter.txt
Created July 22, 2015 23:50
future sources for a finance twitter bot
https://twitter.com/mrmoneymustache
https://twitter.com/BudgetsAreSexy
https://twitter.com/ronlieber
https://twitter.com/lizweston
@financialsamura
@LenPenzo
@FrugalWoods
@thepointsguy
@derekr
derekr / index.js
Created July 15, 2015 01:44
unarchived instapaper videos
var fs = require('fs')
var csv = require('csv-parser')
var map = require('map-stream')
fs.createReadStream(__dirname + '/instapaper-export.csv')
.pipe(csv())
.pipe(map(function (data, cb) {
if (
data.Folder !== 'Archive' &&
data.URL.indexOf('youtube') === -1 &&
waitFor @ vendor.bundle.js:25910
module.exports.alt.createStore.onFilterPagedArticles @ paged-articles.js:22
(anonymous function) @ vendor.bundle.js:25748
Dispatcher.$Dispatcher_invokeCallback @ vendor.bundle.js:619
Dispatcher.dispatch @ vendor.bundle.js:594
dispatch @ vendor.bundle.js:26048
dispatch @ vendor.bundle.js:25812
PagedArticlesActions.filterPagedArticles @ paged-articles.js:10
React.createClass.componentDidMount @ post.jsx:23
assign.notifyAll @ vendor.bundle.js:4797