Skip to content

Instantly share code, notes, and snippets.

View mvdan's full-sized avatar

Daniel Martí mvdan

View GitHub Profile
#!/bin/sh
# Small script to gather data from picosat and your own SAT solver
# Useful for LI prac 01
#
# Example usage:
# ./li-results.sh > out.txt
# Your solver
BIN=./solver
package main
import (
"fmt"
"io"
"log"
"os"
"strings"
"mvdan.cc/sh/interp"

Proposal: io: add a buffered pipe

Summary

Add a way to easily create a buffered io.Pipe. Currently, one has to write their own from scratch. This leads to dozens of separate implementations in the wild, and likely many correctness issues and hidden bugs.

Description

Keybase proof

I hereby claim:

  • I am mvdan on github.
  • I am mvdan (https://keybase.io/mvdan) on keybase.
  • I have a public key ASA4MmcWdoA_zSWkg14S2avWaLwGoShwnpkg67zk6-n-two

To claim this, I am signing this object:

@mvdan
mvdan / Dockerfile-drone-nolimit
Last active October 25, 2022 05:58
Dockerfile to build Drone CI as a standalone server with its nolimit flag - https://hub.docker.com/r/mvdan/drone-nolimit
FROM golang:1.14.4 AS builder
RUN apt-get update && apt-get install -y ca-certificates
RUN git clone -b v1.8.1 --depth=1 https://github.com/drone/drone
RUN cd drone && go install -trimpath -ldflags='-w -s' -tags nolimit ./cmd/drone-server
FROM debian:buster-slim
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/