Skip to content

Instantly share code, notes, and snippets.

@jsangilve
jsangilve / keybase.md
Created December 1, 2020 13:30
keybase

Keybase proof

I hereby claim:

  • I am jsangilve on github.
  • I am jsangil (https://keybase.io/jsangil) on keybase.
  • I have a public key ASBuhUIyMzpOziszu3PLr_QQ9S7j13vcP5Hjkt2IFaKenwo

To claim this, I am signing this object:

@jsangilve
jsangilve / ddd-cqrs-es.md
Last active May 31, 2019 09:04
Links to learn about Domain Driven Design, Event Sourcing and CQRS

Domain-Driven Design, Event Sourcing and CQRS

A compilation of resources I went through while getting deep into Domain-Driven Design (DDD), Event Sourcing (ES), and CQRS.

Unfortunately, there is not a single source of truth on these topics and the resources are quite scattered around the web. My goal is to create a guide on how to consume them while filtering repeated content.

Guide

  1. Mahmud Hassan - Basic concepts of DDD: basic overview of general concepts like domain, contexts, entities, aggregates, etc (most of these concepts come from Eric Evans's book]).
  2. Greg Young - CQRS and Event Sourcing: General Overview about both concepts (helps to understand that ES without CQRS is an antipattern).
import Html exposing (..)
import Html.App as Html
import Html.Events exposing (..)
import Random
main =
Html.program
{ init = init
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
let range = function (start, end, step = 1) {
if (arguments.length === 1) {
([start, end] = [0, start]);
}
const length = Math.ceil((end - start) / step);
if (length <= 0) return [];
return Array.from(new Array(length), (elem, index) => start + (index * step));
}
@jsangilve
jsangilve / input_with_ajax.js
Last active December 16, 2015 07:49
Simple jQuery snippet for input with XMLHTTPRequest (Ajax)
$(function () {
var timer;
$('#id_input').keyup(function() {
clearTimeout(timer);
var val = this.value
var ms = 1000
timer = setTimeout(function() {
getSomething(val)
}, ms)
});