Skip to content

Instantly share code, notes, and snippets.


Joseph Fraley joefraley

View GitHub Profile
joefraley / Contract Killer
Created Dec 11, 2017 — forked from malarkey/Contract Killer
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

joefraley / symbols-as-props.js
Last active Jul 25, 2017
Use static symbols to gate arbitrary React props (as opposed to magic strings)
View symbols-as-props.js
// to see it in action live, see
import {converge, objOf, toUpper, map, compose, reduce, merge, replace, toString, values} from 'ramda'
* upperKey :: [string] -> [{STRING: string}]
* @example upperKey(arr) === [{A: 'a'}, {B: 'b'}, ...]
const upperKey = converge(objOf, [toUpper, Symbol])
joefraley /
Last active Jul 24, 2017
Squash several Git commits into a single commit
# Switch to the master branch and make sure you are up to date.
git checkout master
git fetch # this may be necessary (depending on your git config) to receive updates on origin/master
git pull
# Merge the feature branch into the master branch.
git merge feature_branch
# Reset the master branch to origin's state.
joefraley / animated-switch-example.js
Last active May 7, 2017
A working example of React Router 4's <Switch /> API using CSS Transition Group to animate content between routes.
View animated-switch-example.js
import React from 'react'
import ReactCSSTransitionGroup from 'react-addons-css-transition-group'
import {
BrowserRouter as Router,
} from 'react-router-dom'
const BasicExample = () => (
joefraley / real-world-ocaml-Dockerfile
Last active May 7, 2017
A Dockerfile for working through Real World Ocaml
View real-world-ocaml-Dockerfile
# See
FROM ocaml/opam
# Get core set up
RUN opam depext -i core
# Do some extra stuff to make cryptokit happy
RUN opam depext conf-zlib.1 && opam depext conf-gmp.1 && opam install cryptokit
# Install all the packages the book uses, including the utop REPL