(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/** | |
* Use: node transaction.js AMOUNT:FROMADDR:TOADDR:TOTAG | |
* eg: node transaction.js 10:rXXXXXXX:rXXXXXX:1337 | |
* To be able to sign the transaction, the object 'wallets' | |
* below should contain the secret key for the used from-wallet. | |
*/ | |
const RippleAPI = require('ripple-lib').RippleAPI | |
const api = new RippleAPI({ server: 'wss://s1.ripple.com' }) // Public rippled server | |
const fetch = require('node-fetch') |
source 'https://rubygems.org' | |
gem 'json' | |
group :test do | |
gem 'minitest' | |
gem 'test-unit' | |
end |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Domain model is an effective tool for software development. It can be used to express really complex business logic, and to verify and validate the understanding of the domain among stakeholders. Building rich domain models in Rails is hard. Primarily, because of Active Record, which doesn't play well with the domain model approach.
One way to deal with this problem is to use an ORM implementing the data mapper pattern. Unfortunately, there is no production ready ORM doing that for Ruby. DataMapper 2 is going to be the first one.
Another way is to use Active Record just as a persistence mechanism and build a rich domain model on top of it. That's what I'm going to talk about in this article.
#!/usr/bin/env python | |
#coding: utf8 | |
#################################### IMPORTS ################################### | |
# Std Libs | |
import os | |
import sys | |
import re | |
import subprocess |
# 30 minutes Lisp in Ruby | |
# Hong Minhee <http://dahlia.kr/> | |
# | |
# This Lisp implementation does not provide a s-expression reader. | |
# Instead, it uses Ruby syntax like following code: | |
# | |
# [:def, :factorial, | |
# [:lambda, [:n], | |
# [:if, [:"=", :n, 1], | |
# 1, |
# Recursively diff two hashes, showing only the differing values. | |
# By Henrik Nyh <http://henrik.nyh.se> 2009-07-14 under the MIT license. | |
# | |
# Example: | |
# | |
# a = { | |
# "same" => "same", | |
# "diff" => "a", | |
# "only a" => "a", | |
# "nest" => { |