Skip to content

Instantly share code, notes, and snippets.

View tim-phillips's full-sized avatar

Tim Phillips tim-phillips

  • Los Angeles
View GitHub Profile
@tim-phillips
tim-phillips / airtable-proxy.js
Created April 1, 2018 23:05 — forked from benoror/airtable-proxy.js
Node.js Airtable API Proxy
var express = require('express');
var proxy = require('http-proxy-middleware');
var options = {
logLevel: 'debug',
target: 'https://api.airtable.com/v0/' + process.env.APP_ID,
changeOrigin: true,
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer ' + process.env.API_KEY
},
@tim-phillips
tim-phillips / slim-redux.js
Created September 15, 2017 00:39 — forked from gaearon/slim-redux.js
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {