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
node.default["postgresql"]["config"]["wal_level"] = "replica" | |
node.default["postgresql"]["config"]["max_wal_senders"] = 6 | |
node.default["postgresql"]["config"]["wal_keep_segments"] = 120 | |
node.default["postgresql"]["config"]["hot_standby"] = "on" |
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
~ $ curl -vv https://www.agendrix.com/wp-content/themes/agendrix/style.min.css\?ver\=1486665895 | |
* Trying 162.216.18.169... | |
* TCP_NODELAY set | |
* Connected to www.agendrix.com (162.216.18.169) port 443 (#0) | |
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 | |
* Server certificate: *.agendrix.com | |
* Server certificate: COMODO RSA Domain Validation Secure Server CA | |
* Server certificate: COMODO RSA Certification Authority | |
> GET /wp-content/themes/agendrix/style.min.css?ver=1486665895 HTTP/1.1 | |
> Host: www.agendrix.com |
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
INFO global: Vagrant version: 1.7.2 | |
INFO global: Ruby version: 2.0.0 | |
INFO global: RubyGems version: 2.0.14 | |
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.2/bin/vagrant" | |
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/bin/../embedded" | |
INFO global: VAGRANT_INSTALLER_VERSION="2" | |
INFO global: VAGRANT_DETECTED_OS="Darwin" | |
INFO global: VAGRANT_INSTALLER_ENV="1" | |
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1" | |
INFO global: VAGRANT_LOG="debug" |
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
# in application.rb | |
config.i18n.load_path += Dir["#{Rails.root.to_s}/config/locales/**/*.{rb,yml}"] | |
------------------------------------------------------------------------------------- | |
# i18n-tasks finds and manages missing and unused translations https://github.com/glebm/i18n-tasks | |
base_locale: fr | |
# locales: [en, fr ] |
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
export PATH="$HOME/.bin:/usr/local/bin:$PATH" | |
# Homebrew rbenv | |
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi | |
# Chefdk PATH | |
PATH=$HOME/.chefdk/gem/ruby/2.1.0/bin:/opt/chefdk/bin:$PATH |
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
# Monkeypatch placeholders to use labels as a fallback instead | |
module SimpleForm | |
module Components | |
module Placeholders | |
def placeholder_text | |
placeholder = options[:placeholder] | |
placeholder.is_a?(String) ? placeholder : (translate_from_namespace(:placeholders).present? ? translate_from_namespace(:placeholders) : translate_from_namespace(:labels)) | |
end | |
end | |
end |
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
# https://github.com/oortcloud/meteorite#note | |
$ sudo -H npm install -g meteorite | |
In chef? | |
Does not work correctly (missing root privileges): | |
execute 'install_meteorite' do | |
user 'myuser' |
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
namespace :load do | |
task :defaults do | |
set :puma_init_name, "#{fetch(:application)}-web" | |
set :puma_pid_path, "#{shared_path}/tmp/pids/puma.pid" | |
end | |
end | |
namespace :puma do | |
desc "Start puma workers" | |
task :start do |
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
def template(from, to, options = {}) | |
template_path = File.expand_path("../../templates/#{from}", __FILE__) | |
template = ERB.new(File.new(template_path).read).result(binding) | |
upload! StringIO.new(template), to, mode: 0644 # Otherwise it's set to 0640, which is not readable by other users (https://github.com/net-ssh/net-scp/blob/master/lib/net/scp/upload.rb#L63) | |
sudo "chown root:root #{to}" if options[:as_root] | |
end |
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
start on runlevel [2345] | |
stop on runlevel [06] | |
setuid deployer | |
setgid sysadmin | |
respawn | |
respawn limit 3 30 | |
script |
NewerOlder