Skip to content

Instantly share code, notes, and snippets.

View schmichael's full-sized avatar

Michael Schurter schmichael

View GitHub Profile
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC/D3cHUz/BmeYnN/5fEAVWxyENF+mBWNnOmBksx58ZpdN6bRIZrfohM2zh2XiT/odW1Bcrmqn3bBXmfLqK8vsWSX3tMWm6B1V/mDVwssNCk5eoqWB4DGu0AboMf3Af1LQXTKBeDfqI6E4KepBug+G8NQtM3qiWTLMr8h3OZ/CdvSd9aI+BZzOwqgivHZjIshmnhHitenxvPqKh7jd9vJoBunyvd62CNoRGSWOOfw/mr+39m3Tq1IOumJbn4v4eZptWRBFDNjA3Kc8v8m3xRZhgZlrCrXxu0P35Hoz0PN4N0qt2fmCKuldFnibVfOZOYRMfthjef5zNzOIhjd1Yjujq2V3xVcmnemWtQqR6HA93hQn0iYZp5qE9RklN+bGzqBeW/ehqpC2ZUax6EVQ1qXUgRhcj8gBp9Qqlb9euiSTEu4Mo7nsVAu3ogS/huaKpHGLd1esvCEEw4HcqV9u/B2FdM7sVc6eJc2UulA2DwOA+Cjj60s5cuUfYSuX0BbqXrHA7OdL7ze1MT9jJPW7xnZxHTWHMbKVoKSsfJUXeUz4xbkR+qp2Nuu2yxg06rew5Zdm4+FcGa+OuHpycbEnsl7I+LdcGVDXSttERS6dSIaHNTGd77kAgrsflfK+YygsAfFKAPEO/FNHr2Pw1+nJFMYnR1DeKqI4JRj8UYKbdP6LDGQ== schmichael@hank
curl -XPUT "http://localhost:9200/testindex"
curl -XPUT "http://localhost:9200/testindex/t/_mapping" -d'
{
"t": {
"properties": {
"some_nested_field": {
"type": "nested",
"properties": {
"k": {"type": "string"},
"v":{"type":"string"}
BenchmarkNativePaging SIGQUIT: quit
PC=0x40ecc0
runtime.MCentral_AllocList(0x10f3db8, 0x7fc62f4a1090)
/usr/local/go/src/pkg/runtime/mcentral.c:53 +0x80 fp=0x7fc62f3323d0
runtime.MCache_Refill(0x7fc62f4a1000, 0x7fc600000008)
/usr/local/go/src/pkg/runtime/mcache.c:22 +0x7c fp=0x7fc62f3323f0
runtime.mallocgc(0x70, 0x8e99a0, 0x0)
/usr/local/go/src/pkg/runtime/malloc.goc:71 +0xff fp=0x7fc62f332460
cnew(0x8e99a0, 0x1, 0x0)
#!/bin/bash
set -o nounset
set -o errexit
echo "This script demonstrates inconsistencies between scan scrolls and scrolls with the default search type"
echo
echo "-- Create a test index and some documents"
curl -s -XPUT "http://localhost:9200/testindex" > /dev/null
curl -s -XPUT "http://localhost:9200/testindex/t/1" -d'
Thread 16615: (state = IN_NATIVE)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) @bci=0 (Interpreted frame)
- java.net.AbstractPlainSocketImpl.accept(java.net.SocketImpl) @bci=7, line=398 (Interpreted frame)
- java.net.ServerSocket.implAccept(java.net.Socket) @bci=60, line=530 (Interpreted frame)
- java.net.ServerSocket.accept() @bci=48, line=498 (Interpreted frame)
- sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop() @bci=55, line=388 (Interpreted frame)
- sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run() @bci=1, line=360 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)
use std::io::{TcpListener, TcpStream};
use std::io::{Acceptor, Listener};
use std::io::BufferedStream;
use std::io::IoResult;
fn main() {
serve()
}
fn serve() {
├── bin # random scripts
├── data # db bootstrap files
├── devops # salt in our case
└── src # code
├── ... # a bunch of packages as if they were individual repos
└── cmd
├── app1
└── appN # all of these are main packages that build our service binaries
" vim-go
" http://www.reddit.com/r/golang/comments/21os2p/vimgo_go_development_plugin_for_vim/cgnx2ks
let go_highlight_operators = 0
let go_highlight_functions = 0
let go_highlight_methods = 0
let go_highlight_structs = 0
let g:go_auto_type_info = 0
au FileType go nmap <Leader>gd <Plug>(go-def)
au FileType go nmap <Leader>sgd <Plug>(go-def-split)
au FileType go nmap <Leader>vgd <Plug>(go-def-vertical)
def add1(x):
return x + 1
def is_even(x):
return x % 2 == 0
a = 1
b = add1(a)
c = is_even(b)

TODO

  • Upgrade to cassandra 2.0.9 #1381
  • Cron Repairs
  • Salt Cassandra boxes

Repairs

Cassandra wants you to repair weekly to make sure deleted cells are actually removed before their tombstones expire and they come back from the dead. Sadly repairs seem to fail frequently, so we currently don't attempt them.