scph5500.bin 26-Aug-2018 20:47 512.0K
scph5501.bin 26-Aug-2018 20:47 512.0K
scph5502.bin 26-Aug-2018 20:47 512.0K
defmodule MyWeb.UploadFileTest do | |
use MyWeb.ConnCase | |
@email_suppressions_mutation """ | |
mutation UploadFile($file: Upload!) { | |
uploadFile (file: $file) { | |
success | |
message | |
} | |
} |
scph5500.bin 26-Aug-2018 20:47 512.0K
scph5501.bin 26-Aug-2018 20:47 512.0K
scph5502.bin 26-Aug-2018 20:47 512.0K
-module(dstore). | |
% internal operations | |
-export([init/0, loop/1, write/3]). | |
% public system operations | |
-export([start_link/0, stop/0, sync/2, replicate/1, pid/0]). | |
% public k/v operations | |
-export([lookup/1, write/2]). | |
-define(TIMEOUT, 30000). |
defmodule CustomUploadS3 do | |
@moduledoc """ | |
Represents an AWS S3 Multipart Upload operation | |
## Examples | |
``` | |
"path/to/big/file" | |
|> S3.Upload.stream_file | |
|> S3.upload("my-bucket", "path/on/s3") | |
|> CustomUploadS3.to_custom_upload_s3() | |
|> ExAws.request!() #=> :done |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Document</title> | |
</head> | |
<body> | |
<input type="file" id="input" onchange="handle_csv(this.files)" /> |
defmodule PortRunner do | |
use GenServer, restart: :temporary | |
defmodule State do | |
defstruct [:command, :exit_status, :port, arguments: []] | |
end | |
@spec start_link(State.t() | map() | keyword()) :: GenServer.on_start() | |
def start_link(args) do | |
GenServer.start_link(__MODULE__, args) |
Inspired by Stuff Goes Bad - Erlang in Anger
Is the global process count indicative of a leak? If so, you may need to investigate unlinked processes, or peek inside supervisors’ children lists to see what may be weird-looking.
defmodule Diags do
@doc """
fun = | |
Gobgpapi.StartBgpRequest | |
|> to_string() | |
|> String.split(".") | |
|> List.last() | |
|> String.replace("Request", "") | |
|> Macro.underscore() | |
|> String.to_atom() | |
apply(MyModule, fun, args) |
defmodule MonitorsDB do | |
@spec new_db() :: :ets.tid() | |
def new_db() do | |
random_string() | |
|> new_db() | |
end | |
@spec new_db(String.t()) :: :ets.tid() | |
def new_db(name) do | |
name |
defmodule ExCluster.StateHandoff do | |
use GenServer | |
require Logger | |
def start_link(opts) do | |
GenServer.start_link(__MODULE__, opts, name: __MODULE__) | |
end | |
def child_spec(opts \\ []) do | |
%{ |