This file contains hidden or 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
# Install this recipe with: | |
# brew install --HEAD --env=std https://raw.github.com/gist/3804582/da937661db644879c41a8cb2b4b24a7d1e9f3b67/elixir.rb | |
require 'formula' | |
class ErlangInstalled < Requirement | |
def message; <<-EOS.undent | |
Erlang is required to install. | |
You can install this with: |
This file contains hidden or 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
--- ~PROJECTS/elixir ‹master› » make | |
==> elixir (compile) | |
Uncaught error in rebar_core: {'EXIT', | |
{badarg, | |
[{re,split, | |
[[65,82,67,72,70,76,65,71,83,61,45,97,114, | |
99,104,32,105,51,56,54,32,8211,97,114,99, | |
104,32,120,56,54,95,54,52], | |
"=", | |
[{return,list},{parts,2}]], |
This file contains hidden or 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
Uncaught error in rebar_core: {'EXIT', | |
{badarg, | |
[{re,split, | |
[[65,82,67,72,70,76,65,71,83,61,45,97,114, | |
99,104,32,105,51,56,54,32,8211,97,114,99, | |
104,32,120,56,54,95,54,52], | |
"=", | |
[{return,list},{parts,2}]], | |
[{file,"re.erl"},{line,100}]}, | |
{rebar_port_compiler,'-os_env/0-lc$^0/1-0-', |
This file contains hidden or 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
deb http://binaries.erlang-solutions.com/debian precise contrib | |
wget -O - http://binaries.erlang-solutions.com/debian/erlang_solutions.asc | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install esl-erlang |
This file contains hidden or 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
init:script_id(). | |
erlang:system_info(otp_release). |
This file contains hidden or 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
original = Model.first | |
new = Model.new original.attributes.reject {|key| key == '_id'} | |
new.save! |
This file contains hidden or 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
:%s/^dependency /pod /g |
This file contains hidden or 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
~/Library/Caches/CocoaPods/Git/ |
This file contains hidden or 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
[Y] = [X || {<<"type">>, X} <- Terms] | |
Y = proplists:get_value(<<"type">>, Terms) | |
Y = lists:keysearch(<<"type">>, 1, Terms) | |
%% From #erlounge | |
%% jlouis: l4u: lists:keysearch is usually very fast because it is implemented as a BIF, but proplists is more general and the thing Licenser suggested is reasonably fast as well |
This file contains hidden or 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
launchctl stop homebrew.mxcl.nginx | |
launchctl start homebrew.mxcl.nginx | |
kill -HUP `cat /usr/local/var/run/nginx.pid` |