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
@sgonyea
sgonyea / functions.sh
Created June 26, 2014 19:05
transparent local development with Vagrant / mapped back to Varnish
function start-vagrant-ssh-port-forward {
ssh-add ~/.vagrant.d/insecure_private_key 2>&1 >/dev/null
# The `# ...` are a way to slip comments into the command
ssh -L 11211:127.0.0.1:11211 `# <- memcached` \
-L 3306:127.0.0.1:3306 `# <- mysql` \
-L 6379:127.0.0.1:6379 `# <- redis 1` \
-L 6380:127.0.0.1:6380 `# <- redis 2` \
-L 26379:127.0.0.1:26379 `# <- redis sentinel` \
-L 9312:127.0.0.1:9312 `# <- dev sphinx` \
-L 9313:127.0.0.1:9313 `# <- test sphinx` \
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
[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_
/* */