This file contains 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
// This is a quick and dirty conversion of https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/binarytrees-go-2.html | |
// to use slice as a container of tree. | |
// This version time: | |
// real 0m3.946s | |
// user 0m24.126s | |
// sys 0m1.671s | |
// Original: | |
// real 0m6.719s | |
// user 1m8.281s | |
// sys 0m0.862s |
This file contains 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
module zpages-demo | |
go 1.17 | |
require ( | |
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.34.0 | |
go.opentelemetry.io/contrib/zpages v0.34.0 | |
go.opentelemetry.io/otel v1.9.0 | |
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.9.0 | |
go.opentelemetry.io/otel/sdk v1.9.0 |
This file contains 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 oauth2 implements password-based authentication middleware. | |
package oauth2 | |
import ( | |
"context" | |
"fmt" | |
"net/http" | |
"time" | |
"golang.org/x/oauth2" |
This file contains 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
Go 9 hrs 51 mins ███████████████▋░░░░░ 74.9% | |
JSON 1 hr 4 mins █▋░░░░░░░░░░░░░░░░░░░ 8.2% | |
PHP 47 mins █▎░░░░░░░░░░░░░░░░░░░ 6.0% | |
YAML 23 mins ▋░░░░░░░░░░░░░░░░░░░░ 3.0% | |
Markdown 21 mins ▌░░░░░░░░░░░░░░░░░░░░ 2.8% |
This file contains 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 ( | |
"github.com/VividCortex/gohistogram" | |
"net/http" | |
"os" | |
"time" | |
) | |
func main() { |
This file contains 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 ref_test | |
import ( | |
"testing" | |
) | |
type s struct { | |
ss string | |
} |
This file has been truncated, but you can view the full file.
This file contains 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
17:38:41 /usr/local/Cellar/go/1.11/libexec/src golint ./... | |
archive/tar/common.go:30:2: exported var ErrHeader should have comment or be unexported | |
archive/tar/common.go:99:2: const paxUid should be paxUID | |
archive/tar/common.go:151:2: struct field Uid should be UID | |
archive/tar/common.go:607:2: don't use underscores in Go names; const c_ISUID should be cISUID | |
archive/tar/common.go:608:2: don't use underscores in Go names; const c_ISGID should be cISGID | |
archive/tar/common.go:609:2: don't use underscores in Go names; const c_ISVTX should be cISVTX | |
archive/tar/common.go:613:2: don't use underscores in Go names; const c_ISDIR should be cISDIR | |
archive/tar/common.go:614:2: don't use underscores in Go names; const c_ISFIFO should be cISFIFO | |
archive/tar/common.go:615:2: don't use underscores in Go names; const c_ISREG should be cISREG |
This file contains 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
#!/usr/bin/env bash | |
default_description="something special" | |
while [ 1 ] | |
do | |
missing_comments=$(golint `go list ./... | grep -v /vendor/` | grep 'comment' | grep 'exported') | |
echo "$missing_comments" | |
test -z "${missing_comments// }" && exit |
This file contains 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
{ | |
"type": ["object", "integer"], | |
"properties": { | |
"abcde": { | |
"type": "object", | |
"patternProperties": { | |
"^[a-zA-Z0-9_]+$": { | |
"oneOf": [ |
This file contains 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
#!/bin/bash | |
exiv2 ex *.CR2 | |
exiv2 -ep3 -l ./ *.CR2 | |
for f in *.exv; do echo $f; mv "${f%.exv}.exv" "${f%.exv}-preview3.exv"; done | |
exiv2 in *.jpg |
NewerOlder