Skip to content

Instantly share code, notes, and snippets.

View lucperkins's full-sized avatar
🎯
Focusing

Luc Perkins lucperkins

🎯
Focusing
View GitHub Profile

Future Developer-oriented Docs

  • Constructing Riak DAOs
  • Using Riak as a CR system (for immutable data)
  • SQL migration
  • Column store
  • Document store
@lucperkins
lucperkins / learning-scala.md
Last active August 29, 2015 14:05
Feedback on Learning Scala (for Jason Swartz)

Learning Scala Feedback

Chapter 1

  • Instructions to install Java 7 followed by a java -version command that yields Java 8 is a bit odd. I'd recommend providing sample output for Java 7 instead.
  • Might be a good idea to provide example commands for installing via Homebrew, yum, apt-get, etc.
  • For code snippets inside of paragraphs, it's always helpful IMHO to distinguish the code bits from the ordinary language bits. /usr/local in the middle of a paragraph always comes across as more clear than /usr/local.
  • You should also provide instructions on adding directories to PATH, restarting the shell, and checking to make sure that the directory has been added, i.e. echo $PATH. I know that's super basic stuff, but the install guide should be the most dumbed down part of the book. Experienced users will know to skip over this.
  • I see later on, on page 5, that "println()" is in a code-specific font, as it should be. Make sure to keep this consistent. I see this pop up in a vari
import com.basho.riak.client.api.RiakClient;
import com.basho.riak.client.api.commands.kv.FetchValue;
import com.basho.riak.client.core.query.Location;
import com.basho.riak.client.core.query.Namespace;
import com.google.common.base.Optional;
import java.util.concurrent.ExecutionException;
public class RiakDAO<T> {
private final RiakClient client;
public class Foo {
String word;
public Foo(String word) {
this.word = word;
}
}
public class FooUpdate extends Update<Foo> {
private Foo newFoo;
@lucperkins
lucperkins / ConflictResolution.java
Last active August 29, 2015 14:06
Conflict resolution example
public class Person {
private String name;
private int age;
public Person() {}
public Person(String name, int age) {
this.name = name;
this.age = age;
}
package tutorial;
import backtype.storm.metric.api.GlobalMetrics;
import org.apache.storm.Config;
import org.apache.storm.LocalCluster;
import org.apache.storm.StormSubmitter;
import org.apache.storm.spout.SpoutOutputCollector;
import org.apache.storm.task.OutputCollector;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.topology.OutputFieldsDeclarer;
<body>
<header>
<nav>
<section class="brand">
<img src="logo.png">
</section>
<section class="menu">
<ul>
<li>
<a href="/products">
PulsarClient client = PulsarClient.builder()
.serviceUrl("pulsar://localhost:6650")
.build();
Producer<SensorReading> producer =
client.newProducer(JSONSchema.of(SensorReading.class))
.topic("sensor-data")
.create();
Consumer<SensorReading> consumer =
/*
{{- if ne (getenv "HUGO_ENV") "production" }}
X-Robots-Tag: noindex
{{- end }}
@lucperkins
lucperkins / envoy-grpc-web-config.yaml
Created October 9, 2018 01:52
Envoy blog post Gists
static_resources:
listeners:
- name: listener_0
address:
socket_address: { address: 0.0.0.0, port_value: 8080 }
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
codec_type: auto