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
/// <reference path="./../../paket-files/borisyankov/DefinitelyTyped/google.analytics/ga.d.ts" /> | |
export var gaNewElem : any = {}; | |
export var gaElems : any = {}; | |
function gaInit(){ | |
var currdate : any = new Date(); | |
/* tslint:disable:no-string-literal */ | |
/* tslint:disable:semicolon */ |
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
open System | |
open System.IO | |
open Logary | |
open Logary.Configuration | |
open Logary.Targets | |
open Logary.Metrics | |
#if INTERACTIVE | |
#else | |
[<EntryPoint>] |
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
open Microsoft.FSharp.Linq.RuntimeHelpers | |
open System | |
open System.Linq.Expressions | |
module Lambda = | |
let toExpression (``f# lambda`` : Quotations.Expr<'a>) = | |
``f# lambda`` | |
|> LeafExpressionConverter.QuotationToExpression | |
|> unbox<Expression<'a>> |
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
module Memoize | |
//More generic variant of http://www.fssnip.net/c4 | |
open System.Collections.Concurrent | |
let cache = ConcurrentDictionary<(string * obj) option,Lazy<obj>>() | |
let memoizeConcurrent (caller:string) (f: ('a -> 'b)) = | |
fun (x :'a) -> | |
(cache.GetOrAdd(Some (caller, x|>box), lazy ((f x)|>box)).Force() |> unbox) : 'b |
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
// In MONO, won't work in interactive, you need to make a project and compile a dll. | |
#if INTERACTIVE | |
#r @"./packages/FSharp.Data/lib/net40/FSharp.Data.dll" | |
#r @"./packages/SQLProvider/lib/net40/FSharp.Data.SqlProvider.dll" | |
// OWIN and SignalR-packages: | |
#I @"./packages/Microsoft.AspNet.SignalR.Core/lib/net45" | |
#r @"./packages/Microsoft.AspNet.SignalR.Core/lib/net45/Microsoft.AspNet.SignalR.Core.dll" | |
#I @"./packages/Microsoft.Owin/lib/net45" |
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
FROM ubuntu:14.04 | |
RUN apt-get -y update | |
# Install Mono (and fsharp) | |
RUN apt-get -y install mono-devel autoconf pkg-config make git libtool | |
RUN git clone https://github.com/fsharp/fsharp | |
RUN cd fsharp && ./autogen.sh --prefix /usr && make && make install | |
# Add some files |
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
lib/ | |
paket-files/ | |
[Pp]ackages/ |
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
#!/bin/bash | |
# Mac version | |
# Install Homebrew package manager: | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew update | |
# Install Node.js and npm | |
brew install node | |
npm install -g npm |
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
#if INTERACTIVE | |
open System | |
open System.IO | |
Console.WriteLine "Downloading components, etc. Will take a while." | |
// Run as admin, developer command prompt or F# Interactive. e.g. "fsi myfile.fsx" | |
[<Literal>] | |
let connectionString = "Data Source=localhost; Initial Catalog=myDatabase; Integrated Security=True;" | |
let serverDir = __SOURCE_DIRECTORY__ + @"/frontend" |
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
// This program will create packages.config files for each .csproj. | |
// It will enumerate your projects dll references to know the corresponding NuGet packages. | |
// packages.config files are used by Paket when converting from NuGet. | |
#if INTERACTIVE | |
#r "System.Xml.dll" //for scripts or interactive | |
#r "System.Xml.Linq.dll" //add reference if using F# as library | |
#else | |
module GeneratePaketConfigs | |
#endif |