Skip to content

Instantly share code, notes, and snippets.

Avatar

Kjell-Magne Øierud kjellm

View GitHub Profile
View event-sourcing.st
Object subclass: #BaseObject
instanceVariableNames: ''
classVariableNames: 'registry'
poolDictionaries: ''
category: 'EventSourcing'!
!BaseObject methodsFor: 'as yet unclassified' stamp: 'KjellMagneOierud 1/22/2017 11:29'!
logg: aString
Transcript show: aString ; cr .! !
@kjellm
kjellm / app.rb
Last active Aug 23, 2019
Event Source proof of concept. Copyright 2017 Kjell-Magne Øierud. License: MIT https://opensource.org/licenses/MIT
View app.rb
require_relative 'base'
require_relative 'event'
require_relative 'cmd'
require_relative 'crud'
require_relative 'model'
require_relative 'read'
require 'pp'
class Application < BaseObject
@kjellm
kjellm / web_server.rb
Last active Dec 14, 2015
Plugman, Celluloid, DCell, Reel, Websockets
View web_server.rb
#! /usr/bin/env ruby
require 'reel'
require 'dcell'
DCell.start :id => "web_server", :addr => "tcp://127.0.0.1:9001"
class Inbox
include Celluloid
include Celluloid::Notifications
@kjellm
kjellm / graph.rb
Created Oct 26, 2011
Drawing graphs with Ruby, GTK, Cairo, and Graphviz
View graph.rb
#!/usr/bin/env ruby -w
require 'gtk2'
edges = [[:a, :b],
[:a, :c],
[:b, :c],
[:c, :d],
[:d, :e],
[:d, :f],
You can’t perform that action at this time.