Skip to content

Instantly share code, notes, and snippets.

View sgonyea's full-sized avatar

Scott Gonyea sgonyea

  • Google
  • Mountain View, CA
View GitHub Profile
[10:14pm] scootsm: where did the cliff come from
[10:14pm] moonpolysoft_: that's my name dogg
[10:14pm] moonpolysoft_: cliff moon
[10:14pm] scootsm: is the "poly soft" your bed name?
[10:15pm] scootsm: osnap
[10:19pm] moonpolysoft_ left the chat room. (Ping timeout: 265 seconds)
[10:21pm] scootsm: oh my god he killed himself because of me
[10:21pm] scootsm: i...
[10:21pm] scootsm: i have power
[10:30pm] moonpolysoft_ joined the chat room.
//Try this?
curl -X POST -H "content-type: application/json" http://localhost:8098/mapred --data @-
{"inputs":"stats-Ev::AssetCreation", "query":[{"map": {"language":"javascript", "keep":"true","source":"function(v) {return [1];}"}}]}
curl -X POST -H "content-type: application/json" http://localhost:8098/mapred --data @-
{"inputs":"stats-Ev::AssetCreation", "query":[{"map": {"keep":true,"language":"javascript", "source":"function(v) {return [1];}"}}]}
curl -X POST -H "content-type: application/json" http://localhost:8098/mapred --data @-
{"inputs":"stats-Ev::AssetCreation","query":[{"map":{"language":"javascript","keep":true,"source":"function(v){ return [1]; }"}}]}
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
[
%% Riak Core config
{riak_core, [
%% Default location of ringstate
{ring_state_dir, "data/ring"},
%% riak_web_ip is the IP address that the Riak HTTP interface will
%% bind to. If this is undefined, the HTTP interface will not run.
#!/usr/bin/ruby
require 'riak'
require 'csv'
begin
case ARGV.size
when 1 then port = ARGV[0].to_i
when 0 then port = 8097
else raise ArgumentException
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>ec2-1-2-3-4.us-west-1.compute.amazonaws.com:8021</value>
</property>
#import <Foundation/Foundation.h>
@interface Communicator : NSObject <NSStreamDelegate> {
@public
NSString *host;
int port;
}
- (void)setup;
//
// MessageCodes.h
// riak_pb-objc
//
// Created by Scott Gonyea on 8/30/10.
// Copyright (c) 2010 Inherently Lame, Inc. All rights reserved.
//
#ifndef _PABST_MC_
# define _PABST_MC_
/* */
@sgonyea
sgonyea / RiakProtobuf.mm
Created October 15, 2010 20:05
The ruby extension ObjC Lib
//
// RiakProtobuf.m
// riak_pb-objc
//
// Created by Scott Gonyea on 9/1/10.
// Copyright (c) 2010 Inherently Lame, Inc. All rights reserved.
//
extern "C" {
# import "RiakProtobuf.h"
@sgonyea
sgonyea / benchmark results
Created October 18, 2010 16:53
benchmark
sgonyea@skgMac:~/Sites/workspace/pabst/ext$ ruby bench.rb
Rehearsal -----------------------------------------------
run: ObjC 0.000000 0.000000 0.000000 ( 0.002444)
run: Riakpb 0.080000 0.010000 0.090000 ( 0.084117)
run: Ripple 0.030000 0.010000 0.040000 ( 0.048546)
-------------------------------------- total: 0.130000sec
user system total real
run: ObjC 0.000000 0.000000 0.000000 ( 0.002088)
run: Riakpb 0.070000 0.000000 0.070000 ( 0.077778)