This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "reflect" | |
func main() {} | |
var types = map[reflect.Kind]reflect.Type{ | |
reflect.Bool: reflect.ValueOf(bool(false)).Type(), | |
reflect.Int: reflect.ValueOf(int(0)).Type(), | |
reflect.Int8: reflect.ValueOf(int8(0)).Type(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syntax = docker/dockerfile:experimental | |
# Build with DOCKER_BUILDKIT=1 while support for caching features is not 'on by default' in Docker. | |
FROM ubuntu:18.04 | |
ENV STACK_VERSION=1.9.3 STACK_SHA256SUM=c9bf6d371b51de74f4bfd5b50965966ac57f75b0544aebb59ade22195d0b7543 | |
RUN wget --no-verbose https://github.com/commercialhaskell/stack/releases/download/v${STACK_VERSION}/stack-${STACK_VERSION}-linux-x86_64-static.tar.gz \ | |
&& echo ${STACK_SHA256SUM} stack-${STACK_VERSION}-linux-x86_64-static.tar.gz | sha256sum --check --strict \ | |
&& tar \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
token := make(chan struct{}, 1) | |
token <- struct{}{} // A goroutine must have the token to print | |
for test := range readTests(os.Stdin) { | |
gate <- struct{}{} | |
next := make(chan struct{}, 1) // where to send the token to. | |
go func(test Test, in, out chan struct{}) { | |
defer func() { <-gate }() | |
// Asynchronous work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build with: | |
# docker build -t race-build-failure https://gist.github.com/7b8c73a84b4c5bef5ce107fe009eb8d8.git | |
FROM golang:1.7rc1-alpine | |
RUN apk add --no-cache musl-dev gcc | |
WORKDIR /go/src/testrace | |
RUN echo $'package main\nfunc main() {}' > main.go |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc | |
index e26b400..9618933 100644 | |
--- a/lib/asan/asan_linux.cc | |
+++ b/lib/asan/asan_linux.cc | |
@@ -39,7 +39,7 @@ | |
#include <sys/link_elf.h> | |
#endif | |
-#if SANITIZER_ANDROID || SANITIZER_FREEBSD | |
+#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_NONGNU |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Useful series of blog posts for understanding how nix works: | |
* http://lethalman.blogspot.co.uk/search/label/nixpills |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hub: | |
image: selenium/hub | |
ports: | |
- "127.0.0.1:4444:4444" | |
chrome: | |
image: selenium/node-chrome-debug | |
links: [hub] | |
external_links: | |
- myapplication_frontend_1:pdftables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/binary" | |
"fmt" | |
"io" | |
"log" | |
"os" | |
"reflect" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io" | |
"log" | |
"os" | |
docker "github.com/fsouza/go-dockerclient" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func DockerRun(c *docker.Client, imageName string) (io.ReadCloser, error) { | |
log.Printf("Create container...") | |
cont, err := c.CreateContainer(docker.CreateContainerOptions{ | |
Config: &docker.Config{ | |
Hostname: "generateruntimecontext", | |
AttachStdout: true, | |
AttachStderr: true, | |
Image: imageName, | |
Labels: map[string]string{ | |
"orchestrator": "hanoverd", |
NewerOlder