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
@bcardarella
bcardarella / components.class-tree.js
Last active September 20, 2016 10:25
ember-object-inheritance-graph
import Ember from 'ember';
export default Ember.Component.extend({
showPrivate: false,
filterValues: '',
showEmberData: false,
run: function() {
var g = new dagreD3.Digraph(), rootNode = {name: 'Object', namespace: 'Ember', children: []},
layout = dagreD3.layout().nodeSep(5).rankSep(60),
renderer = new dagreD3.Renderer();
opts = [with: %{name: "George"}]
acc = %{
foo: %{
columns: %{
name: "Will"
}
}
}
with {:ok, override} <- Keyword.fetch(opts, :with),
location /design-sprints/ {
root /var/www/design-sprints;
index index.html;
}
defmodule DockYard.Test.Acceptance.Api.V1.CaseStudyTest do
use DockYard.ConnCase, async: false
use EctoFixtures.Case, with: DockYard.Test.Fixtures
import JsonApiAssert
@fixtures [:case_study_1, :case_study_2, serialize: true]
test "GET /api/v1/case-studies", %{conn: conn, data: data} do
conn
|> get("/api/v1/case-studies")
|> json_response(200)
@bcardarella
bcardarella / fastboot-deplo.md
Created July 3, 2016 22:54
How to deploy an ember fastboot app

App Setup

  1. ssh into server
  2. git clone the repo
  3. Configure {nginx,apache,etc} to forward requests to the fastboot server
  4. Configure {nginx,apache,etc} to fallback to static assets if fastboot is not available

App updates

  1. ssh into server
17056 pts/4 Ssl+ 0:03 /home/production/dockyard/erts-7.2/bin/beam.smp -- -root /home/production/dockyard -progname home/production/dockyard/releases/0.2.5/dockyard.sh -- -home /home/production -- -boot /home/production/dockyard/releases/0.2.5/dockyard -mode embedded -config /home/production/dockyard/running-config/sys.config -boot_var ERTS_LIB_DIR /home/production/dockyard/erts-7.2/../lib -pa /home/production/dockyard/lib/dockyard-0.2.2/consolidated /home/production/dockyard/lib/dockyard-0.2.5/consolidated -sname dockyard -setcookie IUKRVGTANEVYTXJOYWYY -user Elixir.IEx.CLI -extra --no-halt +iex -- console
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
cache:
directories:
- node_modules
defmodule DockYard.Mixfile do
use Mix.Project
def project do
[app: :dockyard,
version: "0.2.5",
elixir: "~> 1.2",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
elixirc_paths: elixirc_paths(Mix.env),
* ecto (Hex package)
the dependency ecto
> In deps/scrivener/mix.exs:
{:ecto, "~> 1.0", [optional: false, hex: :ecto, manager: :mix]}
does not match the requirement specified
> In deps/phoenix_ecto/mix.exs:
{:ecto, "~> 1.1.2", [optional: false, hex: :ecto]}
Ensure they match or specify one of the above in your deps and set "override: true"
** (Mix) Can't continue due to errors on dependencies

Keybase proof

I hereby claim:

  • I am bcardarella on github.
  • I am bcardarella (https://keybase.io/bcardarella) on keybase.
  • I have a public key whose fingerprint is C279 1DBA 10CE A943 BFFD C1CF 9C46 DEE2 63B8 1F8F

To claim this, I am signing this object: