Skip to content

Instantly share code, notes, and snippets.

View Krzysztof-Cieslak's full-sized avatar
#BlackLivesMatter

Krzysztof Cieślak Krzysztof-Cieslak

#BlackLivesMatter
View GitHub Profile
[<AutoOpen>]
module UoM =
// Units of measure for other than integral types
let inline (++) (w: ^W when ^W: (static member IsMeasureAbbrev: ^tm * ^t -> unit)) (t: ^t) = (# "" t: ^tm #)
let inline (--) (w: ^W when ^W: (static member IsMeasureAbbrev: ^tm * ^t -> unit)) (tm: ^tm) = (# "" tm: ^t #)
[<MeasureAnnotatedAbbreviation>]
type Guid<[<Measure>] 'm> = Guid
@jeroldhaas
jeroldhaas / LinuxMac.sh
Last active November 12, 2015 19:05
Node Maintenance
npm install -g flatten-packages
cd ~/.atom/packages
find . -type d -exec flatten-packages {} \;
@TheAngryByrd
TheAngryByrd / build.fsx
Last active September 18, 2016 01:52
Visual Studio Code mono debugging launch.json
//http://www.navision-blog.de/blog/2015/12/21/adding-background-tasks-to-suave-io-websites/
let startApp path =
let info = ProcessStartInfo(FileName = path)
let proc = new System.Diagnostics.Process(StartInfo = info)
start proc
proc

Run Suave on Linux

Step 1 - Install Forge

  • clone the forge-project git clone https://github.com/fsharp-editing/Forge.git
  • change directory cd Forge
  • run the build script ./build.sh

if all works out you should have a Forge.exe in ./temp/bin that you can call with mono (assuming you use mono)

For mono :-
fsharpc -g --debug:full --noframework --define:DEBUG --optimize- --tailcalls- -r:/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5-api/System.dll --target:exe --warnaserror:76 --fullpaths --flaterrors --highentropyva- octokit.fsx --out:/tmp/octokit.exe
Not tested Windows yet, but I assume I will just omit `--noframework` and the System.dll