Skip to content

Instantly share code, notes, and snippets.

View smpallen99's full-sized avatar

Steve Pallen smpallen99

View GitHub Profile
@smpallen99
smpallen99 / settings
Created March 8, 2020 20:23
VS Code Settings
.
@smpallen99
smpallen99 / upgrade.md
Last active September 9, 2018 21:57
Coherence 0.5.x to 0.6.0 Upgrade Instructions

Coherence 0.5.x to 0.6.0 Upgrade Instructions

Upgrade your generated Controllers

Coherence 0.6.0 introduces a new controller design that splits each controller into 2 files:

  • Coherence.xxxControllerBase contains all the functions previously found in Coherence.xxxController
    • The new functions are wrapped in a using macro, with one mandatory option. The schemas option specifies the name of your projects Schemas module.
    • All functions are overridable
    • All private functions have been made public to support overriding
  • Coherence.xxxController contains only a few lines, as shown by the following example:
@smpallen99
smpallen99 / test.md
Last active February 14, 2018 00:46

Heading

Here is some text just after the heading. It will be follow by one more paragraph that will then be followed by a list. This is to test the formatting which I will compare to github. This will tell me how it looks.

Here is the header line:

  • First List is here
  • Another bullet
  • one more for good measure
@smpallen99
smpallen99 / upgrade.md
Created June 1, 2017 14:42
Upgrade instructions for Talon v0.1.0

The following is required to manually upgrade a project to the stucture required for v0.1.0

@smpallen99
smpallen99 / upgrade.md
Created June 1, 2017 14:42
Upgrade instructions for Talon v0.1.0

The following is required to manually upgrade a project to the stucture required for v0.1.0

@smpallen99
smpallen99 / schema.ex
Created May 15, 2017 05:26
Example ExAdminRedux Ecto Schema Adapter
defmodule ExAdmin.Schema.Adapters.Ecto do
@moduledoc """
Implements the ExAdmin.Scheam.Adapters behaviour.
Add support for Ecto in ExAdin.
"""
@behaviour ExAdmin.Schema.Adapters
@doc """
Retrieve the primay key of a query, schema module, or a schema struct.
@smpallen99
smpallen99 / resource.ex
Last active May 15, 2017 15:39
Example of ExAdminRedux resource file
# ex_admin/lib/ex_admin/resource.ex
# Here is the prototype of the resoruce.ex library in ex_admin.
defmodule ExAdmin.Resource do
defmacro __using__(opts) do
schema = opts[:schema]
unless schema do
raise ":schema is required"
end
@smpallen99
smpallen99 / index.html.eex
Created May 15, 2017 05:01
Example of ExAdminRedux theme templates
/ web/templates/admin/material_bootstrap/generators/index.html.eex
/ Example of a the default theme resource index page. This is an template for the generator that
/ creates the the end view template. Creating a theme will be as simple as generating a new version
/ of these files and editing them to match your theme.
/ A second level of templates like this will be available per resource so you can customize the pages
/ for each resource.
.container-fluid
@smpallen99
smpallen99 / config.exs
Created May 15, 2017 04:23
ExAdminRedux Config Example
# Very similar to current ExAdmin config file
# This examples belows to a demo app called `NewAdmin`
use Mix.Config
# List of Resource Modules, on for each ExAdmin managed resource
config :ex_admin, resources: [
NewAdmin.ExAdmin.Country,
NewAdmin.ExAdmin.State,
NewAdmin.ExAdmin.User,
@smpallen99
smpallen99 / upgrade.md
Created April 25, 2017 20:38
Coherence 0.3.1 to 0.4.0 Upgrade Instructions

Coherence 0.3.1 to 0.4.0 Upgrade Instructions

Update your configuration

Two new manditory configuration keys are required

add:

config :coherence,