Skip to content

Instantly share code, notes, and snippets.

Josh Hawn jlhawn

Block or report user

Report or block jlhawn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View cron_convert.js
* It's generally impossible to convert directly between a cron spec and time
* interval. There exist time intervals which cannot be represented as crons
* (such as every 90 minutes), and there are crons which cannot be converted to
* time intervals (like every Monday and Friday morning at 8:00). So instead,
* we convert between steps of largest granularity possible. You can specify a
* time interval in minutes but if it is greater than an hour then it will be
* truncated to the largest multiple of an hour. If it is greater than a day
* then it will be truncated to the largest multiple of a day. The minimum
* input is 1 minute. The maximum input is 28 days, after which a "@monthly"
jlhawn /
Last active Dec 11, 2018
RethinkDB TLS Guide

RethinkDB with TLS

Thinker Lock

What You'll Need

To follow this guide, you will need Docker v1.10 or higher. Docker v1.10 has some volume and networking features that will come in handy for setting up a cluster. While this guide uses a single host with a cluster composed of several RethinkDB containers, the multi-host networking features of Docker can be used


Design Doc Title


List stakeholders for project/feature.

Role Person
Dev Owner
Other Dev 1 (Engine)
jlhawn / Dockerfile
Last active Oct 27, 2015
dockramp Dockerfile for docker/docker
View Dockerfile
# This file describes the standard way to build Docker, using docker
# Usage:
# # Assemble the full dev environment. This is slow the first time.
# docker build -t docker .
# # Mount your source in an interactive container for quick testing:
# docker run -v `pwd`:/go/src/ --privileged -i -t docker bash
jlhawn /
Created May 19, 2015
Registry v2 Push and Pull Script
# Shell scripts for push/pull to v2 registry
# - Get a token.
# - Push a blob.
# - Pull that blob repeatedly.
# Tested on OS X 10.10.3, curl 7.38.0, jq-1.4
jlhawn / example_defer_bug.go
Last active Aug 29, 2015
example defer bug
View example_defer_bug.go
package main
import "fmt"
func main() {
values := []int{}
defer fmt.Printf("first defered values: %v\n", values)
defer func() {

Manifest Notes

  • Keep "repository" or "name" field in the manifest?

  • Should dependencies have a list of digests rather than a canonical digest?

  • How should be support encrypted content?


Distribution Notes

  • Layer Federation

    Should be possible using the proposed manifest format (work in progress)

  • Fetch by ID/Digest

    This is very important and should be possible as content-addresablitity is one of the core features of the new registry.

jlhawn / example_manifest.json
Last active Aug 29, 2015
Example Distribution Content Manifest - Manifest Digest: sha256:7e37485d70696864f7207a4d4a1c8461db2905113a1ff3ce8860efb09df79cee
View example_manifest.json
"schemaVersion": 2,
"createdAt": "2015-03-04T17:52:02.841028307-08:00",
"maintainers": [
"name": "Phillip Edward Nuñez",
"email": "",
"url": ""
jlhawn /
Last active Aug 29, 2015
Secure Docker v1 Images
  1. Build your image

    docker build -t my-image .
  2. export it to a tarball

    docker save my-image > my-image.dckr
You can’t perform that action at this time.