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
jlhawn / rethinkdb_tls_guide.md
Last active Dec 11, 2018
RethinkDB TLS Guide
View rethinkdb_tls_guide.md

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

View design_docke_template.md

Design Doc Title

Stakeholders

List stakeholders for project/feature.

Role Person
Dev Owner
Other Dev 1 (Engine)
@jlhawn
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/github.com/docker/docker --privileged -i -t docker bash
#
@jlhawn
jlhawn / regv2cdn.sh
Created May 19, 2015
Registry v2 Push and Pull Script
View regv2cdn.sh
#!/bin/bash
# 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
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() {
View manifest_notes.md

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?

View dist_notes.md

Distribution Notes

  • Layer Federation

    Should be possible using the proposed manifest format (work in progress) https://github.com/docker/distribution/pull/62

  • 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
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": "pnunez@example.com",
"url": "https://example.com/pnunez/"
}
],
@jlhawn
jlhawn / docker_image_security.md
Last active Aug 29, 2015
Secure Docker v1 Images
View docker_image_security.md
  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.