Blogs
Books
- Metaprogramming Elixir by Chris McCord
Official Documentation
| 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') |
| ExUnit.start( | |
| exclude: [:skip], include: [ | |
| # Uncomment the line below to only run tests with "@tag :focus" | |
| :focus], exclude: [:test | |
| ] | |
| ) |
Blogs
Books
Official Documentation
| # 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. |
| 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 |
| # 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) } |
| startup_message off | |
| vbell off | |
| defscrollback 512 | |
| shell -$SHELL | |
| shelltitle sh | |
| autodetach on | |
| # enable SHIFT-PGUP / SHIFT-PGDOWN scroll | |
| termcapinfo rxvt ti@:te@ |