Skip to content

Instantly share code, notes, and snippets.

Avatar

Joseph Fraley joefraley

View GitHub Profile
@joefraley
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,
Route,
Link,
Switch
} from 'react-router-dom'
const BasicExample = () => (
@joefraley
joefraley / real-world-ocaml-Dockerfile
Last active May 7, 2017
A Dockerfile for working through Real World Ocaml https://github.com/realworldocaml/book
View real-world-ocaml-Dockerfile
# See https://hub.docker.com/r/ocaml/opam/
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
@joefraley
joefraley / squash.sh
Last active Jul 24, 2017
Squash several Git commits into a single commit
View squash.sh
# https://makandracards.com/makandra/527-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
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 https://goo.gl/EM9EPp
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
joefraley / Contract Killer 3.md
Created Dec 11, 2017 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

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

You can’t perform that action at this time.