This gist is about using a Multi-Tenancy strategy for your Doctrine entities.
See: https://gist.github.com/CarlosEduardo/aedfa640e3f7f22451686fb7e57228e3
This gist is about using a Multi-Tenancy strategy for your Doctrine entities.
See: https://gist.github.com/CarlosEduardo/aedfa640e3f7f22451686fb7e57228e3
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty | |
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua | |
http { | |
lua_package_path "/etc/nginx/include.d/?.lua;;"; | |
lua_socket_pool_size 100; | |
lua_socket_connect_timeout 10ms; | |
lua_socket_read_timeout 10ms; | |
server { |
I hereby claim:
To claim this, I am signing this object:
Notes: All the examples below are only tested on Vue.js 1.0 (above).
Notes: The examples below use ES6 so it's recommended to use browserify or webpack to easily integrate babel.
When you need to access DOM attribute, be careful with the lifecycle. Vue.js has a few useful lifecycle hooks.
Let's say we want to scroll our component to the bottom (imagine it's a long list with overflow-y: auto
) once it's instantiate.
def create(changeset, repo) do | |
password = Ecto.Changeset.get_field(changeset, :password) | |
team_name = Ecto.Changeset.get_field(changeset, :name) | |
changeset = changeset | |
|> Ecto.Changeset.put_change(:password_digest, crypt_password(password)) | |
repo.transaction(fn -> | |
case repo.insert(changeset) do | |
{:ok, user} -> | |
team = %Team{name: team_name, owner_id: user.id} |
def grade(marks) do | |
cond do | |
marks in 91..100 -> "A+" | |
marks in 81..90 -> "A" | |
end | |
end |
import DS from 'ember-data'; | |
export default DS.ActiveModelAdapter.extend({ | |
host: 'http://api.example.com', | |
suffix: '.json', | |
buildURL: function(type, id, record) { | |
return this._super(type, id, record) + this.get('suffix'); | |
} | |
}); |