This file contains 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
state = %Web.Users.User_.GET.State{ | |
bypass: false, | |
auth: nil, | |
user: nil, | |
} | |
assert state == Web.Users.User_.GET.state() |
This file contains 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
# based on Joe Armstrong's blog post, 'My favorite erlang program' | |
# http://joearms.github.io/2013/11/21/My-favorite-erlang-program.html | |
defmodule Server do | |
def universal_server() do | |
receive do | |
{:become, f} -> | |
apply(f, []) | |
end | |
end |
This file contains 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
._2p7a.like { | |
background-image: url(http://i.imgur.com/8cRu6hb.png) !important; | |
} | |
._sa_ ._48-k::before { | |
background-image: url(http://i.imgur.com/WWIVI1S.png) !important; | |
} | |
.x2 ._iuz { | |
background-image: url(http://i.imgur.com/nIEol8j.png) !important; |
This file contains 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 HTTPHelper do | |
defmacro generate(name) do | |
names = name <> "s" | |
camel = Mix.Utils.camelize(name) | |
camels = Mix.Utils.camelize(names) | |
mod = Module.concat([camel]) | |
mods = Module.concat([camels]) | |
quote do | |
get "/#{unquote(names)}", {Api.Resource.Cases, unquote(mods)}, |
This file contains 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
λ : make | |
Erlang/OTP 18 [erts-7.2.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] | |
== Compilation error on file lib/api/http.ex == | |
** (CompileError) lib/api/http.ex:38: undefined function generate/2 | |
(stdlib) erl_eval.erl:669: :erl_eval.do_apply/6 | |
make: *** [start] Error 1 |
This file contains 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 Api.Resource.Cases do | |
defmacro __using__([type: type]) do | |
[read, create] = Utils.resources(type, [Read, Create]) | |
service = Utils.service(type) | |
quote do | |
use PoeApi.Resource | |
let cases = unquote(service).get_all(Input.get) |
This file contains 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
/Users/mndvns/Projects/mndvns/math24/src/index.jade:1 | |
(function (exports, require, module, __filename, __dirname) { import './index.ess' | |
^^^^^^ | |
SyntaxError: Unexpected token import | |
at exports.runInThisContext (vm.js:53:16) | |
at Module._compile (module.js:373:25) | |
at Object.Module._extensions..js (module.js:404:10) | |
at Module.load (module.js:343:32) | |
at Function.Module._load (module.js:300:12) |
This file contains 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
Server listening on port 3000 | |
====ERRORS==== | |
/tmp/build_1cea3b317a4b7f0b64427b8ce7843ad3/mndvns-math24-fd950ca/node_modules/poe-ui-serve/src: | |
ModuleParseError: Module parse failed: /tmp/build_1cea3b317a4b7f0b64427b8ce7843ad3/mndvns-math24-fd950ca/node_modules/poe-ui-serve/src/index.js Line 7: Unexpected token | |
You may need an appropriate loader to handle this file type. | |
| */ | |
| | |
| import Poe from 'poe-ui'; | |
| var routes = require('./routes.jade?force-load').render; | |
| var Forms = require('form-store'); |
This file contains 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
:doc | |
This is a test component | |
@name Test | |
@prop {String} color | |
:js | |
var color = props.color || 'none'; | |
h1= `color: ${color}` |
This file contains 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 Api.Resource.Cases.Read do | |
defmacro __using__([type: typename]) do | |
quote do | |
import unquote(__MODULE__) | |
use PoeApi.Resource | |
param item | |
let item_res = Case.get(unquote(typename), item) |
NewerOlder