I hereby claim:
- I am kronicdeth on github.
- I am kronicdeth (https://keybase.io/kronicdeth) on keybase.
- I have a public key whose fingerprint is 9C10 5D2E 8AD8 8D65 6A39 E682 5B1F B01F B333 56F8
To claim this, I am signing this object:
defmodule MyApp.ApiController do | |
alias Alembic.Document | |
alias Alembic.Source | |
alias Plug.Conn | |
@doc """ | |
Convert the `params` to a JSON API Document with `action` set as the `meta` `"action"`. If there a parsing | |
error, the error document is rendered as json to `conn` and the modified `conn` is returned. If there is no parsing | |
error then `{:ok, document}` is returned. | |
""" |
@doc """ | |
Destroys the Directed Acyclic Graph (DAG) of each module in `modules` in order as long as the previous module's | |
`destroy_dag(destroyed_set, context)` returned `{:ok, new_destroyed_set}`; otherwise, returns the first error. | |
""" | |
@spec destroy_dags(destroyed_set, context, modules :: [module, ...]) :: {:ok, destroyed_set} | __MODULE__.Generic.error | |
def destroy_dags(destroyed_set, context, modules) do | |
Enum.reduce_while modules, {:ok, destroyed_set}, fn {:ok, acc_destroyed_set}, referencing_module -> | |
case referencing_module.destroy_dag(destroyed_set, context) do | |
acc = {:ok, _} -> | |
{:cont, acc} |
=ERROR REPORT==== 8-Jan-2016::13:51:59 === | |
Error in process <0.628.0> with exit value: | |
{function_clause,[{cerl,map_arg,1,[]}, | |
{file,list_dir,1,[]}, | |
{dialyzer_dataflow,format_args_1,3,[]}, | |
{dialyzer_dataflow,format_args,3,[]}, | |
{dialyzer_dataflow,handle_apply_or_call,9,[]}, | |
{dialyzer_dataflow,do_clause,6,[]}, | |
{dialyzer_dataflow,handle_clauses,9,[]}, | |
{dialyzer_dataflow,handle_case,3,[]}]} |
I hereby claim:
To claim this, I am signing this object:
...... | |
1) test HTTPS GET / (RoutingSecurelyWithPhoenixFramework.PageControllerTest) | |
test/controllers/page_controller_test.exs:13 | |
** (RuntimeError) expected response with status 200, got: 301 | |
stacktrace: | |
(phoenix) lib/phoenix/test/conn_test.ex:316: Phoenix.ConnTest.response/2 | |
(phoenix) lib/phoenix/test/conn_test.ex:330: Phoenix.ConnTest.html_response/2 | |
test/controllers/page_controller_test.exs:15 |
If you ever have more than one commit's worth of changes in your git work tree, and you're trying to separate the commits:
git reset HEAD
to unstage everythinggit add --patch
git stash -k -u
rake spec
to ensure that staged pieces pass specs on their owngit commit
git stash pop
to restore the stash from (2)t = %{old1: :new1, old2: :new2, old4: nil, old5: false}; | |
IO.inspect Enum.reduce( | |
%{old1: 1, old2: 2, old3: 3, old4: 4, old5: 5}, | |
%{}, | |
fn ({old_key, value}, new_map) -> | |
case Map.fetch(t, old_key) do | |
:error -> | |
new_map | |
{:ok, new_key} -> | |
Map.put(new_map, new_key, value) |
package org.elixir_lang.psi.impl; | |
import com.ericsson.otp.erlang.*; | |
import org.elixir_lang.Macro; | |
public class ElixirPsiImplUtil { | |
private static final OtpErlangAtom UNQUOTE_SPLICING = new OtpErlangAtom("unquote_splicing"); | |
/** | |
* Unwraps <code>quote_splicing</code> in stabOperation. |
> make clean | |
cd lib/elixir && ../../rebar clean | |
==> elixir (clean) | |
rm -rf ebin | |
rm -rf lib/*/ebin | |
rm -rf lib/elixir/test/ebin | |
rm -rf lib/*/tmp | |
rm -rf lib/mix/test/fixtures/git_repo | |
rm -rf lib/mix/test/fixtures/deps_on_git_repo | |
rm -rf lib/mix/test/fixtures/git_rebar |
public class ElixirPsiImplUtil { | |
// @return -1 if codePoint cannot be parsed. | |
public static int codePoint(@NotNull ElixirEscapedCharacter escapedCharacter) { | |
ASTNode[] escapedCharacterTokens = escapedCharacter | |
.getNode() | |
.getChildren(TokenSet.create(ElixirTypes.ESCAPED_CHARACTER_TOKEN)); | |
int parsedCodePoint = -1; | |
if (escapedCharacterTokens.length == 1) { | |
ASTNode escapedCharacterToken = escapedCharacterTokens[0]; |