Skip to content

Instantly share code, notes, and snippets.

Drew Wells drewwells

Block or report user

Report or block drewwells

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View security.mx
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 Nov 26, 2015
Go benchmark of md5, sha1, sha256
View cache.go
package bench
import (
"crypto/md5"
"crypto/rand"
"crypto/sha1"
"crypto/sha256"
"hash"
"testing"
)
View gist.go
// 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
//
View TCP leak stacktrace
[ 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]:
View lsof -p 26866
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 Nov 21, 2015
go get github.com/wellington/go-libsass/examples/blah
View stacktrace
(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]
View system.go
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 {
View swagger
{
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"http",
"https"
View main.go
package main
import (
"flag"
"fmt"
"log"
"net"
"net/http"
"net/http/httputil"
"net/url"
View getmorecwd
1) wd=0x7fff5fbfca80, wd=/Users/drew/src/github.com/wellington/wellington
1) wd=0x7000001032b0, wd=/Users/drew/src/github.com/wellington/wellington
1) wd=0x7000001862b0, wd=/Users/drew/src/github.com/wellington/wellington
1) wd=0x7000002092b0, wd=/Users/drew/src/github.com/wellington/wellington
1) wd=0x70000030f2b0, wd=/Users/drew/src/github.com/wellington/wellington
1) wd=0x7000004152b0, wd=/Users/drew/src/github.com/wellington/wellington
1) wd=0x7000004982b0, wd=/Users/drew/src/github.com/wellington/wellington
1) wd=0x70000051b2b0, wd=/Users/drew/src/github.com/wellington/wellington
1) wd=0x7000003922b0, wd=/Users/drew/src/github.com/wellington/wellington
1) wd=0x70000028c2b0, wd=/Users/drew/src/github.com/wellington/wellington
You can’t perform that action at this time.