Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am esfand on github.
  • I am hub (https://keybase.io/hub) on keybase.
  • I have a public key whose fingerprint is 12B3 DB53 DE16 262F B98F 175E EBD7 3E76 31CE 186D

To claim this, I am signing this object:

@esfand
esfand / gist:27e854ee6cf62e05f441
Last active November 9, 2016 15:22 — forked from SzymonPobiega/gist:5220595
DDD/CQRS/ES/Architecture videos

If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:

In the evenings read the [Domain-Driven Design Quickly Minibook]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):

  1. Eric Evans' [What I've learned about DDD since the book]{http://www.infoq.com/presentations/ddd-eric-evans}
  2. Eric Evans' [Strategic Design - Responsibility Traps]{http://www.infoq.com/presentations/design-strategic-eric-evans}
  3. Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{http://www.infoq.com/presentations/SOA-Business-Autonomous-Components}
  4. Udi Dahan's [Command-Query Responsibility Segregation]{http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation}
  5. Greg Young's [Unshackle Your Domain]{http://www.infoq.com/presentations/greg-young-unshackle-qcon08}
  6. Eric Evans' [Acknowledging CAP at the Root -- in the Domain Model]{ht
@esfand
esfand / introrx.md
Last active May 15, 2016 18:37 — forked from staltz/introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

/// <reference path="../../typings/tsd.d.ts" />
///
import {PipeFactory} from 'angular2/src/change_detection/pipes/pipe';
import {async} from 'angular2/src/change_detection/change_detection';
import {NullPipeFactory, Pipe, PipeRegistry, defaultPipes} from 'angular2/change_detection';
import {bind} from 'angular2/di';
import {ObservablePipe} from 'angular2/pipes';
import * as Rx from 'rx';
export function isObservable(obs) {
@esfand
esfand / github-push.sh
Last active August 29, 2015 14:16 — forked from timmmmyboy/github-push.sh
Script to sync all changes between DokuWiki and GitHub
cd /home/username/public_html/data/pages/
git pull
git add -A
git commit -m "Dokuwiki external edit"
git push origin master
Char Unicode
------------------------------
Ä, ä \u00c4, \u00e4
Ö, ö \u00d6, \u00f6
Ü, ü \u00dc, \u00fc
ß \u00df
package fi.markoa.experiment.servlet3;
import javax.servlet.AsyncContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
package de.YonasCode.TheCore.MultiMap;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Set;
public class MultiMap<A, B, C> implements Cloneable, Iterable<A>, Serializable {
import com.memetix.mst.language.Language;
import com.memetix.mst.translate.Translate;
public class ExampleTranslation {
public static void main(String[] args) throws Exception {
//Replace client_id and client_secret with your own.
Translate.setClientId("CLIENT_ID_HERE");
Translate.setClientSecret("CLIENT_SECRET_HERE");
// Translate an english string to spanish
// snippet written for and relates to:
// http://autumnator.wordpress.com/2014/09/23/selenium-page-objects-beyond-pages-like-a-cart-object/
/**
* Cart item implementation as a data structure
* containing a related set of WebElements to work with
*
* These cart items reside in and can be extracted from
* shopping cart page object to then be worked with.
**/