Skip to content

Instantly share code, notes, and snippets.


Volkan Unsal volkanunsal

View GitHub Profile
View samizdat-shell-help.bash
### my-script — does one thing well
### Usage:
### my-script <input> <output>
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
gcanti /
Last active Apr 6, 2018
Type level programming with Flow, encoding a finite state machine
// @flow

// based on State Machines All The Way Down
// An Architecture for Dependently Typed Applications
// by Edwin Brady

// finite state machine
vasanthk / System
Last active Aug 12, 2020
System Design Cheatsheet
View System

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
gaearon / reducers.js
Last active Aug 20, 2019
How I'd do code splitting in Redux (pseudo code, not tested!)
View reducers.js
import { combineReducers } from 'redux';
import users from './reducers/users';
import posts from './reducers/posts';
export default function createReducer(asyncReducers) {
return combineReducers({
paragonie-scott /
Last active Aug 1, 2020
An Open Letter to Developers Everywhere (About Cryptography)
View Container.js
import React from 'react';
import { container } from 'redux-relay';
variablesFromState: (state) => ({myVariable: state.myState})
fragments: {
viewer {
gaearon / slim-redux.js
Last active Aug 12, 2020
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
View slim-redux.js
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])) {
ohanhi /
Last active Jul 19, 2020
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

PixelsCommander /
Last active Apr 27, 2020
Rasterization API proposal

Rasterization API


Rasterization API defines interface for making snapshots from HTML elements.


View gist:598fa75e22bdfa44cf47

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

You can’t perform that action at this time.