Skip to content

Instantly share code, notes, and snippets.

View reiddraper's full-sized avatar
🍹

Reid Draper reiddraper

🍹
View GitHub Profile
escript: exception error: no match of right hand side value {error,bad_directory}
in function basho_bench:add_code_paths/1
in call from basho_bench:main/1
in call from escript:run/2
in call from escript:start/1
in call from init:start_it/1
in call from init:start_em/1
#!/usr/bin/env python
from xml import sax
from xml.sax import ContentHandler
class XMLHandler(ContentHandler):
def __init__(self):
ContentHandler.__init__(self)
self._buffer = ''
package main
import (
"http"
"net"
"io"
"log"
"os"
"bufio"
)
package main
import (
"http"
"net"
"io"
"log"
"os"
"bufio"
)
reid-air:go_server_test reid$ ./http_server
panic: runtime error: invalid memory address or nil pointer dereference
panic PC=0x42de40
runtime.panic+0xb2 /Users/reid/Documents/repos/clones/go/src/pkg/runtime/proc.c:1028
runtime.panic(0xacee8, 0x47c6b0)
runtime.panicstring+0x69 /Users/reid/Documents/repos/clones/go/src/pkg/runtime/runtime.c:86
runtime.panicstring(0x1eb354, 0x4d4000)
runtime.sigpanic+0x144 /Users/reid/Documents/repos/clones/go/src/pkg/runtime/darwin/thread.c:460
runtime.sigpanic()
set lines=51
set columns=172
set guifont=menlo:h18
@reiddraper
reiddraper / gist:776838
Created January 12, 2011 20:41
bash function for saner pylint defaults
# pylint with more sane defaults
function pyli {
pylint \
--ignored-classes=numpy,cjson \
--disable-msg=C0301 \
--disable-msg=W0142 \
--disable-msg=C0103 \
--disable-msg=C0111 \
--function-rgx="[a-z_][a-z0-9_]{2,30}(ID)?s?$" \
--attr-rgx="[a-z_][a-z0-9_]{2,30}(ID)?s?$" \
#!/usr/bin/env python
from scribe import scribe
from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol
from thrift.server import TServer
def Handler():
pass
// get the resultset object
// this is a synchronous call, that doesn't
// hit the network yet
var results = artist.biographies();
// call a function for each result
results.forEach(30, function(bio) {
console.log(bio.title);
});
sudo riak-admin status
Attempting to restart script through sudo -u riak
1-minute stats for 'riak@33.33.33.11'
-------------------------------------------
vnode gets : 0
vnode_puts : 0
read_repairs : 0
vnode_gets_total : 0
vnode_puts_total : 0
node_gets : 0