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
break-cases = fit-or-vertical | |
margin = 80 | |
parse-docstrings = true | |
wrap-comments = true | |
doc-comments = after-when-possible | |
type-decl = sparse | |
type-decl-indent = 2 | |
if-then-else = fit-or-vertical |
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 scalaz._ | |
import Scalaz._ | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.duration.Duration | |
import scala.concurrent.{Await, Future} | |
object Main extends App { | |
val getEitherTFutures1: Seq[EitherT[Future, Throwable, String]] = { | |
Seq( |
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
trait Foo { | |
def execute(): Unit | |
} | |
object Foo extends Foo { | |
def execute(): Unit = println("foo") | |
} | |
trait Bar { | |
val foo: Foo = Foo |
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
trait WrappedNumericLike[A] { | |
def value: A | |
} | |
abstract class WrappedNumeric[A, N <: WrappedNumericLike[A]](value: A)(implicit num: Integral[A]) | |
extends WrappedNumericLike[A] { | |
val companion: A => N | |
def +(x: N): N = companion(num.plus(value, x.value)) | |
def -(x: N): N = companion(num.minus(value, x.value)) | |
def /(x: N): N = companion(num.quot(value, x.value)) |
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
FROM ruby:2.4.1-alpine | |
RUN apk --no-cache --update add \ | |
libstdc++ \ | |
build-base \ | |
openssl-dev \ | |
sqlite \ | |
sqlite-dev \ | |
ruby-dev && \ | |
gem install mailcatcher && \ |
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
FROM ruby:2.4.2 | |
MAINTAINER Dai Akatsuka <[email protected]> | |
ENV DOCKER 1 | |
ENV NVM_DIR /usr/local/nvm | |
ENV NODE_VERSION 8.9.0 | |
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules | |
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH | |
ENV ENTRYKIT_VERSION 0.4.0 | |
ENV APP_ROOT /app |
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.collection.JavaConverters._ | |
val request = new ListObjectsV2Request() | |
request.setBucketName(bucket) | |
request.setPrefix(prefix) | |
@tailrec | |
def fetch(req: ListObjectsV2Request, xs: Iterable[String]): Iterable[String] = { | |
val result = s3Client.listObjectsV2(req) | |
val keys = xs ++ result.getObjectSummaries.asScala.map(_.getKey) |
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 | |
migrate() { | |
echo -n "waiting for TCP connection to $DATABASE_HOST:$DATABASE_PORT..." | |
while ! nc -z $DATABASE_HOST $DATABASE_PORT | |
do | |
echo -n . | |
sleep 3 | |
done |
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.http.scaladsl.server.{ Directive, Directive0, Directive1, Route } | |
import akka.http.scaladsl.server.Directives._ | |
import akka.http.scaladsl.server.directives.OnSuccessMagnet | |
import akka.http.scaladsl.server.util.Tupler | |
import akka.http.scaladsl.util.FastFuture._ | |
import de.heikoseeberger.akkahttpcirce.CirceSupport | |
import io.circe.export.Exported | |
import io.circe.generic.decoding.DerivedDecoder | |
import io.circe.generic.encoding.DerivedObjectEncoder | |
import io.circe.{ Decoder, ObjectEncoder } |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"ecs:RegisterContainerInstance", | |
"ecs:DeregisterContainerInstance", | |
"ecs:DiscoverPollEndpoint", | |
"ecs:StartTelemetrySession", |
NewerOlder