Skip to content

Instantly share code, notes, and snippets.

@drewwells
drewwells / SassMeister-input.scss
Created January 6, 2016 21:42
Generated by SassMeister.com.
// ----
// Sass (v3.4.20)
// Compass (v1.0.3)
// ----
#010 {
color: #abc line-block
}
function mxGraph(b,d,f,e){
var a=new Date();
a.setFullYear(2016,0,1);
var c=new Date();
if(a<c){
alert("mxGraph Evaluation copy expired");
return
}
}
@drewwells
drewwells / cache.go
Last active April 22, 2024 14:50
Go benchmark of md5, sha1, sha256
package bench
import (
"crypto/md5"
"crypto/rand"
"crypto/sha1"
"crypto/sha256"
"hash"
"testing"
)
@drewwells
drewwells / gist.go
Last active November 25, 2015 17:30
// Package classification API.
//
// the purpose of this application is to provide an application
// that is using plain go code to define an API
//
//
// Schemes: https
// Host: localhost
// Version: 0.0.1
//
[ plugins:docker ] [ Err ] 2015/11/23 12:28:29 docker.go:690 Error on Docker listener socket, pausing to re-try connection
[ plugins:dockerimg ] [ Err ] 2015/11/23 12:28:44 dockerimg.go:134 could not get connection: Docker daemon did not respond
establishing new connection
[ plugins:dockerimg ] [ Err ] 2015/11/23 12:28:49 dockerimg.go:134 could not get connection: Docker daemon did not respond
returning existing client
establishing new connection
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0xad568a]
goroutine 67816 [running]:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
stackengi 26866 vagrant cwd DIR 0,37 2346 7258755 /home/vagrant/src/github.com/stackengine/controller
stackengi 26866 vagrant rtd DIR 252,0 4096 2 /
stackengi 26866 vagrant txt REG 0,37 35109781 5926 /home/vagrant/src/github.com/stackengine/controller/build/dev/stackengine
stackengi 26866 vagrant mem REG 252,0 149120 524436 /lib/x86_64-linux-gnu/ld-2.19.so
stackengi 26866 vagrant mem REG 252,0 141574 524546 /lib/x86_64-linux-gnu/libpthread-2.19.so
stackengi 26866 vagrant mem REG 252,0 14664 524472 /lib/x86_64-linux-gnu/libdl-2.19.so
stackengi 26866 vagrant mem REG 252,0 1845024 524456 /lib/x86_64-linux-gnu/libc-2.19.so
stackengi 26866 vagrant mem-W REG 252,0 1048576 1444562 /var/lib/stackengine/storelib.db
stackengi 26866 vagrant mem-W REG 252,0 1048576 1444572 /var/lib/stackengine/storelib.db.bleve/store
@drewwells
drewwells / stacktrace
Last active November 21, 2015 22:45
go get github.com/wellington/go-libsass/examples/blah
(gdb) catch throw
Catchpoint 2 (throw)
(gdb) run
Starting program: C:\code\src\github.com\wellington\go-libsass\blah\blah.exe
[New Thread 58628.0xe534]
[New Thread 58628.0xe530]
[New Thread 58628.0xe52c]
[New Thread 58628.0xe524]
[New Thread 58628.0xe520]
[New Thread 58628.0xe51c]
diff --git a/plugins/system/system.go b/plugins/system/system.go
index 5df57d9..bedefcc 100644
--- a/plugins/system/system.go
+++ b/plugins/system/system.go
@@ -549,11 +549,14 @@ func (sp *Plugin) getCurrentSystemState() (SystemState, error) {
state.NumCpus = runtime.NumCPU()
state.Hostname, err = os.Hostname()
- state.PoolID = sp.GetPoolID(state.Hostname)
if err != nil {
@drewwells
drewwells / swagger
Last active November 9, 2015 20:32
{
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"http",
"https"
package main
import (
"flag"
"fmt"
"log"
"net"
"net/http"
"net/http/httputil"
"net/url"