Skip to content

Instantly share code, notes, and snippets.

View handeyeco's full-sized avatar
🦄
🌈🍹🐠🏝

Matthew handeyeco

🦄
🌈🍹🐠🏝
View GitHub Profile
@handeyeco
handeyeco / slim-redux.js
Created December 7, 2016 16:53 — 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])) {
@handeyeco
handeyeco / hexagons.js
Created July 18, 2017 16:25 — forked from zackthehuman/hexagons.js
Drawing a hexagonal grid with HTML canvas
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Canvas Hexagonal Map</title>
<style type="text/css">
canvas {
border:0;
display:block;
margin:0 auto;