This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
JAVA_HOME=${1-text} | |
[ $# -eq 0 ] && { echo "Usage: sudo $0 \$(/usr/libexec/java_home -v '1.8*')" ; exit 1; } | |
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts | |
wget https://letsencrypt.org/certs/letsencryptauthorityx1.der | |
wget https://letsencrypt.org/certs/letsencryptauthorityx2.der |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ES_USERNAME=YourUsername | |
ES_PASSWORD=YourPassword | |
curl https://apt-oss.geteventstore.com/eventstore.key | sudo apt-key add - | |
echo "deb [arch=amd64] https://$ES_USERNAME:$ES_PASSWORD@apt-commercial.geteventstore.com/ubuntu/ trusty main" | sudo tee /etc/apt/sources.list.d/eventstore.list | |
sudo apt-get update | |
sudo apt-get install eventstore-ha |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.CodeDom; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using EventStore.ClientAPI; | |
using EventStore.ClientAPI.Embedded; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import akka.stream.scaladsl.Flow | |
import scala.concurrent.{ ExecutionContext, Future } | |
import scalaz._ | |
import scalaz.std.scalaFuture.futureInstance // IntelliJ lies | |
/** | |
* Flowz provides Akka Stream Flow like methods for monadic types. | |
* | |
* You can define the `M` type and the input type, and let the compiler infer the output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////// GenClient.scala /////////////////// | |
package remotely | |
import scala.language.experimental.macros | |
import scala.annotation.StaticAnnotation | |
/** | |
* Macro annotation that generates a client. Usage: | |
* `@GenClient(remotely.Protocol.empty) object MyClient` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Method | |
import java.util.concurrent.atomic.AtomicReference | |
import akka.actor.ExtendedActorSystem | |
import akka.serialization.Serializer | |
import com.trueaccord.scalapb.GeneratedMessage | |
import scala.annotation.tailrec | |
/** | |
* This Serializer serializes `com.trueaccord.scalapb.GeneratedMessage`s | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
projections=( | |
"by_category" | |
"by_event_type" | |
"stream_by_category" | |
"streams" | |
"users" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.language.implicitConversions | |
import scalaz.\/ | |
trait WrappedValue[T] extends Any { | |
private def clazz = this.getClass | |
def value: T | |
override def toString = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This should work with Scala 2.10.4 & scalaz 7.1, core, effect and concurrent packages | |
import scalaz.{ concurrent, Free, Functor, Monad, syntax } | |
import concurrent.Task | |
import Free.{freeMonad => _, _} | |
import syntax.monad._ | |
// Describe the set of actions - which are functors | |
sealed trait RedisF[+A] { | |
def map[B](fn: A => B): RedisF[B] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
coreos: | |
update: | |
reboot-strategy: off | |
units: | |
- | |
name: custom-reboot.service | |
runtime: true | |
content: | |