Skip to content

Instantly share code, notes, and snippets.

View tychoish's full-sized avatar

Sam Kleinman tychoish

View GitHub Profile
diff --git a/command/registry.go b/command/registry.go
index f3e0011b7..db81cc626 100644
--- a/command/registry.go
+++ b/command/registry.go
@@ -178,7 +178,12 @@ func (r *commandRegistry) renderCommands(commandInfo model.PluginCommandConf,
}
cmd := factory()
- if err = cmd.ParseParams(c.Params); err != nil {
+ params, err := c.Params.Resolve()
// all values optional,
// counters and timers are cumulative,
// gauges are discrete,
{
"ts": <bson timesampt>,
"id": <long, thread id, optional>,
"counters": {
"n": <inc long>,
"ops": <operations long>,
"size": <bytes>,
func NewClientTLSFromFile(certFile, serverNameOverride string) (TransportCredentials, error) {
b, err := ioutil.ReadFile(certFile)
if err != nil {
return nil, err
}
cp := x509.NewCertPool()
if !cp.AppendCertsFromPEM(b) {
return nil, fmt.Errorf("credentials: failed to append certificates")
}
return NewTLS(&tls.Config{ServerName: serverNameOverride, RootCAs: cp}), nil
type nopCloser struct {
io.Reader
}
func (nopCloser) Close() error { return nil }
// NopCloser returns a ReadCloser with a no-op Close method wrapping
// the provided Reader r.
func NopCloser(r io.Reader) io.ReadCloser {
return nopCloser{r}
<tychoish> I'm wearing the shirt today, and it's terrible.
<Carol> it is
<Carol> my roommate actually did a double take
<tychoish> nice
<tychoish> tor just poked me in the manatee mostrils repeatedly
<Carol> better thanthe eyeballs
Host *
ServerAliveInterval 600
ControlMaster auto
ControlPath /tmp/ssh-%r@%h:%p
ForwardAgent yes
HashKnownHosts no
StrictHostKeyChecking no
[2016/08/12 17:15:23.422] fatal error: concurrent map writes
[2016/08/12 17:15:23.429] goroutine 84804 [running]:
[2016/08/12 17:15:23.429] runtime.throw(0xb1b150, 0x15)
[2016/08/12 17:15:23.429] /opt/go/src/runtime/panic.go:547 +0x90 fp=0xc82018dbc0 sp=0xc82018dba8
[2016/08/12 17:15:23.429] runtime.mapassign1(0x917140, 0xc820152f30, 0xc82018dd98, 0xc82018dda8)
[2016/08/12 17:15:23.429] /opt/go/src/runtime/hashmap.go:445 +0xb1 fp=0xc82018dc68 sp=0xc82018dbc0
[2016/08/12 17:15:23.429] github.com/mongodb/curator/repobuilder.(*Job).signFile(0xc82b1650a0, 0xc833c640c0, 0xbb, 0x0, 0x0, 0x1, 0x0, 0x0)
[2016/08/12 17:15:23.429] /data/mci/c01af3d97f51886800017ebc861f719d/gopath/src/github.com/mongodb/curator/repobuilder/job.go:209 +0x1242 fp=0xc82018df20 sp=0xc82018dc68
[2016/08/12 17:15:23.429] github.com/mongodb/curator/repobuilder.(*Job).linkPackages.func1(0xc827858280, 0xc82b1650a0, 0xc820954dc0, 0xc833c640c0, 0xbb)
[2016/08/12 17:15:23.429] /data/mci/c01af3d97f51886800017ebc861f719d/gopath/src/github.com/mon
session, err := mgo.Dial(*dbHost)
if err != nil {
fmt.Println(err)
return
}
(defun gist-created-callback (gist)
(let ((location (oref gist :html-url)))
(message "Paste created: %s" location)
(when gist-view-gist
(browse-url location))
(kill-new location)))