Skip to content

Instantly share code, notes, and snippets.

View hastebrot's full-sized avatar

Benjamin Gudehus hastebrot

  • Freiheit.com
  • Hamburg, Germany
  • 13:51 (UTC +02:00)
View GitHub Profile

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

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.

@hastebrot
hastebrot / AddCookiesInterceptor.java
Created November 3, 2017 23:31 — forked from tsuharesu/AddCookiesInterceptor.java
Handle Cookies easily with Retrofit/OkHttp
/**
* This interceptor put all the Cookies in Preferences in the Request.
* Your implementation on how to get the Preferences MAY VARY.
* <p>
* Created by tsuharesu on 4/1/15.
*/
public class AddCookiesInterceptor implements Interceptor {
@Override
public Response intercept(Chain chain) throws IOException {
<link rel="import" href="../polymer/polymer-element.html">
<dom-module id="dolphin-controller">
<script>
const clientContext = {
beanManager: {
onBeanUpdate: (callback) => {},
onArrayUpdate: (callback) => {},
notifyBeanChange: () => {},
notifyArrayChange: () => {},
@hastebrot
hastebrot / vanilla-js-cheatsheet.md
Created September 14, 2017 12:41 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet
import org.gradle.api.file.SourceDirectorySet
import org.gradle.api.internal.HasConvention
import org.gradle.api.tasks.SourceSet
import org.gradle.api.tasks.SourceSetContainer
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
//—————————————————————————————————————————————————————————————————————————————————————————————————
// BUILD SCRIPT.
//—————————————————————————————————————————————————————————————————————————————————————————————————

Mini Guide: Verbs for Method Names

  • Attribute: get set is has can
  • Daten: add insert put remove delete replace purge prune move view write read

  • Objekte erstellen: generate create make build assemble evoke produce construct
  • Objekte vorbereiten: initiate configure prepare provide install require publish enable establish
  • Objekte zerstören: cleanup destroy dispose release discard abort revoke
#!/bin/bash
# FILE: record-gif.sh
# DEPS: sudo apt install byzanz gifsicle
# SOURCE: http://askubuntu.com/questions/107726/how-to-create-animated-gif-images-of-a-screencast
# delay in seconds before recording (defaults to 2s).
DELAY=2
# duration in seconds of recording (defaults to 10s).
@hastebrot
hastebrot / MonadicNullSafety.kt
Created January 13, 2017 07:12 — forked from janojanahan/MonadicNullSafety.kt
Kotlin Nullable can behave like a monad
/**
* A Gist proving that Kotlin's nullable type can be made into a monad without wrapping into another
* object and satisfy the Monadic laws
*
* Kotlin has comprehensive null safety built into the language enforced at compile time, using its
* nullable type.
*
* Its language structure makes dealing with nullable values simple and succinct. Unlike other language
* monadic constructs such as Option (scala), Optional(Java8+) and Maybe(Haskell), it is enforced at
* compile time and is compatible with existing non monad aware API (for example,
@hastebrot
hastebrot / tmux.conf
Created January 7, 2017 12:51 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000