- CQRS Journey: Free ebook from Microsoft (Print book available for purchase)
- Functional and Reactive Domain Modeling: A high level overview of how to build up domain models using free monads and interpreters.
- Reactive Microservices Architecture: Free booklet from Lagom and O'Reilly
- Reactive Messaging Patterns with the Actor Model: Applications and Integration in Scala and Akka
- Domain-Driven Design: Tackling Complexity in the Heart of Software
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Namespace.models.Base = Backbone.Model.extend | |
initialize: ()-> | |
Backbone.Model::initialize @, arguments | |
return if _.isUndefined(@computed) | |
@_computed = {} | |
for attr, dependencies of @computed | |
@on "change:#{attr}", ()=> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
spec_hits = [] | |
checks = { | |
'_spec\.rb$' => ['focus:[:space:]*true'], | |
'\.rb$' => ['binding\.pry', 'debugger'] | |
} | |
# Find the names of all the filenames that have been (A)dded (C)opied or (M)odified | |
filenames = `git diff --cached --name-only --diff-filter=ACM`.split("\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function::define = (prop, desc) -> | |
Object.defineProperty this.prototype, prop, desc | |
class GetterSetterTest | |
constructor: (@_obj = {}) -> | |
# 'obj' is defined via the prototype, the definition proxied through | |
# to 'Object.defineProperty' via a function called 'define' providing | |
# some nice syntactic sugar. Remember, the value of '@' is | |
# GetterSetterTest itself when used in the body of it's class definition. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wait4eth1() { | |
CNT=0 | |
until ip a show eth1 | grep -q UP | |
do | |
[ $((CNT++)) -gt 60 ] && break || sleep 1 | |
done | |
sleep 1 | |
} | |
wait4eth1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure ntpd doesn't give up if the time is way off | |
cp /etc/ntp.conf /etc/ntp.conf.old | |
(echo tinker panic 0; cat /etc/ntp.conf.old) >/etc/ntp.conf | |
/etc/init.d/ntp restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A queue that you can pass to IO.select. | |
# | |
# NOT THREAD SAFE: Only one thread should write; only one thread should read. | |
# | |
# Purpose: | |
# Allow easy integration of data-producing threads into event loops. The | |
# queue will be readable from select's perspective as long as there are | |
# objects in the queue. | |
# | |
# Implementation: |
The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.hello.protobuf; | |
import java.util.Map; | |
import com.google.protobuf.*; | |
import com.google.protobuf.Descriptors.*; | |
import com.google.protobuf.DescriptorProtos.*; | |
public class HelloProto { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file_to_disk = './tmp/large_disk.vdi' | |
Vagrant::Config.run do |config| | |
config.vm.box = 'base' | |
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024] | |
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk] | |
end |
OlderNewer