Skip to content

Instantly share code, notes, and snippets.

View chitacan's full-sized avatar

Kyungyeol Kim (Bret) chitacan

View GitHub Profile
defmodule Context do
@moduledoc false
defmacro __using__(opts) do
repo = Keyword.fetch!(opts, :repo)
quote do
import Context, only: [context: 1, context: 2]
Module.put_attribute(__MODULE__, :__repo__, unquote(repo))
@chitacan
chitacan / K8s-DigitalOcean-CoreOS.md
Created March 7, 2018 12:14 — forked from kevashcraft/K8s-DigitalOcean-CoreOS.md
How to Setup Kubernetes on DigitalOcean with CoreOS

Kubernetes on DigitalOcean with CoreOS

Let's look at an example of how to launch a Kubernetes cluster from scratch on DigitalOcean, including kubeadm, an Nginx Ingress controller, and Letsencrypt certificates.

Overview

Environment

We'll be creating a four-node cluster (k8s-master, k8s-000...k8s-002), load balancer, and ssl certificates.

Table of Contents

  1. Install Kubernetes
@chitacan
chitacan / README.md
Created August 25, 2017 05:41 — forked from dahtah/README.md
How to get a significant correlation value by moving just one point around.

Have you ever seen these scatterplots that report a significant correlation between X and Y, but it looks like it's just the one point to the upper-right driving the correlation? Thanks to this interactive tool, you too can do this at home. Click anywhere in the picture, and the red dot will move. The sliding bar displays the resulting correlation coefficient. The grey interval are non-significant values: place the red dot right to get a significant result.

Data are generated from two standard independent gaussian (N=15). Test values are from the asymptotic Fisher transformation test that's on Wikipedia (two-sided, alpha = 5%). Code: R and d3.js.

@chitacan
chitacan / README.md
Created July 29, 2017 07:25 — forked from 1wheel/README.md
heat-histogram
@chitacan
chitacan / .block
Created May 26, 2016 11:45 — forked from tonyhschu/.block
Small Scroll-linked Animation Demo
scrolling: yes
license: MIT
@chitacan
chitacan / .block
Created April 13, 2016 09:57 — forked from drzax/.block
Narrative Charts
license: mit
scrolling: true
height: 300
@chitacan
chitacan / README.md
Created November 18, 2015 08:13 — forked from mbostock/README.md
Catmull–Rom Curves

Cubic Catmull–Rom curves with (b) uniform, (c) chordal and (d) centripetal parameterization. From Yuksel et. al: “Uniform parameterization overshoots and often generates cusps and intersections within short curve segments, while chord-length parameterization exhibits similar behavior for longer curve segments. Centripetal parameterization is the only one that guarantees no intersections within curve segments.”

@chitacan
chitacan / README.md
Created November 7, 2015 06:15 — forked from mbostock/.block
Tree of Life

A re-implementation of Jason Davies’ Phylogenetic Tree of Life, with faded gray lines to connect the leaf nodes of the tree to their corresponding labels inspired by a figure from Nature.

This implementation modifies the depth of interior nodes in a cluster layout to show branch lengths. Toggle the checkbox in the top-left corner to show or hide branch lengths, and mouseover a label to highlight its path to the root.

@chitacan
chitacan / README.md
Created October 19, 2015 14:29 — forked from nbremer/.block
Radar Chart Redesign

Still a secret for now, but it's not hard to guess what it will be used for...

@chitacan
chitacan / README.md
Last active August 28, 2015 05:58 — forked from mbostock/.block
Smooth Scrolling

This example uses a custom tween that interpolates the window’s vertical scroll offset.