(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.
(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.
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| # All Vagrant configuration is done here. The most common configuration | |
| # options are documented and commented below. For a complete reference, | |
| # please see the online documentation at vagrantup.com. |
| using System; | |
| using System.Collections.Generic; | |
| using System.Disposables; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Reflection; | |
| using Funq; | |
| using ServiceStack.Common.Web; | |
| using ServiceStack.Service; |
| $scriptDir = $(Split-Path -parent $MyInvocation.MyCommand.Definition) | |
| function Install-NeededFor { | |
| param( | |
| [string] $packageName = '' | |
| ,[bool] $defaultAnswer = $true | |
| ) | |
| if ($packageName -eq '') {return $false} | |
| $yes = '6' |
| // Example 1 | |
| mediator.name = 'Doug'; | |
| mediator.subscribe('nameChange', function(arg){ | |
| console.log(this.name); | |
| this.name = arg; | |
| console.log(this.name); | |
| }); | |
| mediator.publish('nameChange', 'Jorn'); |
| # Send a metric to statsd from bash | |
| # | |
| # Useful for: | |
| # deploy scripts (http://codeascraft.etsy.com/2010/12/08/track-every-release/) | |
| # init scripts | |
| # sending metrics via crontab one-liners | |
| # sprinkling in existing bash scripts. | |
| # | |
| # netcat options: | |
| # -w timeout If a connection and stdin are idle for more than timeout seconds, then the connection is silently closed. |
| var sip = require('sip'); | |
| var sys = require('sys'); | |
| var redis = require('redis'); | |
| //Trim leading and trailing whitespace from string values. | |
| function trim(str) { | |
| return str.replace(/^\s+|\s+$/g, ''); | |
| } | |
| sip.start({},function(request) { |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Text; | |
| namespace ConsoleApplication1 | |
| { | |
| public abstract class HierarchyNode | |
| { |