Skip to content

Instantly share code, notes, and snippets.

View rogeralsing's full-sized avatar
😈
Feeling Awesome

Roger Johansson rogeralsing

😈
Feeling Awesome
View GitHub Profile
#!/usr/bin/env bash
TOOLS=/tools
echo "download dotnet diagnostic tools"
mkdir "$TOOLS"
chmod 777 $TOOLS
cd "$TOOLS"
tools="dump gcdump source stack trace counters monitor sos"
for t in $tools; do wget -O $TOOLS/dotnet-$t https://aka.ms/dotnet-$t/linux-musl-x64; done;
chmod +x $TOOLS/dotnet-*
open System
open System.Threading.Tasks
open Proto
open Proto.Mailbox
type Actor with
static member SpawnFromFunc handler =
let wrapper = fun c ->
handler(c)
Task.FromResult(0)
@rogeralsing
rogeralsing / elixir_distributed.ex
Created June 11, 2016 16:53 — forked from jisaacstone/elixir_distributed.ex
programmatic node startup in elixir
defmodule ExDistUtils do
def start_distributed(appname) do
unless Node.alive?() do
local_node_name = generate_name(appname)
{:ok, _} = Node.start(local_node_name)
end
cookie = Application.get_env(appname, :cookie)
Node.set_cookie(cookie)
end