Skip to content

Instantly share code, notes, and snippets.

View jaceklaskowski's full-sized avatar
:octocat:
Enjoying developer life...

Jacek Laskowski jaceklaskowski

:octocat:
Enjoying developer life...
View GitHub Profile
@jaceklaskowski
jaceklaskowski / Build.scala
Last active August 29, 2015 14:02
Snippet Build.scala from sbteclipse
lazy val root = Project(
"sbteclipse",
file("."),
aggregate = Seq(sbteclipseCore, sbteclipsePlugin),
settings = commonSettings ++ Seq(
publishArtifact := false
)
)
[info] Generating pdf en/sbt-tutorial...
[error] pandoc: Duplicate link reference `[Using-Plugins]' "source" (line 2418, column 1)
[error] pandoc: Duplicate link reference `[Full-Def]' "source" (line 2417, column 1)
[error] pandoc: Duplicate link reference `[Scopes]' "source" (line 2416, column 1)
[error] pandoc: Duplicate link reference `[Basic-Def]' "source" (line 2415, column 1)
[error] pandoc: Duplicate link reference `[Using-Plugins]' "source" (line 2166, column 1)
[error] pandoc: Duplicate link reference `[More-About-Settings]' "source" (line 2165, column 1)
[error] pandoc: Duplicate link reference `[Basic-Def]' "source" (line 2164, column 1)
[error] pandoc: Duplicate link reference `[Plugins]' "source" (line 2067, column 1)
[error] pandoc: Duplicate link reference `[Input-Tasks]' "source" (line 2066, column 1)
@jaceklaskowski
jaceklaskowski / gist:93c344b5242cb2c4ba04
Last active August 29, 2015 14:06
Spark 1.2.0-SNAPSHOT + spark-cassandra-connector-assembly-1.2.0-SNAPSHOT
➜ spark git:(master) ./bin/spark-shell --master local --jars /Users/jacek/oss/spark-cassandra-connector/spark-cassandra-connector/target/scala-2.10/spark-cassandra-connector-assembly-1.2.0-SNAPSHOT.jar
Spark assembly has been built with Hive, including Datanucleus jars on classpath
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
14/09/23 22:13:03 INFO SecurityManager: Changing view acls to: jacek
14/09/23 22:13:03 INFO SecurityManager: Changing modify acls to: jacek
14/09/23 22:13:03 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(jacek); users with modify permissions: Set(jacek)
14/09/23 22:13:03 INFO HttpServer: Starting HTTP Server
14/09/23 22:13:03 INFO Utils: Successfully started service 'HTTP class server' on port 62525.
Welcome to
____ __
@jaceklaskowski
jaceklaskowski / build.sbt
Created October 1, 2014 09:00
rxscala 0.21.1 and Scala 2.11.2 - to get you going quickly
libraryDependencies += "io.reactivex" %% "rxscala" % "0.21.1"
scalaVersion := "2.11.2"
initialCommands in console := """
import rx.lang.scala._
"""
@jaceklaskowski
jaceklaskowski / futureObserver.scala
Last active August 29, 2015 14:07
A working with Observable.from and Future example
// from https://groups.google.com/d/msg/rxjava/GyVmw-ttbDY/qGHSO5EiEugJ
import rx.lang.scala._
import scala.concurrent._
import ExecutionContext.Implicits.global
import java.util.concurrent.TimeUnit
println(s"Current thread: ${Thread.currentThread.getName()}") // run-main-1
def timeConsumingComputation() = {
TimeUnit.SECONDS.sleep(2)
@jaceklaskowski
jaceklaskowski / Rough Notes about CQRS and ES.md
Last active August 20, 2024 10:55
Rough Notes about CQRS and ES

Rough Notes about CQRS and ES

Once upon a time…

I once took notes (almost sentence by sentence with not much editing) about the architectural design concepts - Command and Query Responsibility Segregation (CQRS) and Event Sourcing (ES) - from a presentation of Greg Young and published it as a gist (with the times when a given sentence was heard).

I then found other summaries of the talk and the gist has since been growing up. See the revisions to know the changes and where they came from (aka the sources).

It seems inevitable to throw Domain Driven Design (DDD) in to the mix.

@jaceklaskowski
jaceklaskowski / Designing for API (with Swagger and Scala).md
Last active November 15, 2020 20:19
Designing for API (with Swagger and Scala)
@jaceklaskowski
jaceklaskowski / about-titan-graph-database.md
Created December 11, 2014 09:48
About Titan graph database (and Gremlin, TinkerPop3 with Scala)

From http://www.tinkerpop.com/docs/3.0.0.M1/:

TinkerPop2 and below made a sharp distinction between the various TinkerPop projects: Blueprints, Pipes, Gremlin, Frames, Furnace, and Rexster. With TinkerPop3, all of these projects have been merged and are generally known as Gremlin. Blueprints → Gremlin Structure API : Pipes → GraphTraversal : Frames → Traversal : Furnace → GraphComputer and VertexProgram : Rexster → GremlinServer.

@jaceklaskowski
jaceklaskowski / About Cake Pattern.md
Last active November 2, 2016 12:51
About Cake Pattern
@jaceklaskowski
jaceklaskowski / Flow[HttpRequest, HttpResponse].md
Last active August 29, 2015 14:12
How Spray benefit from Flow[HttpRequest, HttpResponse], if any?

From the scaladoc for trait Flow[-In, +Out] (package akka.stream.scaladsl):

A Flow is a set of stream processing steps that has one open input and one open output.

Therefore, Flow[HttpRequest, HttpResponse] is a set of stream processing steps that has one open HttpRequest input and one open HttpResponse output.

It appears that inputs are called Sources and outputs are Sinks. Connecting a Source to a Sink creates a flow graph.

That's pretty much the good ol' Spray.