SSH into Root
$ ssh [email protected]
Change Root Password
# Preloading usually required an extra query. | |
# To do it in one query, a `join` is needed, and the call to `preload` needs to know the name of join | |
# This macro does both the `join` and `preload` together | |
defmodule Preloader do | |
import Ecto, only: [assoc: 2] | |
alias Ecto.Query.Builder.{Join, Preload} | |
defmacro preload_join(query, association) do | |
expr = quote do: assoc(l, unquote(association)) | |
binding = quote do: [l] |
defmodule GCM.Pusher do | |
use GenStage | |
# The maximum number of requests Firebase allows at once per XMPP connection | |
@max_demand 100 | |
defstruct [ | |
:producer, | |
:producer_from, | |
:fcm_conn_pid, | |
:pending_requests, |
defmodule GCM.PushCollector do | |
use GenStage | |
# Client | |
def push(pid, push_requests) do | |
GenServer.cast(pid, {:push, push_requests}) | |
end | |
# Server |
# You will need fswatch installed (available in homebrew and friends) | |
# The command below will run tests and wait until fswatch writes something. | |
# The --stale flag will only run stale entries, it requires Elixir v1.3. | |
fswatch lib/ test/ | mix test --stale --listen-on-stdin |
class Talk | |
def call(env) | |
"Can I talk to #{env[:name]}!" | |
end | |
end | |
class Shout | |
def initialize(app) | |
@app = app | |
end |
SSH into Root
$ ssh [email protected]
Change Root Password
{ | |
"name": "project", | |
"version": "0.0.0", | |
"authors": [ | |
"Eric Barnes <[email protected]>" | |
], | |
"license": "MIT", | |
"private": true, | |
"ignore": [ | |
"**/.*", |
Hoje algo cômico e surreal aconteceu na comunidade FrontEnd Brasil. Algo chocante a ponto de desanimar o mais engajado dos participantes.
Após postar um Gist sobre moment com um código bastante didático, Berger foi rechaçado pelo moderador da comunidade, Jean Carlo Nascimento. Ao notar que o gist era escrito em CoffeeScript, o moderador comentou uma piadinha:
Prefiro usar moment a coffee.
A comunidade não gostou e reagiu, criticando o comentário infeliz e prezando o autor por compartilhar um código útil. Não satisfeito, as agressões sobre o uso de CoffeeScript continuaram.
.section-title { | |
font-size: rem(28px); | |
color: $blue; | |
@include inverse-bottom-line(80%); | |
} | |
.collaborate-item:last-child { | |
@include left-line(90%); | |
padding-left: 10%; | |
} .address-map { |
class String | |
ACCENTED_VOWELS = "áàãâäéèêëíìîïóòõôöúùûüçÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÔÖÚÙÛÜÇ" | |
UNACCENTED_VOWELS = "aaaaaeeeeiiiiooooouuuucAAAAAEEEEIIIIOOOOOUUUUC" | |
def unaccentize | |
self.tr ACCENTED_VOWELS, UNACCENTED_VOWELS | |
end | |
end |