Skip to content

Instantly share code, notes, and snippets.

@joestein
joestein / config change
Created June 20, 2013 15:14
Broken Pipes
Joes-MacBook-Air:~ joestein$ cat .ssh/config
Host *
ServerAliveInterval 1440
// I was reading through these examples: http://apocalisp.wordpress.com/2010/06/08/type-level-programming-in-scala/
// and I thought it would be nice to more quickly get to something useful, to show the power of the techniques.
object SizedListExample {
// Type of all Non-negative integers
sealed trait Nat
// This is zero.
sealed trait _0 extends Nat
// Successor to some non-negative number
sealed trait Succ[N <: Nat] extends Nat
03:26:41.036 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:scaladoc] model contains 0 documentable templates
03:27:03.129 [WARN] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:scaladoc] java.lang.UnsupportedOperationException: Position.point
03:27:03.139 [WARN] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:scaladoc] at scala.tools.nsc.util.Position$class.point(Position.scala:88)
03:27:03.139 [WARN] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:scaladoc] at scala.tools.nsc.util.NoPosition$.point(Position.scala:196)
03:27:03.140 [WARN] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:scaladoc] at scala.tools.nsc.util.Position$class.startOrPoint(Position.scala:85)
03:27:03.140 [WARN] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:scaladoc] at scala.tools.nsc.util.NoPosition$.startOrPoint(Position.scala:196)
03:27:03.141 [WARN] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:scaladoc] at scala.tools.nsc.d
03:25:31.764 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] +Datatype fsc scala.tools.ant.FastScalac
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
#!/usr/bin/env python
import sys
nodesLeadingPartitions = {}
nodesLeadingPartitionsForTopic = {}
currentTopicName = ""
for line in sys.stdin:
#!/bin/sh
sudo apt-get -y update
sudo apt-get install -y software-properties-common python-software-properties curl wget git screen ntp
sudo ntpq -p
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get -y update
sudo /bin/echo debconf shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
sudo apt-get -y install oracle-java7-installer oracle-java7-set-default
@joestein
joestein / gist:4b737f6a3ab25aa42ca7
Created June 24, 2015 05:05
error from terraform
Terraform v0.5.2
Your version of Terraform is out of date! The latest version
is 0.5.3. You can update by downloading from www.terraform.io
Josephs-MacBook-Pro:aws joestein$ cat crash.log
2015/06/24 01:01:51 [INFO] Terraform version: 0.5.2 4ed2c8d956d2eae83a2a3750290711ce7fa1ec76+CHANGES
2015/06/24 01:01:51 [DEBUG] Discovered plugin: atlas = /opt/cisco/edge-test/reference/infrastructure/aws/terraform-provider-atlas
2015/06/24 01:01:51 [DEBUG] Discovered plugin: aws = /opt/cisco/edge-test/reference/infrastructure/aws/terraform-provider-aws
2015/06/24 01:01:51 [DEBUG] Discovered plugin: cloudflare = /opt/cisco/edge-test/reference/infrastructure/aws/terraform-provider-cloudflare
2015/06/24 01:01:51 [DEBUG] Discovered plugin: cloudstack = /opt/cisco/edge-test/reference/infrastructure/aws/terraform-provider-cloudstack
@joestein
joestein / gist:e01e707366c0b8cedc76
Created June 24, 2015 05:38
failure from master
2015/06/24 01:37:27 [INFO] Terraform version: 0.6.0 dev 74386655a5b4bcc1123a00715637b302b119f824
2015/06/24 01:37:27 [DEBUG] Discovered plugin: atlas = /opt/cisco/edge-test/reference/infrastructure/aws/terraform-provider-atlas
2015/06/24 01:37:27 [DEBUG] Discovered plugin: aws = /opt/cisco/edge-test/reference/infrastructure/aws/terraform-provider-aws
2015/06/24 01:37:27 [DEBUG] Discovered plugin: azure = /opt/cisco/edge-test/reference/infrastructure/aws/terraform-provider-azure
2015/06/24 01:37:27 [DEBUG] Discovered plugin: cloudflare = /opt/cisco/edge-test/reference/infrastructure/aws/terraform-provider-cloudflare
2015/06/24 01:37:27 [DEBUG] Discovered plugin: cloudstack = /opt/cisco/edge-test/reference/infrastructure/aws/terraform-provider-cloudstack
2015/06/24 01:37:27 [DEBUG] Discovered plugin: consul = /opt/cisco/edge-test/reference/infrastructure/aws/terraform-provider-consul
2015/06/24 01:37:27 [DEBUG] Discovered plugin: digitalocean = /opt/cisco/edge-test/reference/infrastructure/aws/terraform-provide
name: storm-topology-full-dcos
applications:
exhibitor-mesos-storm:
type: "exhibitor-mesos-0.1.x"
id: exhibitor-mesos-storm
version: 0.1
cpu: 0.5
mem: 1024
ports:
- 31991