This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
locals_without_parens: [handle_message: 2, handle_message: 3], | |
import_deps: [:ecto, :phoenix, :cqrs_tools], | |
inputs: ["*.{ex,exs}", "priv/*/seeds.exs", "{config,lib,test}/**/*.{ex,exs}"], | |
subdirectories: ["priv/*/migrations"] | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defprotocol Ord do | |
@doc """ | |
iex> Ord.compare("a", "b") | |
:EQ | |
iex> Ord.compare("a", "b", type: :alphabetical) | |
:LT | |
""" | |
def compare(a, b, opts \\ []) | |
def lt(a, b) | |
def lte(a, b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Operating System: macOS | |
CPU Information: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz | |
Number of Available Cores: 8 | |
Available memory: 16 GB | |
Elixir 1.8.1 | |
Erlang 21.2 | |
Benchmark suite executing with the following configuration: | |
warmup: 2 s | |
time: 5 s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Dates do | |
@valid_dates [ | |
Date.utc_today() |> Date.to_iso8601(), | |
NaiveDateTime.utc_now() |> NaiveDateTime.to_iso8601(), | |
DateTime.utc_now() |> DateTime.to_iso8601() | |
] | |
|> Enum.map(&to_string/1) | |
|> Enum.join(" or ") | |
@invalid_date_message "Invalid date. Expected formated date. ie #{@valid_dates}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Retryable do | |
require Logger | |
@enforce_keys [:mfa] | |
defstruct mfa: nil, | |
retries: 1, | |
should_retry: nil, | |
before_execution: nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule KnightsDialer do | |
@nieghbors_map %{ | |
1 => [6, 8], | |
2 => [7, 9], | |
3 => [4, 8], | |
4 => [3, 9, 0], | |
5 => [], | |
6 => [1, 7, 0], | |
7 => [2, 6], | |
8 => [1, 3], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo Install all AppStore Apps at first! | |
# If you are looking into a solution to automate AppStore installs, | |
# check mas https://github.com/argon/mas | |
# I installed XCode, Forklift. | |
read -p "Press any key to continue... " -n1 -s | |
echo '\n' | |
# Install Homebrew |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Pdf from './Pdf'; | |
import PdfRenderer from './PdfRenderer'; | |
export default () => ( | |
<PdfRenderer | |
fileName="settlements.pdf" | |
buttonClasses="btn btn-secondary view-pdf" | |
extra={1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq.Expressions; | |
using GraphQL; | |
using GraphQL.Builders; | |
using GraphQL.Resolvers; | |
using GraphQL.Types; | |
using LanguageExt; | |
using static LanguageExt.Prelude; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name := "eff-study" | |
version := "1.0" | |
scalaVersion := "2.12.1" | |
scalacOptions ++= Seq( | |
"-Ypartial-unification", | |
"-language:postfixOps", | |
"-language:implicitConversions", | |
"-language:higherKinds" | |
) |