We'll be comparing the following:
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 ManyToManyHelper do | |
defmacro __using__(_opts) do | |
quote do | |
import Ecto.Query, only: [from: 2] | |
import unquote(__MODULE__) | |
end | |
end | |
defmacro many_to_many_params(opts) do | |
association = Keyword.fetch!(opts, :association) |
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
module Mongoid | |
# Helps to override find method in an embedded document. | |
# Usage : | |
# - add to your model "include Mongoid::EmbeddedFindable" | |
# - override find method with: | |
# def self.find(id) | |
# find_through(Book, 'chapter', id) | |
# end | |
module EmbeddedFindable |
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
# for x264 | |
./configure --enable-static \ | |
--disable-opencl \ | |
--disable-avs \ | |
--disable-cli \ | |
--disable-ffms \ | |
--disable-gpac \ | |
--disable-lavf \ | |
--disable-swscale \ | |
--prefix=/usr/local/ |