This guide has been revised 06-03-2015. Start with a clean ubuntu 14.04LTS-x64 machine and get it updated
sudo su
apt-get update && apt-get dist-upgrade
reboot
| #load "FsLab.fsx" | |
| #load "Vega/Vega.fsx" | |
| #load "Excel/Excel.fsx" | |
| open System | |
| open System.Linq | |
| open Excel | |
| open VegaHub | |
| open FsLab | |
| open Deedle |
| using System; | |
| using System.IO; | |
| using System.Reactive.Disposables; | |
| using System.Reactive.Linq; | |
| using ReactiveUI; | |
| namespace SaveAllTheTime.Models | |
| { | |
| interface IFilesystemWatchCache | |
| { |
| * { | |
| font-size: 12pt; | |
| font-family: monospace; | |
| font-weight: normal; | |
| font-style: normal; | |
| text-decoration: none; | |
| color: black; | |
| cursor: default; | |
| } |
[ Launch: home portal ] 26a21fe7939f54dc068b by denmerc[ Launch: test ] 4653053 by enjalot[ Launch: test ] 4652017 by enjalot[ Launch: test ] 4582399 by enjalot
| open Microsoft.FSharp.Linq | |
| open Microsoft.FSharp.Linq.Query | |
| open MongoDB.Driver | |
| open MongoDB.Linq | |
| let inline (?) this key = | |
| ( ^a : (member get_Item : ^b -> ^c) (this,key)) | |
| let inline (?<-) this key value = | |
| ( ^a : (member set_Item : ^b * ^c -> ^d) (this,key,value)) |
| #if INTERACTIVE | |
| #I @"C:\Tools\MongoDB-CSharp\MongoDB.Linq\bin\Debug" | |
| #r "MongoDB.Driver.dll" | |
| #r "MongoDB.Linq.dll" | |
| #r "FSharp.PowerPack.Linq.dll" | |
| #r "System.Core.dll" | |
| #endif | |
| open System | |
| open MongoDB.Driver |
| function Invoke-NodeJS { | |
| param( | |
| $PowerShellCommand, | |
| [Switch]$ReturnAsJSON | |
| ) | |
| if($ReturnAsJSON) {$PowerShellCommand += " | ConvertTo-Json"} | |
| $tmp = [IO.Path]::GetTempFileName() |
| var Db = require('mongodb').Db; | |
| var Connection = require('mongodb').Connection; | |
| var Server = require('mongodb').Server; | |
| //the MongoDB connection | |
| var connectionInstance; | |
| module.exports = function(callback) { | |
| //if already we have a connection, don't connect to database again | |
| if (connectionInstance) { | |
| callback(connectionInstance); |
| var cluster = require('cluster'); | |
| var PORT = +process.env.PORT || 1337; | |
| if (cluster.isMaster) { | |
| // In real life, you'd probably use more than just 2 workers, | |
| // and perhaps not put the master and worker in the same file. | |
| cluster.fork(); | |
| cluster.fork(); | |
| cluster.on('disconnect', function(worker) { |