This will guide you through setting up a replica set in a docker environment using.
- Docker Compose
- MongoDB Replica Sets
- Mongoose
- Mongoose Transactions
Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!
defmodule Variadic do | |
# https://elixirforum.com/t/defining-an-anonymous-function-of-dynamic-arity-not-variadic/38228/7?u=eksperimental | |
def spread_combine(h, f, g) do | |
{:arity, f_arity} = Function.info(f, :arity) | |
{:arity, g_arity} = Function.info(g, :arity) | |
args = Macro.generate_arguments(f_arity + g_arity, __MODULE__) | |
{f_args, g_args} = Enum.split(args, f_arity) | |
fn_ast = |
This will guide you through setting up a replica set in a docker environment using.
Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!
function wait(signal, ms) { | |
return new Promise((res, rej) => { | |
const timeOut = setTimeout(() => { | |
console.log("I was called"); | |
res("ok"); | |
}, ms); | |
signal.catch(err => { | |
rej(err); | |
clearTimeout(timeOut); |
import arrow.Kind | |
import arrow.core.Option | |
import arrow.core.Try | |
import arrow.core.functor | |
import arrow.effects.IO | |
import arrow.effects.fix | |
import arrow.effects.functor | |
import arrow.typeclasses.Functor | |
/* algebras */ |
It's relatively easy to scale out stateless web applications. You often only need a reverse proxy. But for those stateful web applications, especially those applications that embeds websocket services in them, it's always a pain to distribute them in a cluster. The traditional way is introducing some external services like Redis to handle pubsub, however, in such way, you often need to change your code. Can Erlang/Elixir, the "concurrency oriented programming languages", best other languages in this use case? Has Phoenix framework already integrated the solution of horizontally scaling websocket? I'll do an experiment to prove (or disprove) that.
Git freak como sou, precisava compartilhar algo útil sobre ele, claro. E, já que não vejo muito por aí o pessoal usando, resolvi falar dos alias do git! É um recurso que eu uso muito, e nunca entendi porque muitas pessoas não são adeptas. 😕
Pelo nome você já deve perceber que os alias no git são atalhos. Atalhos pro quê? São atalhos para comandos do git e até comandos shell se você quiser. E é bem fácil cadastrar um alias:
$ git config --global alias.st status