Skip to content

Instantly share code, notes, and snippets.

View kjnilsson's full-sized avatar

Karl Nilsson kjnilsson

View GitHub Profile
@kjnilsson
kjnilsson / fsharp.md
Last active August 9, 2017 13:33
Get started with fsharp + .NET core
diff --git a/docker/rabbitmq-server-buildenv/linux-erlang-19.2/Dockerfile b/docker/rabbitmq-server-buildenv/linux-erlang-19.2/Dockerfile
index fd5732e..75877e0 100644
--- a/docker/rabbitmq-server-buildenv/linux-erlang-19.2/Dockerfile
+++ b/docker/rabbitmq-server-buildenv/linux-erlang-19.2/Dockerfile
@@ -13,12 +13,16 @@
## The Initial Developer of the Original Code is GoPivotal, Inc.
## Copyright (c) 2016-2017 Pivotal Software, Inc. All rights reserved.
-FROM debian:9.0
+FROM buildpack-deps:jessie
@kjnilsson
kjnilsson / query.erl
Created June 29, 2017 09:45
fez: Implement linq in erlang?
'query1'/0 =
fun () ->
let <_fez0> =
fun (_builder@0) ->
call 'Microsoft.FSharp.Linq':'QueryBuilder.Run'(
_builder@0,
call 'Microsoft.FSharp.Linq':'QueryBuilder.Select'(
_builder@0,
call 'Microsoft.FSharp.Linq':'QueryBuilder.For'(
_builder@0,
@kjnilsson
kjnilsson / wat.core
Created June 28, 2017 20:04
What is the third case for? No idea but OTP 20 requires it.
case call 'erlang':'is_integer'(
_fez0) of
<'true'> when 'true' ->
call 'erlang':'is_integer'(
_fez1)
<'false'> when 'true' ->
'false'
<_wat> when 'true' ->
_wat
end
@kjnilsson
kjnilsson / atoms.fs
Last active June 15, 2017 16:11
Fez - use DUs or Enums to represent atoms.
type TU =
| second = 0L
| millisecond = 99L
[<ErlangTerm>]
type TimeUnit =
| Second
| Millisecond
| Microsecond
| Nanosecond
@kjnilsson
kjnilsson / -
Last active June 14, 2017 13:50
{Page::boolean(), Sort :: basic | extended, Columns :: basic | extended}
{false, basic, basic}
[sort];
{false, extended, _}
[augment, sort];
{true, basic | default, basic}
[sort, page]
{true, extended, _}
include/amqp_client.hrl: connection_timeout = infinity,
src/amqp_channel.erl: gen_server:call(Channel, {call, Method, none, self()}, infinity).
src/amqp_channel.erl: gen_server:call(Channel, {call, Method, Content, self()}, infinity).
src/amqp_channel.erl: gen_server:call(Channel, {close, Code, Text}, infinity).
src/amqp_channel.erl: gen_server:call(Channel, next_publish_seqno, infinity).
src/amqp_channel.erl: wait_for_confirms(Channel, infinity).
src/amqp_channel.erl:%% Timeout = non_neg_integer() | 'infinity'
src/amqp_channel.erl: case gen_server:call(Channel, {wait_for_confirms, Timeout}, infinity) of
src/amqp_channel.erl: wait_for_confirms_or_die(Channel, infinity).
src/amqp_channel.erl:%% Timeout = non_neg_integer() | 'infinity'
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
Checking whether the PLT /Users/knilsson/code/rabbitmq/rabbitmq-public-umbrella-master/deps/rabbitmq_shovel/.rabbitmq_shovel.plt is up-to-date... yes
Proceeding with analysis...
Elixir.RabbitMQ.CLI.Ctl.Commands.DeleteShovelCommand.erl:19: Callback info about the 'Elixir.RabbitMQ.CLI.CommandBehaviour' behaviour is not available
Elixir.RabbitMQ.CLI.Ctl.Commands.DeleteShovelCommand.erl:53: Function run/2 has no local return
Elixir.RabbitMQ.CLI.Ctl.Commands.ShovelStatusCommand.erl:19: Callback info about the 'Elixir.RabbitMQ.CLI.CommandBehaviour' behaviour is not available
Elixir.RabbitMQ.CLI.Ctl.Commands.ShovelStatusCommand.erl:54: Function run/2 has no local return
Unknown functions:
'Elixir.RabbitMQ.CLI.Core.Helpers':cli_acting_user/0
'Elixir.RabbitMQ.CLI.DefaultOutput':output/3
crypto:strong_rand_bytes/1
Checking whether the PLT /Users/knilsson/code/rabbitmq/rabbitmq-public-umbrella-master/deps/rabbitmq_shovel/.rabbitmq_shovel.plt is up-to-date... yes
Proceeding with analysis...
Elixir.RabbitMQ.CLI.Ctl.Commands.DeleteShovelCommand.erl:19: Callback info about the 'Elixir.RabbitMQ.CLI.CommandBehaviour' behaviour is not available
Elixir.RabbitMQ.CLI.Ctl.Commands.DeleteShovelCommand.erl:53: Function run/2 has no local return
Elixir.RabbitMQ.CLI.Ctl.Commands.ShovelStatusCommand.erl:19: Callback info about the 'Elixir.RabbitMQ.CLI.CommandBehaviour' behaviour is not available
Elixir.RabbitMQ.CLI.Ctl.Commands.ShovelStatusCommand.erl:54: Function run/2 has no local return
Unknown functions:
'Elixir.RabbitMQ.CLI.Core.Helpers':cli_acting_user/0
'Elixir.RabbitMQ.CLI.DefaultOutput':output/3
crypto:strong_rand_bytes/1