gem install rails
rails new my_app -T
source :rubygems | |
gem 'raad' | |
gem 'puma' | |
gem 'sinatra' |
VERSION=0.20.6 | |
sudo apt-get update | |
sudo apt-get install openjdk-6-jdk | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$VERSION.deb | |
sudo dpkg -i elasticsearch-$VERSION.deb | |
# be sure you add "action.disable_delete_all_indices" : true to the config!! |
#!/usr/bin/env jruby | |
require 'rubygems' | |
require 'spoon' | |
APPNAME = 'fileserver' | |
WORK_PATH = Dir.pwd | |
EXEC = "#{ENV['HOME']}/.rbenv/shims/puma" | |
PID_PATH = "#{WORK_PATH}/log/#{APPNAME}.pid" | |
OUT_PATH = "#{WORK_PATH}/log/#{APPNAME}.out.log" |
sudo su postgres | |
psql | |
update pg_database set datistemplate=false where datname='template1'; | |
drop database Template1; | |
create database template1 with owner=postgres encoding='UTF-8' | |
lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0; | |
update pg_database set datistemplate=true where datname='template1'; |
This all applies to Ruby 2.1. In some cases a setting is not available in 2.0, this is noted. There is also a different with 1.9, 1.8, and REE --- these are not noted.
All the relevant code is in https://github.com/ruby/ruby/blob/master/gc.c
default: 10000
The number of heap slots to start out with. This should be set high enough so that your app has enough or almost enough memory after loading so that it doesn't have to allocate more memory on the first request (althogh this probably isn't such a big deal for most apps).
(todo: figure out how big a slot is. i think the answer can be infered from this code.)
docker run -d --name es elasticsearch
docker run -d --name logstash --link es:elasticsearch logstash -v /tmp/logstash.conf:/config-dir/logstash.conf logstash logstash -f /config-dir/logstash.conf
docker run --link es:elasticsearch -d kibana
LOGSTASH_ADDRESS=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' logstash)
FROM fedora:22 | |
ENV LANG="en_US.UTF-8" LANGUAGE="en_US:en" LC_ALL="en_US.UTF-8" | |
RUN dnf groupinstall -y "Development Tools" "Development Libraries" && dnf install -y wget git tar bzip2 && dnf clean all | |
RUN \ | |
wget http://www.erlang.org/download/otp_src_18.1.tar.gz && \ | |
tar -zxf otp_src_18.1.tar.gz && \ | |
cd otp_src_18.1 && \ | |
export ERL_TOP=`pwd` && \ |