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
<toolchains> | |
<!-- JDK toolchains --> | |
<toolchain> | |
<type>jdk</type> | |
<provides> | |
<version>1.9</version> | |
<vendor>oracle</vendor> | |
</provides> | |
<configuration> | |
<jdkHome>/Library/Java/JavaVirtualMachines/jdk-9.jdk</jdkHome> |
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
class FormBuilder < ActionView::Helpers::FormBuilder | |
def text_field(attribute, options={}) | |
input_field(attribute, options) do | |
super | |
end | |
end | |
def password_field(attribute, options={}) | |
input_field(attribute, options) do | |
super |
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
namespace :rails do | |
desc "Open the rails console on the remote app server" | |
task :console => 'rvm:hook' do | |
on roles(:app), :primary => true do |host| | |
execute_interactively host, "console #{fetch(:stage)}" | |
end | |
end | |
desc "Open the rails dbconsole on each of the remote servers" | |
task :dbconsole => 'rvm:hook' do |
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
namespace :load do | |
task :defaults do | |
set :pids_dir, -> { File.join(current_path, 'tmp', 'pids') } | |
set :unicorn_pid, -> { File.join(fetch(:pids_dir), "unicorn.pid") } | |
set :unicorn_config_path, -> { File.join(current_path, "config", "unicorn", "#{fetch(:rails_env)}.rb") } | |
set :unicorn_roles, -> { :app } | |
set :unicorn_options, -> { "" } | |
set :unicorn_rack_env, -> { fetch(:rails_env) == "development" ? "development" : "deployment" } | |
set :unicorn_restart_sleep_time, 3 | |
end |
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
sudo apt-get install build-essential | |
cpan install List::Util::WeightedRoundRobin |
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
# echo "200 out" >> /etc/iproute2/rt_tables | |
auto eth1 | |
iface eth1 inet static | |
address 172.31.10.172 | |
netmask 255.255.240.0 | |
network 172.31.0.0 | |
broadcast 172.31.15.255 | |
up ip route add default via 172.31.0.1 dev eth1 table out | |
up ip rule add from 172.31.10.172/32 table out |
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
# The primary network interface | |
auto eth0 | |
iface eth0 inet dhcp | |
up ip addr add 172.31.10.125/32 dev eth0 |
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
sudo apt-get update -y | |
sudo locale-gen en_US | |
sudo apt-get install postfix opendkim opendkim-tools sasl2-bin libsasl2-modules libsasl2-modules-sql libopendbx1-pgsql iptables-persistent | |
sudo mkdir /etc/postfix/ssl | |
cd /etc/postfix/ssl/ | |
sudo openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024 | |
sudo chmod 600 smtpd.key | |
sudo openssl req -new -key smtpd.key -out smtpd.csr | |
sudo openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt |
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
Server Software: Webmachine-Ruby/1.2.2 | |
Server Hostname: 127.0.0.1 | |
Server Port: 4000 | |
Document Path: /api/track?token=test_token | |
Document Length: 0 bytes | |
Concurrency Level: 100 | |
Time taken for tests: 13.453 seconds | |
Complete requests: 10000 |
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
Server Software: Webmachine-Ruby/1.2.2 | |
Server Hostname: 127.0.0.1 | |
Server Port: 4000 | |
Document Path: /api/track?token=test_token | |
Document Length: 0 bytes | |
Concurrency Level: 130 | |
Time taken for tests: 349.434 seconds | |
Complete requests: 100000 |
NewerOlder