This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/slack_jira_comments/web/router.ex | |
| defmodule SlackJiraComments.Router do | |
| use SlackJiraComments.Web, :router | |
| pipeline :api do | |
| plug :accepts, ["json"] | |
| end | |
| scope "/", SlackJiraComments do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defp deps do | |
| [{:phoenix, "~> 1.2.1"}, | |
| {:phoenix_pubsub, "~> 1.0"}, | |
| {:phoenix_ecto, "~> 3.0"}, | |
| {:rethinkdb, "~> 0.4.0"}, | |
| {:rethinkdb_ecto, "~> 0.7"}, | |
| {:gettext, "~> 0.11"}, | |
| {:cowboy, "~> 1.0"}] | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule HelloPhoenixApi.HelloViewTest do | |
| use HelloPhoenixApi.ConnCase, async: true | |
| use ExUnit.Case | |
| test "GET /" do | |
| conn = get build_conn(), "/" | |
| assert conn.state == :sent | |
| assert conn.status == 200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule HelloPhoenixApi.HelloView do | |
| use HelloPhoenixApi.Web, :view | |
| def render("index.json", %{}) do | |
| %{hello: "world"} | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule HelloPhoenixApi.HelloController do | |
| use HelloPhoenixApi.Web, :controller | |
| def index(conn, _params) do | |
| render conn, "index.json" | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule HelloPhoenixApi.Router do | |
| use HelloPhoenixApi.Web, :router | |
| pipeline :api do | |
| plug :accepts, ["json"] | |
| end | |
| scope "/", HelloPhoenixApi do | |
| pipe_through :api # Use the default browser stack |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule HelloPhoenixApi.Router do | |
| use HelloPhoenixApi.Web, :router | |
| pipeline :browser do | |
| plug :accepts, ["html"] | |
| plug :fetch_session | |
| plug :fetch_flash | |
| plug :protect_from_forgery | |
| plug :put_secure_browser_headers | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Machina = require ('machina') | |
| const vSignal = new Machina.Fsm({ | |
| initialize: (options) => { | |
| }, | |
| namespace: 'vehicle-signal', | |
| initialState: "uninitialized", | |
| states:{ | |
| uninitialized:{ | |
| "*": _ => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| input { | |
| http { | |
| codec => json | |
| } | |
| } | |
| output { | |
| stdout { codec => rubydebug} | |
| irc { | |
| channels => ["#layer"] | |
| host => "irc.server" |
NewerOlder