start new:
tmux
start new with session name:
tmux new -s myname
describe "Shopping Cart Requests" do | |
let!(:user) { Fabricate(:user) } | |
before(:each) do | |
login_user_post("admin", "admin") | |
end | |
context "when I visit the shopping cart" do | |
it " show the logged in users' cart items " do | |
#Test stuff |
#!/usr/bin/env ruby | |
# | |
# This file was generated by RubyGems. | |
# | |
# The application 'jekyll' is installed as part of a gem, and | |
# this file is here to facilitate running it. | |
# | |
require 'rubygems' |
# Support for Rspec / Capybara subdomain integration testing | |
# Make sure this file is required by spec_helper.rb | |
# | |
# Sample subdomain test: | |
# it "should test subdomain" do | |
# switch_to_subdomain("mysubdomain") | |
# visit root_path | |
# end | |
DEFAULT_HOST = "lvh.me" |
# LiquidView is a action view extension class. You can register it with rails | |
# and use liquid as an template system for .liquid files | |
# | |
# Example | |
# | |
# ActionView::Base::register_template_handler :liquid, LiquidView | |
class LiquidView | |
PROTECTED_ASSIGNS = %w( template_root response _session template_class action_name request_origin session template | |
_response url _request _cookies variables_added _flash params _headers request cookies | |
ignore_missing_templates flash _params logger before_filter_chain_aborted headers ) |
tell application "iTerm" | |
activate | |
tell (make new terminal) | |
tell (launch session "initial_session") to write text "cd ~/workspace/project1; clear" | |
tell i term application "System Events" to keystroke "D" using command down | |
tell last item of sessions to write text "cd ~/workspace/work/project2; clear" | |
tell i term application "System Events" to keystroke "d" using command down | |
tell last item of sessions to write text "cd ~/workspace/work/project3; clear" |
//= require jquery | |
//= require jquery_ujs | |
$(function() { | |
var source = new EventSource('/stream'); | |
source.addEventListener('counter', function(e) { | |
$('body').after(e.data + '<br />'); | |
}); | |
}); |
def draw_feature(context, atPoint:feature_point) | |
size = 6 | |
startx = feature_point.x - (size/2) | |
starty = feature_point.y - (size/2) | |
CGContextAddRect(context, [[startx, starty], [size, size]]) | |
CGContextDrawPath(context, KCGPathFillStroke) | |
end |
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.