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
default: | |
auth: | |
community: thisisasecret | |
walk: | |
- 1.3.6.1.2.1.1.3 | |
- 1.3.6.1.2.1.2 | |
- 1.3.6.1.2.1.31.1.1 | |
metrics: | |
- name: sysUpTime | |
oid: 1.3.6.1.2.1.1.3 |
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 ( | |
"encoding/json" | |
"fmt" | |
"net" | |
"net/http" | |
) | |
type IPResponse struct { |
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 ( | |
"encoding/json" | |
"fmt" | |
"net" | |
"net/http" | |
"sync" | |
) |
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
# rados lspools | |
rbd | |
test-pool-1446740062-eeddb785027bf960 | |
test-pool-1446740062-d0a10528b0307445 | |
blah | |
# rados mkpool lol | |
successfully created pool lol | |
# rados --pool rbd create blah | |
2015-11-05 16:16:33.254545 7f9ef15da700 0 -- 127.0.0.1:0/1001947 >> 127.0.0.1:6800/197 pipe(0x34dc2b0 sd=4 :0 s=1 pgs=0 cs=0 l=1 c=0x34d1cd0).fault |
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 whatever | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" | |
"encoding/base64" | |
"encoding/pem" | |
"fmt" |
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 ( | |
"database/sql" | |
"net/http" | |
"github.com/gorilla/mux" | |
) | |
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
// WithUUID returns a new Context that carries a uuid. If the UUID | |
// already exists, nothing is done. Otherwise a new one is created. | |
func WithUUID(c context.Context) (context.Context, string) { | |
if u, ok := c.Value("request.id").(string); ok { | |
return c, u | |
} | |
uuid := uuid.New() | |
return context.WithValue(c, "request.id", uuid), uuid | |
} |
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 cbzip2 | |
/* | |
#cgo CFLAGS: -Werror=implicit | |
#include "bzip2/bzlib.h" | |
*/ | |
import "C" |
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
nick@nick-mbp ~/.g/s/g/n/cbzip2 (master) [2]> go build -work -x | |
WORK=/var/folders/fz/80y95njs0wb4hyd9b3j84zd40000gn/T/go-build955903386 | |
mkdir -p $WORK/github.com/nickvanw/cbzip2/_obj/ | |
mkdir -p $WORK/github.com/nickvanw/ | |
cd /Users/nick/.gopath/src/github.com/nickvanw/cbzip2 | |
CGO_LDFLAGS="-g" "-O2" /usr/local/Cellar/go/1.4.2/libexec/pkg/tool/darwin_amd64/cgo -objdir $WORK/github.com/nickvanw/cbzip2/_obj/ -- -I $WORK/github.com/nickvanw/cbzip2/_obj/ -Werror=implicit -Werror=implicit reader.go writer.go | |
/usr/local/Cellar/go/1.4.2/libexec/pkg/tool/darwin_amd64/6c -F -V -w -trimpath $WORK -I $WORK/github.com/nickvanw/cbzip2/_obj/ -I /usr/local/Cellar/go/1.4.2/libexec/pkg/darwin_amd64 -o $WORK/github.com/nickvanw/cbzip2/_obj/_cgo_defun.6 -D GOOS_darwin -D GOARCH_amd64 $WORK/github.com/nickvanw/cbzip2/_obj/_cgo_defun.c | |
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -print-libgcc-file-name | |
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments - |
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 datastore | |
import ( | |
"database/sql" | |
) | |
const ( | |
createUser = ` | |
INSERT INTO users (name, email) | |
VALUES(?, |
NewerOlder