Skip to content

Instantly share code, notes, and snippets.

@jaceklaskowski
jaceklaskowski / Rough Notes about CQRS and ES.md
Last active June 30, 2025 08:17
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.

import org.apache.spark._
import org.apache.spark.graphx._
val triplets = sc.textFile(path).flatMap { line =>
if (!line.isEmpty && line(0) != '#') {
val lineArray = line.split("\\s+")
if (lineArray.length < 2) {
None
} else {
val t = new EdgeTriplet[String, String]
@inket
inket / heroku-youtube-dl.rb
Last active February 2, 2016 15:02
heroku-youtube-dl
# Usage:
# ruby -e "$(curl <url_to_this_raw_gist>)" https://www.youtube.com/watch?v=Jo1tjBmwuXI
youtube_url = ARGV[0]
puts "YouTube URL: #{youtube_url}"
`mkdir youtube`
Dir.chdir "youtube"
`curl https://yt-dl.org/downloads/2014.10.13/youtube-dl > youtube-dl`
@prabhatkashyap
prabhatkashyap / CasperJS_in_scroll_pagination.js
Last active August 29, 2015 14:06
CasperJS is an open source navigation scripting & testing utility written in Javascript for the PhantomJS WebKit headless browser and SlimerJS (Gecko)
var casper = require('casper').create({
verbose: true,
logLevel: 'error',
pageSettings: {
loadImages: false,
loadPlugins: false,
userAgent: 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36'
}
});
@ueshin
ueshin / sparkmeetup.md
Created September 8, 2014 08:49
Spark SQL samples for Spark Meetup
@sujee
sujee / named.scala
Created September 2, 2014 20:42
named RDD
override def runJob(sc: SparkContext, config: Config): Any = {
val fileName = config.getString("input.file")
logger.info("### fileName : " + fileName)
var rdd = this.namedRdds.get[String](fileName)
logger.info("### rdd load 1 : " + rdd)
if (rdd.isDefined) {
logger.info("### rdd %s isDefined".format(fileName))
}
else {
logger.info("### rdd %s doesn't exist... loading".format(fileName))
@staltz
staltz / introrx.md
Last active October 14, 2025 19:39
The introduction to Reactive Programming you've been missing
@aslakknutsen
aslakknutsen / start_testing_java8_today.asciidoc
Last active August 3, 2025 16:31
Example of how to use both JDK 7 and JDK 8 in one build.

JDK 8 Released

Most of us won’t be able to use/deploy JDK 8 in production for a looong time. But that shouldn’t stop us from using it, right?

It should be possible to sneak in JDK 8 in the back way, the same way we snuck in Groovy and other libraries we wanted to use.

The Test Suite to the rescue

The Maven compiler plugin run in two separate lifecycles, compile and testCompile. Those can be configured separately.

@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@paulstatezny
paulstatezny / patterns-of-enterprise-application-architecture.md
Last active March 5, 2025 19:48
Notes from Patterns of Enterprise Application Architecture by Martin Fowler

Patterns of Enterprise Application Architecture

By Martin Fowler (2002)

Chapter 1: Layering

A basic example of layering: FTP < TCP < IP < Ethernet

Benefis of layering:

  • You can understand a layer without knowing much about the others.
  • Minimize dependencies.