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
iex(2)> Test.test1 | |
{1474377, :ok} | |
iex(3)> Test.test2 | |
{755840, :ok} |
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
require "formula" | |
# https://github.com/Homebrew/homebrew/blob/master/Library/Formula/elixir.rb | |
class ErlangInstalled < Requirement | |
fatal true | |
default_formula 'erlang' | |
env :userpaths | |
satisfy { | |
erl = which('erl') and begin |
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
apt-get -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu1-mesa-dev fop xsltproc default-jdk | |
apt-get -y install make | |
apt-get -y install libncurses5-dev | |
mkdir -p /src/erlang | |
cd /src/erlang | |
wget http://www.erlang.org/download/otp_src_17.0.tar.gz | |
tar -xvzf otp_src_17.0.tar.gz | |
chmod -R 777 otp_src_17.0 | |
cd otp_src_17.0 | |
./configure |
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(myjoin). | |
-export([join/1, join/2, start/0]). | |
start() -> | |
join( [{foo,"bar"},{baz,"bang"}] ). | |
join([H|T]) -> | |
{K,V} = H, | |
Acc = atom_to_list(K) ++ "=" ++ V, |
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
Lista de documentários e filmes que considero como "obrigatórios", ou seja, todos deveriam assistir. | |
O critério usado para colocar um item na lista é: O documentário/filme mudou sua visão do mundo. | |
Documentários: | |
The Corporation - http://www.imdb.com/title/tt0379225/ | |
The Story of Stuff - http://www.storyofstuff.com/ | |
The Genius of Charles Darwin - http://en.wikipedia.org/wiki/The_Genius_of_Charles_Darwin | |
BBC - Horizon: How Many People Can Live on Planet Earth? - http://www.bbc.co.uk/programmes/b00pdjmk |
There are two JSON API styles:
- The ID Style
- The URL Style
The ID style is the easiest to get started with, but requires that your clients be able to guess the URLs for related documents. It also locks your API into a particular URL structure, which may become a problem as your API grows.
The URL style requires less guessing on the client side, and makes clients more resilient to API changes, but is trickier to use with relationships and compound documents.
-
Brennar:
- v.t.d. o ato de derrubar, derramar, algo ou alguma coisa sem a intenção do praticante da ação. Isso serve pra qualquer coisa água, almoço (ex. Brennou yourself <- sempre ocorre), café (mais costumeiramente).
-
Joiçar:
- v.t.i. O ato de ficar até tarde no escritório; ou
- v.t.i. Ficar mechendo no celular o tempo todo, principalmente em eventos sociais; ou
- v.t.i. Não tomar café e/ou almoçar; ou
- v.t.d. Brigar com Mateus porque ele sempre Mateusa (vide Mateusar) com o que eu falo ¬¬
-
Halanzar:
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 FlashMessagesHelper | |
def flash_messages | |
safe_buffer do |html| | |
filtered_flash_messages.each do |name, message| | |
html << content_tag(:div, content_tag(:p, message), :class => "message #{name}") | |
end | |
end | |
end | |
private |
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(auth_handler). | |
-compile({parse_transform, seqbind}). | |
-export([init/3, handle/2, terminate/2]). | |
-define(USERNAME, <<"admin">>). | |
-define(PASSWORD, <<"password">>). | |
%% public | |
init(_Transport, Req, []) -> |
OlderNewer