Skip to content

Instantly share code, notes, and snippets.

View tianon's full-sized avatar
♥️
TIANON

Tianon Gravi tianon

♥️
TIANON
  • @docker, but thoughts, comments, commits generally his own ("do not represent the views of Docker, Inc" etc etc)
  • Las Vegas, NV
  • 09:31 (UTC -07:00)
  • X @tianon
View GitHub Profile
@tianon
tianon / README.md
Last active December 11, 2015 14:19 — forked from mbostock/.block
@tianon
tianon / README.md
Last active December 18, 2015 12:49 — forked from mbostock/.block

This grouped bar chart is constructed from a CSV file storing the populations of different states by age group. The chart employs conventional margins and a number of D3 features:

package main
import (
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"strings"
#!/bin/bash
set -e
image='tianon/speedtest'
layer='b31651d7665036bcf58a0b6b0d7aca173daff87b003ec50621cb0fde8d68864f'
# docker inspect b31651d7665036bcf58a0b6b0d7aca173daff87b003ec50621cb0fde8d68864f | grep '"Size"'
# "Size": 580580561,
# ("Content-Length: 228991341" though...)
token="$(curl -sSL -o /dev/null -D- -H 'X-Docker-Token: true' "https://index.docker.io/v1/repositories/$image/images" | awk -F ':[[:space:]]*|\r' '$1 == "X-Docker-Token" { print $2 }')"