Nix notes
- package: a software package
- derivation: a specific version of a software package
- identified by a hash
awk '{ print "*" NF "\r"; for(i = 1; i <= NF; i++) { print "$" length($i) "\r\n" $i "\r" } }' |
sudo yum install gcc gcc-c++ make libxslt fop ncurses-devel openssl-devel *openjdk-devel unixODBC unixODBC-devel | |
KERL_CONFIGURE_OPTIONS="--with-ssl=/home/ec2-user/openssl/releases/1.0.2h --disable-dynamic-ssl-lib" kerl build 18.3 18.3 | |
# without ECC | |
KERL_CONFIGURE_OPTIONS="CFLAGS=-DOPENSSL_NO_EC=1" kerl build 18.3 18.3 |
cli-test
(but you can change the name used below)For OS X, use the Homebrew command below. For others, see installation instructions at the links above.
# 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 |
2.0.0-p481 :001 > OpenSSL::SSL::SSLContext::DEFAULT_PARAMS
=> {:ssl_version=>"SSLv23", :verify_mode=>1, :ciphers=>"ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW", :options=>-2147482625}
2.0.0-p481 :002 > rating = JSON.parse(RestClient::Resource.new("https://www.howsmyssl.com/a/check" ).get)['rating']
=> "Bad"
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 |
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 |
iex(2)> Test.test1 | |
{1474377, :ok} | |
iex(3)> Test.test2 | |
{755840, :ok} |
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 |