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:9705220
Last active Aug 29, 2015
Go interfaces and type assertions compared to Python's Abstract Base Classes
View gist:9705220
#!/usr/bin/env python
import abc
### Go equivalent
#
# type Lock interface {
# Lock()
# Unlock()
@icecrime
icecrime / Main.hs
Created Jul 10, 2014
Haskell Digits-Recognizer Dojo
View Main.hs
import Data.Char
import Data.List.Split
import qualified Data.Vector as V
import Data.Ord
import qualified Data.Text as T
import qualified Data.Text.IO as T.IO
import qualified Data.Text.Read as T.Read
type Pixels = V.Vector Int
@icecrime
icecrime / gist:c82ba2ffe7193275ff02
Last active Aug 29, 2015
Windows Docker integration-cli output
View gist:c82ba2ffe7193275ff02
# WARNING! I don't seem to be running in the Docker container.
# The result of this command might be an incorrect build, and will not be
# officially supported.
#
# Try this instead: make all
#
bundles/1.3.1-dev already exists. Removing.
---> Making bundle: binary (in bundles/1.3.1-dev/binary)
@icecrime
icecrime / Dockerfile
Created Dec 3, 2014
Directory special bit issue
View Dockerfile
FROM busybox
RUN mkdir test_dir
RUN chmod 4755 test_dir
RUN [ $(ls -ld /test_dir | awk '{print $1}') = 'drwsr-xr-x' ]
ADD ./data/ /
RUN [ $(ls -ld /test_dir | awk '{print $1}') = 'drwsr-xr-x' ]
@icecrime
icecrime / libpack.patch
Created Dec 6, 2014
libpack fix for networking extensions
View libpack.patch
diff --git a/vendor/src/github.com/docker/libpack/tree.go b/vendor/src/github.com/docker/libpack/tree.go
index 89d8a18..3b236c1 100644
--- a/vendor/src/github.com/docker/libpack/tree.go
+++ b/vendor/src/github.com/docker/libpack/tree.go
@@ -16,6 +16,7 @@ func treeDel(repo *git.Repository, tree *git.Tree, key string) (*git.Tree, error
key = TreePath(key)
base, leaf := path.Split(key)
+ root := tree
if tree != nil {
@icecrime
icecrime / generator.sh
Last active Aug 29, 2015
Friday pop quizz - December 11th
View generator.sh
#!/bin/sh
if [ $(go env GOARCH) == "amd64" ]; then
sed -i .bak "s/\(const n = \)4/\12/" $1
fi
View gist:29e3e3de2c770a6a2a70
$ project/make.sh binary
# WARNING! I don't seem to be running in the Docker container.
# The result of this command might be an incorrect build, and will not be
# officially supported.
#
# Try this instead: make all
#
bundles/1.4.1-dev already exists. Removing.
@icecrime
icecrime / script
Created Jan 29, 2015
Docker 1.5.0-rc2 changelog
View script
$ git log --no-merges --pretty="%cn|%s" v1.4.1..v1.5.0-rc2 | sort | awk -F '|' '$1==x{ printf "\n %s", $2; next }{ x=$1; printf "\n\n%s\n %s", $1, $2;} END { printf "\n"}' | tail -n +3
AJ Bowen
Add Cecilia Payne-Gaposchkin to the names generator.
Add Laura Poitras to the names generator.
Aaron Huslage
Remove -t="" and -m="". Make -t and -m options consistent with help text and other documentation.
Abin Shahab
LXC TEMPLATE ALLOWS IPV4 OVERRIDE
@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(-)
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:
You can’t perform that action at this time.