Blogs
Books
- Metaprogramming Elixir by Chris McCord
Official Documentation
startup_message off | |
vbell off | |
defscrollback 512 | |
shell -$SHELL | |
shelltitle sh | |
autodetach on | |
# enable SHIFT-PGUP / SHIFT-PGDOWN scroll | |
termcapinfo rxvt ti@:te@ |
# RSpec matcher to spec delegations. | |
# Forked from https://gist.github.com/ssimeonov/5942729 with fixes | |
# for arity + custom prefix. | |
# | |
# Usage: | |
# | |
# describe Post do | |
# it { should delegate(:name).to(:author).with_prefix } # post.author_name | |
# it { should delegate(:name).to(:author).with_prefix(:any) } # post.any_name | |
# it { should delegate(:month).to(:created_at) } |
defmodule DSL do | |
defmacro extend_struct struct_mod, keyword do | |
quote do | |
defstruct Keyword.merge(Map.to_list(Map.from_struct(unquote(struct_mod).__struct__)), unquote(keyword)) | |
end | |
end | |
end |
# See https://github.com/elixir-lang/elixir/blob/master/lib/elixir/src/elixir_parser.yrl#L52 | |
# for the list of operators with associativity, etc. | |
# The operators in this list are grouped by precedence, low to high. | |
# The comments indicate the operator's normal function, as well as its ability to be defined/overridden. | |
-> # CompileError 'unhandled operator'. only allowed in anonymous function syntax. | |
& # CompileError, only allowed in short anonymous function syntax. |
Blogs
Books
Official Documentation
ExUnit.start( | |
exclude: [:skip], include: [ | |
# Uncomment the line below to only run tests with "@tag :focus" | |
:focus], exclude: [:test | |
] | |
) |
import http = require('http') | |
import https = require('https') | |
import url = require('url') | |
import {AxiosInstance, AxiosInterceptorManager} from 'axios' | |
import {HttpRequestOptions as HttpFollowRequestOptions, http as httpFollow, https as httpsFollow} from 'follow-redirects' | |
import now = require('performance-now') | |
import httpAdapter = require('axios/lib/adapters/http') | |
import InterceptorManager = require('axios/lib/core/InterceptorManager') |