Skip to content

Instantly share code, notes, and snippets.

Kamil Wojciechowski aph5nt

  • Gdynia, Poland
Block or report user

Report or block aph5nt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:0ae5d22a5ed787a7e11f
let compileScript(state : State) =
if(state.hasStartupScript = false) then Success(state, [])
if File.Exists(outputAssembly) then
let provider = new FSharpCodeProvider()
let params'= CompilerParameters()
params'.GenerateExecutable <- false
View gist:5dd1a866e7e2efb24bae
let findOk result item =
|> successTee (fun (obj, msgs) ->
let found = msgs |> List.toSeq |> Seq.tryFind (fun(m) -> m = item)
match found with
| Some msg -> msg |> should be (sameAs item)
| None -> failwith(sprintf "%s not found" item)
let findFailure result item =
View gist:1b24d3635df5594f097d
let initGames() =
let table = new Database.dbo.Tables.Game()
table.AddRow("My First Game", DateTime.UtcNow.AddHours(-1.00), DateTime.UtcNow.AddHours(1.00), DateTime.UtcNow.AddHours(2.00), Some(10000L))
table.Dispose() |> ignore
aph5nt / gist:aabd5a9015d4d94882ba
Created Jul 20, 2015
sql persistance configuration is not working
View gist:aabd5a9015d4d94882ba
<?xml version="1.0" encoding="utf-8" ?>
<section name="akka" type="Akka.Configuration.Hocon.AkkaConfigurationSection, Akka" />
akka {
View fs
let filter (game : Game) = game.Status = GameStatus.Refunded || game.Status = GameStatus.Completed
|> toSeq
|> Seq.filter(fun(k,v) -> filter v)
|>,v) -> v)
|> Seq.sortByDescending(fun(v) -> v.DrawingAt)
|> (fun(v) -> toPreviousGame v)
|> Seq.toArray
View gist:8616368185202fcc58808faa82e0fb41
module Actors =
type MailBox = Eventsourced<GameCommand, obj, State>
let Logger = Serilog.Log.Logger
let update state (evnt : obj) = state
type Apply = MailBox -> State -> obj -> State
let apply : Apply = fun m s e -> s //(mailbox : MailBox) (state : State) (evnt : obj) = state
aph5nt / amplify.fs
Created Aug 8, 2016
sample amplify w# binding
View amplify.fs
namespace Amplify
open WebSharper
open WebSharper.JavaScript
open WebSharper.InterfaceGenerator
open WebSharper.JQuery
module Definition =
let DefineRequestType =
aph5nt / usage of amplify.fs
Created Aug 8, 2016
usage of amplify w# binding
View usage of amplify.fs
namespace Application2
open WebSharper
open WebSharper.JavaScript
open WebSharper.UI.Next
open WebSharper.UI.Next.Client
open WebSharper.UI.Next.Html
open WebSharper.JQuery
open WebSharper.Amplify
You can’t perform that action at this time.