Skip to content

Instantly share code, notes, and snippets.

Arnaud Porterie icecrime

Block or report user

Report or block icecrime

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
@icecrime
icecrime / gist:67399480c9a10b48fadc
Last active Jan 14, 2019
An experiment with Golang reflection and channels
View gist:67399480c9a10b48fadc
package main
import (
"reflect"
"strings"
)
func makeChannel(t reflect.Type, chanDir reflect.ChanDir, buffer int) reflect.Value {
ctype := reflect.ChanOf(chanDir, t)
return reflect.MakeChan(ctype, buffer)
@icecrime
icecrime / xkcd.py
Last active Jul 29, 2018
XKCD style graph
View xkcd.py
## Credits: https://jakevdp.github.io/blog/2012/10/07/xkcd-style-plots-in-matplotlib/
import numpy as np
import pylab as pl
from scipy import interpolate, signal
import matplotlib.font_manager as fm
import matplotlib.pyplot as plt
# We need a special font for the code below. It can be downloaded this way:
@icecrime
icecrime / All time
Last active Aug 22, 2016
Docker - Updated project statistics
View All time
Top changeset contributors by employer
Docker 7107 (49.2%)
(Unknown) 4670 (32.3%)
Red Hat 855 (5.9%)
IBM 607 (4.2%)
Microsoft 525 (3.6%)
Huawei 511 (3.5%)
Google 127 (0.9%)
Cisco 39 (0.3%)
@icecrime
icecrime / guide.md
Created Jan 12, 2016
1.10 migration guide
View guide.md

TL;DR;

  • More secure foundation for referencing images and layers
  • New distribution manifest and pull features
  • Upgrading old images will include a migration step
  • A migration tool exists in order to minimize migration time

This post describes the upcoming changes to the way Docker Engine stores images and filesystem data in containers. These changes are coming to users starting from version v1.10. (FIXME: link to download rc1)

Starting from v1.10 we completely change the way we address the image data on disk. Previously, every image and layer used a randomly assigned UUID, now we have opted for a content addressable method and use an ID that is based on as secure hash of the image and layer data.

View stdin
# Kibana is served by a back end server. This controls which port to use.
port: 5602
# The host to bind the server to.
host: "0.0.0.0"
# The Elasticsearch instance to use for all your queries.
elasticsearch_url: 'http://search-vossibility-bj3pv4srs5asa37tpcp3tbfbe4.us-west-2.es.amazonaws.com'
# preserve_elasticsearch_host true will send the hostname specified in `elasticsearch`. If you set it to false,
@icecrime
icecrime / cant_even.md
Last active Aug 29, 2015
Kibana / ES timezone issue
View cant_even.md

Kibana Data Table does the following request without any result:

{
  "size": 0,
  "query": {
    "filtered": {
      "query": {
        "query_string": {
          "query": "*",
@icecrime
icecrime / cant_even.md
Last active Aug 29, 2015
Elastic Search bug?
View cant_even.md

A document is indexed with what seems to be a proper timestamp:

# curl elasticsearch:9200/[redacted]/[redacted]/[redacted]?fields=_timestamp | jq .
{
  "_index": "[redacted]",
  "_type": "[redacted]",
  "_id": "[redacted]",
  "_version": 1,
  "found": true,
View gist:1a544c1c0f31368ee6c2
GlusterFS https://www.youtube.com/watch?v=SVtsT9WVujs&feature=youtu.be
ZFS https://asciinema.org/a/21572
Monitoring https://asciinema.org/a/dain4yy6tfiaarvdjy5u2ojzs
View gist:108d29047c1883acad73
### Keybase proof
I hereby claim:
* I am icecrime on github.
* I am icecrime (https://keybase.io/icecrime) on keybase.
* I have a public key whose fingerprint is DC69 69A2 027C 219B 9096 F2A9 DB79 080A E913 133C
To claim this, I am signing this object:
@icecrime
icecrime / script
Last active Aug 29, 2015
Docker inflation
View script
$ git diff v1.3.0..v1.4.0 --shortstat
628 files changed, 26969 insertions(+), 9402 deletions(-)
$ git diff v1.4.0..v1.5.0 --shortstat
467 files changed, 24071 insertions(+), 6283 deletions(-)
$ git diff v1.5.0..v1.6.0 --shortstat
972 files changed, 37720 insertions(+), 46481 deletions(-)
$ git diff v1.6.0..origin/master --shortstat
1162 files changed, 81395 insertions(+), 40573 deletions(-)
You can’t perform that action at this time.