I hereby claim:
- I am iamd3vil on github.
- I am iamd3vil (https://keybase.io/iamd3vil) on keybase.
- I have a public key ASDAjwrYSjnfoR8qJCumiKU9owcbuym5oHVee3SHqCvAaAo
To claim this, I am signing this object:
| [Interface] | |
| PrivateKey = *********************** | |
| Address = 192.168.10.2/32, fc::2/128 | |
| DNS = 1.1.1.1, 2606:4700:4700::1111 | |
| [Peer] | |
| PublicKey = *********************** | |
| AllowedIPs = 0.0.0.0/0, ::/0 | |
| Endpoint = endpoint.domain.tld:51820 |
I hereby claim:
To claim this, I am signing this object:
| -module(czmq_const). | |
| -compile(export_all). | |
| -include_lib("czmq/include/czmq.hrl"). | |
| zmq_pair() -> | |
| ?ZMQ_PAIR. | |
| zmq_pub() -> | |
| ?ZMQ_PUB. |
| secret_key = "secret-key" | |
| text = "This is a secret" | |
| hmac = :crypto.hmac(:sha, secret_key, text) | |
| |> Base.encode16 | |
| |> String.downcase | |
| IO.puts "HMAC is #{hmac}" # HMAC is 08dc7014b3e778a44af52ea7a16a973a9b48f0dd |
| import hashlib | |
| import hmac | |
| secret_key = b"secret-key" | |
| text = b"This is a secret" | |
| hmac_sha1 = hmac.HMAC(key=secret_key, msg=text, digestmod=hashlib.sha1).hexdigest() | |
| print("HMAC is {}".format(hmac_sha1)) # HMAC is 08dc7014b3e778a44af52ea7a16a973a9b48f0dd |
| defmodule Advent1 do | |
| def part1("(" <> rest, count) do | |
| part1(rest, count + 1) | |
| end | |
| def part1(")"<> rest, count) do | |
| part1(rest, count - 1) | |
| end | |
| def part1("", count), do: count |
| defmodule Advent2 do | |
| def run(input) do | |
| total_area = input | |
| |> File.read! | |
| |> String.split("\n", trim: true) | |
| |> Enum.map(&calc_area/1) | |
| |> Enum.reduce(0, &(&1 + &2)) | |
| IO.puts "Total area - part 1: #{total_area}" | |
| total_ribbon = input |
I've taken the benchmarks from Matthew Rothenberg's phoenix-showdown, updated Phoenix to 0.13.1 and ran the tests on the most powerful machines available at Rackspace.
| Framework | Throughput (req/s) | Latency (ms) | Consistency (σ ms) |
|---|