Skip to content

Instantly share code, notes, and snippets.

Avatar

Steffen Forkmann forki

View GitHub Profile
View gist:8740980
<?xml version="1.0" encoding="utf-8"?>
<doc>
<assembly><name>FakeLib</name></assembly>
<members>
<member name="M:Fake.AdditionalSyntax.op_EqualsQmarkGreater(System.String,System.String,System.Boolean)">
<summary>
Defines a conditional dependency - y is dependent on x if the condition is true
</summary>
</member>
<member name="M:Fake.AdditionalSyntax.op_LessEqualsGreater(System.String,System.String)">
@forki
forki / gist:8902210
Last active Aug 29, 2015
Rx + async
View gist:8902210
public static void RegisterConnection(string connectionId, string company, string processId)
{
var observable =
Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(2))
.SelectMany(_ => Observable.FromAsync(() => ProcessService.GetProcessChangeTimeAsync(company, processId)))
.Distinct()
.SelectMany(_ => Observable.FromAsync(() => ProcessService.GetDiagramDataAsync(company, processId)));
var subscription = observable.Subscribe(json => _hub.Clients.Client(connectionId).loadProcess(json));
Subscriptions.Add(connectionId, subscription);
@forki
forki / gist:9018549
Last active Aug 29, 2015
UnitTests in NAV2013
View gist:9018549
let connectionInfo = createRTCConnectionInfo navClientVersion nstServer nstServiceTierName nstPort company
let rec runSuite index =
tracefn " Starting Codeunit Index %i" index
CleanDir nstConfigDir
WriteConfigFile (nstConfigDir @@ "navconfig.txt")
["TestSuite", index.ToString()
"RootPath", FullName "."]
RunCodeunit connectionInfo 80500
@forki
forki / gist:9032066
Created Feb 16, 2014
Split ObjectFile
View gist:9032066
module GitNav.Split
open System
open System.IO
open msu.Navision.NavisionFile
open msu.Navision
open Fake
let normalizedDateTime = new DateTime(2010,1,1,12,0,0)
View gist:9595700
// --------------------------------------------------------------------------------------
// FAKE build script
// --------------------------------------------------------------------------------------
#r @"packages/FAKE/tools/FakeLib.dll"
#r @"packages/FAKE/tools/Fake.IIS.dll"
open Fake
open Fake.Git
open Fake.AssemblyInfoFile
open Fake.ReleaseNotesHelper
View gist:c0181845e6c1584a6455
// A := 5;
Decimal18 A = 5;
// MESSAGE(FORMAT(159957.6 / 12245.89 * A));
Console.WriteLine((Decimal18)(159957.6M / 12245.89M * A));
// 65.310728742459715
// MESSAGE(FORMAT(159957.6 / 12245.89 * 5));
Console.WriteLine((Decimal18)(159957.6M / 12245.89M * 5));
// 65.3107287424597151
@forki
forki / gist:2e71fa91d92c45fe05be
Last active Aug 29, 2015
Correct compilation
View gist:2e71fa91d92c45fe05be
Console.WriteLine(
(Decimal18)(159957.6M) / (Decimal18)(12245.89M) * (Decimal18)(5));
// 65.310728742459715
View gist:829e8a3c6ccda8a848dd
OnRun=VAR
A@1000000000 : Decimal;
BEGIN
A := 5;
MESSAGE(FORMAT(159957.6 / 12245.89 * A));
MESSAGE(FORMAT(159957.6 / 12245.89 * 5));
END;
View gist:5d389178bf1507b957f2
if not hasBuildParam "testonly" then
"Clean"
==> "Build"
==> "Test"
// no run "build.bat testonly"
View gist:c254f78cd2eaadbfd61a
- title : FsReveal
- description : Introduction to FsReveal
- author : Karlkim Suwanmongkol
- theme : night
- transition : default
***
### What is FsReveal?