Skip to content

Instantly share code, notes, and snippets.

View smeijer's full-sized avatar

Stephan Meijer smeijer

View GitHub Profile
@smeijer
smeijer / session.js
Created February 18, 2022 14:05 — forked from AndrewIngram/session.js
next-runtime session middleware
import { json } from "next-runtime";
import jwt from "jsonwebtoken";
const SESSION_KEY = "some-secret";
export function readSession(cookies) {
const sessionCookie = cookies.get("session");
let data = {};

Reach UI Philosophy

Reach UI is an accessible foundation for React applications and design systems.

The three equally important goals are to be:

  • Accessible
  • Composable
  • Stylable
@smeijer
smeijer / L.TopoJSON.js
Created November 17, 2017 22:42 — forked from brendanvinson/L.TopoJSON.js
TopoJSON Leaflet plugin
/*
First run npm install topojson --save and then link "node_modules/topojson/build/topojson.min.js"
above this snippet in your html.
Usage: http://leafletjs.com/reference.html#geojson
*/
L.TopoJSON = L.GeoJSON.extend({
addData: function (data) {
var geojson, key;
@smeijer
smeijer / actionTypeBuilder.js
Created April 11, 2016 10:37 — forked from dbismut/actionTypeBuilder.js
React Redux Meteor middlewares
export function actionTypeBuilder(prefix) {
return {
type: actionType => `${prefix}/${actionType}`,
loading: actionType => `${actionType}/loading`,
ready: actionType => `${actionType}/ready`,
stopped: actionType => `${actionType}/stopped`,
changed: actionType => `${actionType}/changed`,
error: actionType => `${actionType}/error`,
success: actionType => `${actionType}/success`
};