- Tenda
- Kompor
- Peralatan masak (panci)
- Ransel/tas gunung
import code; code.interact(local=dict(globals(), **locals())) |
The reason why you might get certificate errors in Ruby 2.0 when talking HTTPS is because there isn't a default certificate bundle that OpenSSL (which was used when building Ruby) trusts.
Update: this problem is solved in edge versions of rbenv and RVM.
$ ruby -rnet/https -e "Net::HTTP.get URI('https://github.com')"
net/http.rb:917:in `connect': SSL_connect returned=1 errno=0 state=SSLv3
read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
You can work around the issue by installing a certificate bundle that you trust. I trust Mozilla and curl.
- ./bin/install_chrome.sh | |
- npm install | |
- xvfb-run -a ./node_modules/karma/bin/karma start --single-run |
git branch --merged | grep -v "\*" | grep -v "YOUR_BRANCH_TO_KEEP" | xargs -n 1 git branch -d |
# config/environments/development.rb | |
Hello::Application.configure do | |
# ... | |
# https://rails.lighthouseapp.com/projects/8994/tickets/4676-reload-routes-on-each-request-in-dev-mode | |
service_reloader = ActiveSupport::FileUpdateChecker.new(Dir["app/services/**"]) { Rails.application.reload_routes! } | |
config.to_prepare do | |
service_reloader.execute_if_updated |
def show_page | |
puts "Showing page #{current_path}" | |
save_page Rails.root.join( 'public', 'capybara.html' ) | |
%x(launchy http://localhost:3000/capybara.html) | |
end |
def submit_form(selector = 'form') | |
within(selector) do | |
if page.has_css?('input[type=submit]') | |
#puts "Click submit" | |
find('input[type=submit]').click | |
elsif page.has_css?('button') | |
#puts "Click button" | |
find('button').click | |
else | |
#puts "Call submit()" |
before do | |
# because we cannot mock redirection, set driver to not follow redirects | |
@current_driver_config = page.driver.instance_variable_get(:@options) | |
page.driver.instance_variable_set(:@options, @current_driver_config.merge({follow_redirects: false})) | |
end | |
after do | |
# set driver setting to follow redirection again | |
page.driver.instance_variable_set(:@options, @current_driver_config) | |
end |
var gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var babelify = require('babelify'); | |
var source = require('vinyl-source-stream'); | |
var gutil = require('gulp-util'); | |
var uglify = require('gulp-uglify'); | |
gulp.task('browserify', function(){ | |
browserify({debug:true, entries: 'src/js/main.js'}) | |
.transform(babelify) |