Skip to content

Instantly share code, notes, and snippets.

View bcardarella's full-sized avatar
Out sailing

Brian Cardarella bcardarella

Out sailing
View GitHub Profile
1) test retrieve a weekly status that doesn't exist (HowWeDoin.Api.WeeklyStatusReplyTest)
test/api/weekly_status_reply_test.exs:29
** (FunctionClauseError) no function clause matching in Plug.Conn.resp/3
stacktrace:
(plug) lib/plug/conn.ex:439: Plug.Conn.resp(%Plug.Conn{adapter: {Plug.Adapters.Test.Conn, :...}, assigns: %{layout: false}, before_send: [#Function<0.32851098/1 in JaSerializer.ContentTypeNegotiation.set_content_type/2>, #Function<1.847247/1 in Plug.Logger.call/2>], body_params: %{}, cookies: %Plug.Conn.Unfetched{aspect: :cookies}, halted: false, host: "www.example.com", method: "GET", owner: #PID<0.270.0>, params: %{"reply_id" => "123", "reply_token" => "1234567890"}, path_info: ["api", "sessions", "reply"], peer: {{127, 0, 0, 1}, 111317}, port: 80, private: %{HowWeDoin.Router => {[], %{}}, :phoenix_action => :create, :phoenix_controller => HowWeDoin.SessionController, :phoenix_endpoint => HowWeDoin.Endpoint, :phoenix_format => "json-api", :phoenix_layout => {HowWeDoin.L
@mode User
@repo Repo
:admin1 from(:users).brian do
admin true
end
@repo OtherRepo
:admin2 do
defmodule MyAuthenticator do
def auth(repo, model, id, password) do
user =
model
|> where(id: ^id)
|> preload([:profile])
|> repo.one!()
end
end

Breakast

  • 1 - lg tblsp of peanut butter
  • 1 - mozzarella stick
  • 2 - egg, hard boiled
  • 2 - tsp of psyllium husk powder (fiber supplement)

Lunch (Weekday/Work)

  • 1 - 1/5 of sliced lemon pepper chicken

Lunch (Weekend/@Home)

defmodule MyModule do
defmacro __using__(_) do
quote do
@before_compile MyModule
end
end
defmacro __before_compile__(_) do
quote do
setup do
{:ok, _} = Application.ensure_all_started(:postgrex)
_ = Ecto.Storage.down(BaseRepo)
:ok = Ecto.Storage.up(BaseRepo)
{:ok, _pid} = BaseRepo.start_link
:ok = Ecto.Migrator.up(BaseRepo, 0, EctoFixtures.Migrations, log: false)
** (exit) exited in: GenServer.call(Ecto.Migration.Supervisor, {:start_child, [#PID<0.135.0>, BaseRepo, :forward, :up, false]}, :infinity)
** (EXIT) no process
d1 = {{2015, 12, 1}, {{11, 0, 0}} |> Ecto.DateTime.from_erl
d2 = {{2015, 11, 30}, {{11, 0, 0}} |> Ecto.DateTime.from_erl
assert d1 > d2
require_authentication :account_insurance_type_path, only: [:index]
file changed components/scatter-plot/component.js
ENOENT, no such file or directory '/Users/bcardarella/work/shyft-rwe/tmp/jshinter-output_path-g8aHj69F.tmp/components/scatter-plot/component.js'
Error: ENOENT, no such file or directory '/Users/bcardarella/work/shyft-rwe/tmp/jshinter-output_path-g8aHj69F.tmp/components/scatter-plot/component.js'
at Error (native)
at Object.fs.unlinkSync (fs.js:883:18)
at JSHinter.<anonymous> (/Users/bcardarella/work/shyft-rwe/node_modules/ember-cli-qunit/node_modules/broccoli-jshint/node_modules/broccoli-persistent-filter/index.js:85:12)
at /Users/bcardarella/work/shyft-rwe/node_modules/ember-cli-qunit/node_modules/broccoli-jshint/node_modules/broccoli-persistent-filter/node_modules/promise-map-series/index.js:11:14
at lib$rsvp$$internal$$tryCatch (/Users/bcardarella/work/shyft-rwe/node_modules/ember-cli-qunit/node_modules/broccoli-jshint/node_modules/broccoli-persistent-filter/node_modules/rsvp/dist/rsvp.js:493:16)
at lib$rsvp$$internal$$invokeCallback
module.exports = {
scenarios: [
{
name: 'default',
dependencies: { },
devDependencies: { }
},
{
name: 'ember-release',
dependencies: {