Worked 2015-09-08 for Phoenix 1.0.1 on Dokku 0.3.25.
These instructions assume you've set up Dokku. If not, go find a tutorial for that part. My notes for setting it up on Digital Ocean.
Create a Dokku app:
defmodule MergeCommonPlaces do | |
def merge_places([]), do: [] | |
def merge_places([place | rest]) do | |
{similar_places, rest_places} = | |
Enum.reduce(rest, {[], []}, fn plc, {same_places, rest} -> | |
if same_place?(place, plc) do | |
{[plc | same_places], rest} | |
else | |
{same_places, [plc | rest]} | |
end |
defmodule BG.Aggregator.Supervisor do | |
use Supervisor | |
@name BG.Aggregator.Supervisor | |
def start_link() do | |
Supervisor.start_link(__MODULE__, :ok, name: @name) | |
end | |
def init(:ok) do | |
num_aggregator_consumers = Application.get_env(:twd, :num_aggregator_consumers, 5) |
defmodule Cluster.RabbitStrategy do | |
use GenServer | |
use Cluster.Strategy | |
import Cluster.Logger | |
alias Cluster.Strategy.State | |
@routing_key "cluster.heartbeat" | |
def start_link(opts) do |
defmodule RepoStream do | |
defmodule Producer do | |
use GenStage | |
defstruct [:demand, :pid] | |
def start_link() do | |
GenStage.start_link(__MODULE__, self()) | |
end |
Tinkko - http://tinkko.com | |
Selina :unicorn_face: - https://www.selina.com/cowork-medellin/ | |
Nodo-coworking - https://nodo.space/coworking-nodo/ | |
Co-Work Latam - http://www.rutanmedellin.org/es/ciudad/item/en-noviembre-se-abrira-el-espacio-de-co-working-mas-grande-de-la-ciudad | |
Ruta N - https://www.coworklatam.com/sedes/colombia-medellin-ruta-n/ | |
Epicentro - http://www.epicentro.com.co/espacio.html |
require 'benchmark' | |
class Array | |
def my_map | |
self.inject([]) do |arr, elm| | |
arr << (yield elm) | |
end | |
end | |
def filter_map fn |
Worked 2015-09-08 for Phoenix 1.0.1 on Dokku 0.3.25.
These instructions assume you've set up Dokku. If not, go find a tutorial for that part. My notes for setting it up on Digital Ocean.
Create a Dokku app:
# RollbackAttributes should also rollback relationships | |
# Based on http://stackoverflow.com/a/27184207/223225 and https://github.com/emberjs/rfcs/pull/21#issuecomment-135134132 | |
DS.Model.reopen | |
rollbackAttributes: -> | |
@_super() | |
@rollbackRelationships() | |
cacheOriginalRelations: -> |
-module(gproc_tests). | |
-compile(export_all). | |
-include_lib("stdlib/include/qlc.hrl"). | |
go() -> make:all([load]). | |
register_stuff() -> | |
gproc:reg({n, l, key1}, value1), | |
gproc:reg({n, l, key2}, value2), | |
gproc:reg({n, l, key3}, value3), |
A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."