Skip to content

Instantly share code, notes, and snippets.

View dantman's full-sized avatar

Daniel Friesen dantman

View GitHub Profile
@kocolosk
kocolosk / deployment-couchdb.yaml
Last active May 27, 2019 14:33
CouchDB 2.0 in Kubernetes
# Start a 3 node cluster and join it together automatically. Uses
# local ephemeral disk for database storage.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: couchdb
spec:
replicas: 3
template:
@chenglou
chenglou / gist:34b155691a6f58091953
Last active April 5, 2021 19:15
Better feature for React key

key is pretty much crucial for state perservation in React. As of React 0.13 it can't do the following things:

  • Clone state
<Comp key={1} /><Comp key={1} />
  • Preserve component state across different parents:

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);