Skip to content

Instantly share code, notes, and snippets.

View nodirt's full-sized avatar

Nodir Turakulov nodirt

View GitHub Profile

Does GitHub Markdown support trailing slash?

It does
not

@nodirt
nodirt / a.md
Last active August 31, 2015 18:30

Markdown style guide

Much of what makes Markdown great is the ability to write plain text, and get great formatted output as a result. To keep the slate clean for the next author, your Markdown should be simple and consistent with the whole corpus wherever possible.

We seek to balance three goals:

  1. Source text is readable and portable.
@nodirt
nodirt / main.go
Last active January 25, 2018 02:48
Reading from both stdout and stderr in one func
package main
import (
"bytes"
"fmt"
"io"
"os/exec"
)
// RunAndListen intercepts cmd.Stdout and cmd.Stderr and runs cmd.
@nodirt
nodirt / output
Created October 6, 2015 20:22
go test -n compress/zlib
mkdir -p $WORK/compress/zlib/_test/compress/
#
# compress/zlib
#
mkdir -p $WORK/compress/zlib/_test/_obj_test/
cd /Users/nodir/go/src/github.com/golang/go/src/compress/zlib
/Users/nodir/go/src/github.com/golang/go/pkg/tool/darwin_amd64/compile -o $WORK/compress/zlib/_test/compress/zlib.a -trimpath $WORK -p compress/zlib -complete -buildid d766f85b5551c2e988b19e7a04fd06d10cb0b7b3 -D _/Users/nodir/go/src/github.com/golang/go/src/compress/zlib -I $WORK -pack ./reader.go ./writer.go ./reader_test.go ./writer_test.go
@nodirt
nodirt / proposal.md
Last active October 8, 2015 05:33
Proposal: `-json` flag in `go test`
@nodirt
nodirt / logger.go
Last active November 1, 2015 04:23
type MyLogger interface {
Print(v ...interface{})
}
var l MyLogger = log.New(os.Stderr, "", 0)
// Package better is a better implementation of log.Logger
package better
type Logger struct {
}
func (l *Logger) Print(v ...interface{}) {
//....
}
package main
import (
"better"
"log"
)
// Logger is a subset of log.Logger methods that we need.
type MyLogger interface {
Print(v ...interface{})
// Package better is a better implementation of log.Logger
package better
type Logger struct {
}
func (l *Logger) Print(v ...interface{}) {
//....
}
@nodirt
nodirt / prpc.md
Last active September 9, 2020 14:00

pRPC: gRPC on Classic AppEngine today

gRPC is great, but is not available on Classic AppEngine at this time, so while working on the [nextgen CI for Chromium][luci] we wrote pRPC (provisional RPC) for Go that is compatible with gRPC server/client code, but works on HTTP 1.x and Classic AppEngine. In addition it has gRPC-compatible discovery and a CLI tool.

IDL