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
2015-09-26T15:00:48.868977+00:00 heroku[web.1]: Starting process with command `mix phoenix.server` | |
2015-09-26T15:00:51.827994+00:00 app[web.1]: Shall I install Hex? [Yn] ** (Mix) Could not find an SCM for dependency :phoenix from Phlink.Mixfile | |
2015-09-26T15:00:51.811929+00:00 app[web.1]: Could not find Hex, which is needed to build dependency :phoenix | |
2015-09-26T15:00:52.694003+00:00 heroku[web.1]: State changed from starting to crashed | |
2015-09-26T15:00:52.683127+00:00 heroku[web.1]: Process exited with status 1 |
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
;; from http://www.lunaryorn.com/2015/04/29/the-power-of-display-buffer-alist.html | |
(add-to-list 'display-buffer-alist | |
`(,(rx bos (or | |
"*rspec-compilation*" | |
"*projectile-rails-compilation*" | |
"*Bundler*" | |
"*alchemist test report*" | |
"*alchemist mix*" | |
"*elixir help*" | |
"*alchemist help*" |
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 Sheep.PageController do | |
use Sheep.Web, :controller | |
alias Sheep.Repo | |
alias Sheep.MailingListAddress | |
def index(conn, _params) do | |
render conn, "index.html" | |
end | |
def new_email(conn, params) 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
defmodule Sheep.PageController do | |
use Sheep.Web, :controller | |
alias Sheep.Repo | |
alias Sheep.MailingListAddress | |
def index(conn, _params) do | |
render conn, "index.html" | |
end | |
def new_email(conn, params) 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
defmodule AuthController do | |
# ... | |
def index(conn, _params) do | |
#... | |
twitter_client(conn).do_something | |
#... | |
end | |
# Allow replacing the module used to call twitter. This is used in tests to | |
# stub out the external service |
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 Phlink.Form do | |
use Ecto.Schema | |
import Ecto.Changeset | |
@primary_key false | |
schema "non_db_form.user" do | |
field :name, :string | |
field :thing, :string | |
end | |
@required_fields ~w(name) |
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
/* global require, module */ | |
var EmberApp = require('ember-cli/lib/broccoli/ember-app'); | |
var ES6Modules = require('broccoli-es6modules'); | |
var esTranspiler = require('broccoli-babel-transpiler'); | |
var mergeTrees = require('broccoli-merge-trees'); | |
var app = new EmberApp(); | |
// Use `app.import` to add additional libraries to the generated |
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
diff --git a/Brocfile.js b/Brocfile.js | |
index 7fa2af9..3718742 100644 | |
--- a/Brocfile.js | |
+++ b/Brocfile.js | |
@@ -1,6 +1,9 @@ | |
/* global require, module */ | |
var EmberApp = require('ember-cli/lib/broccoli/ember-app'); | |
+var ES6Modules = require('broccoli-es6modules'); | |
+var esTranspiler = require('broccoli-babel-transpiler'); |
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
class Worker | |
def actually_do_work | |
puts "workin!" | |
end | |
end | |
class Bar | |
def nope_maybe_this_does(worker = Worker) | |
worker.new.actually_do_work | |
worker.new.actually_do_work |
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
require 'csv' | |
class Restaurant | |
attr_accessor :name, :country, :scores | |
def initialize(name) | |
@scores = Array.new(11, 0) | |
@name = name | |
end |