Skip to content

Instantly share code, notes, and snippets.

defmodule MyApi.Schema.Pipeline.MyCompilePhase do
@moduledoc """
based on Absinthe phases https://hexdocs.pm/absinthe/1.5.3/Absinthe.Phase.html
"""
alias Absinthe.{Blueprint, Pipeline, Phase}
alias Absinthe.Blueprint.Schema.{ObjectTypeDefinition, FieldDefinition}
def pipeline(pipeline) do
Pipeline.insert_after(pipeline, Phase.Schema.TypeImports, __MODULE__)
@paseaf
paseaf / code_smells_and_solutions.md
Last active May 15, 2024 15:36
Code Smells and Solutions

Definition (Code Smells) Code smells are common code anti-patterns which could and should be refactored.

This doc is summarized from Martin Flower's book Refactoring (the 2nd Edition).

Refactoring is all about Change

  • You may inverse previous refactorings as software grows
  • You may change names of a function/parameter/varible/... as you learn

How to use this doc

Go to a section of code smell, and the refactoring techniques to that smell are written in Pascal Case under the Solution section. Refer to the book's catalog to get detailed examples and explainations for each refactoring technique.

Table of Code Smells

@Trevoke
Trevoke / permissions_hell.md
Last active June 22, 2016 10:37
Ye Olde Learn Un*x The Hard Way Shortcut

GOAL

Be able to push to Heroku as any of three Heroku users from a single computer and a single user.

For this, you will not be allowed to copy and paste anything - except SSH keys themselves, because we're not THAT evil.

If you get error messages, read them carefully, and make note of what you understand, what you don't understand, and what you think you understand.