Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Martí mvdan

View GitHub Profile
View li-results.sh
#!/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
View keybase.md

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:

View sh-interp-extract.go
package main
import (
"fmt"
"io"
"log"
"os"
"strings"
"mvdan.cc/sh/interp"
View proposal_io_buffered_pipe.md

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

@mvdan
mvdan / Dockerfile-drone-nolimit
Last active Dec 1, 2020
Dockerfile to build Drone CI as a standalone server with its nolimit flag - https://hub.docker.com/r/mvdan/drone-nolimit
View Dockerfile-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/