If you ever get key not found
errors when deploying with Capistrano, then:
When ~/.bashrc
contains first lines like this, any code afterwards won't be sourced:
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
git ls-files --deleted | xargs git rm | |
git commit |
If you ever get key not found
errors when deploying with Capistrano, then:
When ~/.bashrc
contains first lines like this, any code afterwards won't be sourced:
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
Copy config/master.key
from local filesystem to the production server under <project_root>/shared/config/master.key
.
Configure capistrano’s config/deploy.rb to include this line:
Source: Love Your lib Directory By: Brian Cardarella
Far too often I’ve needed to extend a class that is being defined outside of my project. There are a few ways to deal with this. You can use a Composite to define a new class that you can then play around with. The downside to this is that I sometimes want to modify a class that is being inherited by other classes. This is when I think it is appropriate to Monkey Patch.
The pattern I have fallen upon is to define a gem_ext/ directory and a gem_ext.rb file in lib. I then make sure the extensions are loaded up using an initializer.
library(caret) | |
library(ModelMetrics) | |
library(recipes) | |
library(neuralnet) | |
library(sigmoid) | |
# Create the dataset | |
tt <- data.frame(multiplier = rep(1:10, times = 10), multiplicand = rep(1:10, each = 10)) | |
tt <- cbind(tt, data.frame(product = tt$multiplier * tt$multiplicand)) |
require 'capybara'
require 'capybara/poltergeist'
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, js_errors: false, phantomjs_options: ['--ignore-ssl-errors=true','--load-images=no', '--proxy=proxy.crawlera.com:8010', '--ssl-protocol=any'])
end
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev -y