Skip to content

Instantly share code, notes, and snippets.

View aph5nt's full-sized avatar

Kamil Wojciechowski aph5nt

View GitHub Profile
# nano /lib/systemd/system/subtensorAliceBob.service
# # add content:
# [Unit]
# Description=Subtensor Alice and Bob
# [Service]
# ExecStart=/root/subtensor/scripts/localnet.sh
# [Install]
#!/bin/bash
: "${CHAIN:=local}"
: "${BUILD_BINARY:=0}"
: "${SPEC_PATH:=specs/}"
: "${FEATURES:=pow-faucet}"
FULL_PATH="$SPEC_PATH$CHAIN.json"
@aph5nt
aph5nt / reactive_systems_bibliography.md
Created May 16, 2020 10:14 — forked from brendanzab/reactive_systems_bibliography.md
A reading list that I'm collecting while building my Rust ES+CQRS framework: https://github.com/brendanzab/chronicle

Functional, Reactive, and Distributed Systems Bibliography

Books

@aph5nt
aph5nt / usage of amplify.fs
Created August 8, 2016 18:38
usage of amplify w# binding
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
@aph5nt
aph5nt / amplify.fs
Created August 8, 2016 18:38
sample amplify w# binding
namespace Amplify
open WebSharper
open WebSharper.JavaScript
open WebSharper.InterfaceGenerator
open WebSharper.JQuery
module Definition =
let DefineRequestType =
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
aph5nt / fs
Last active November 7, 2015 17:35
let filter (game : Game) = game.Status = GameStatus.Refunded || game.Status = GameStatus.Completed
games
|> toSeq
|> Seq.filter(fun(k,v) -> filter v)
|> Seq.map(fun(k,v) -> v)
|> Seq.sortByDescending(fun(v) -> v.DrawingAt)
|> Seq.map (fun(v) -> toPreviousGame v)
|> Seq.toArray
@aph5nt
aph5nt / gist:aabd5a9015d4d94882ba
Created July 20, 2015 18:14
sql persistance configuration is not working
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="akka" type="Akka.Configuration.Hocon.AkkaConfigurationSection, Akka" />
</configSections>
<akka>
<hocon>
<![CDATA[
akka {
let initGames() =
let table = new Database.dbo.Tables.Game()
table.Clear()
table.AcceptChanges()
table.AddRow("My First Game", DateTime.UtcNow.AddHours(-1.00), DateTime.UtcNow.AddHours(1.00), DateTime.UtcNow.AddHours(2.00), Some(10000L))
table.AcceptChanges()
table.Dispose() |> ignore
ignore
let something =
1 + 1