- do Basic JavaScript (5h)
- you can skip 38-41 (regular expressions) if you want
- do Object Oriented and Functional Programming (2h)
- JSON APIs and Ajax
- 1-2 is up to what we've done now
- You can do the others as well but they'll introduce a lot of new stuff.
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
{ | |
filename: "sample/comma.txt", | |
delimeter: "comma", | |
headers: [:last_name, :first_name, :gender, :favorite_color, :date_of_birth] | |
}, | |
{ | |
filename: "sample/pipe.txt", | |
delimeter: "pipe", | |
headers: [:last_name, :first_name, :middle_initial, :gender, :favorite_color, :date_of_birth] | |
}, |
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
arr = [ 2, 4, 6, 1, 7, 9] | |
arr.each do |element| | |
puts "I'm #{element}." | |
end | |
arr.each_with_index do |element, index| | |
puts "#{element} has index #{index}" | |
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
a1 = Artist.new(name: 'Jay-z', | |
description: 'Shawn Corey Carter (born December 4, 1969),[2] known by his stage name Jay Z (formerly Jay-Z),[3][4][5] is an American rapper, record producer, and entrepreneur. He is one of the most financially successful hip hop artists and entrepreneurs in America.', | |
image_url: 'http://www.loscontroladores.com/wp-content/uploads/2015/08/jay-z-live-2015-700x519.jpg' | |
) | |
a1.songs.build(title: "Run This Town", | |
length: '4:27', | |
genre: 'rap' | |
) |
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
Capybara.register_driver :chrome_custom do |app| | |
caps = Selenium::WebDriver::Remote::Capabilities.chrome( | |
"chromeOptions" => { | |
"excludeSwitches" => [ "test-type", "ignore-certificate-errors" ], | |
} | |
) | |
Capybara::Selenium::Driver.new(app, :browser => :chrome, :desired_capabilities => caps) | |
end |
Frequently one might want to make an assertion inside a within block, but it's not obvious how to do so.
This doesn't work (within doesn't have block attributes):
within(level_selector) do |this|
click_button 'edit'
expect(this).to have_content(header_text) # sadly this = nil
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 -q -y install git phantomjs libxslt-dev libxml2-dev libpq-dev libmagickwand-dev imagemagick nodejs postgresql redis-server | |
# don't prompt | |
sudo rm ~/.ssh/config | |
echo StrictHostKeyChecking=no >> ~/.ssh/config | |
curl -L get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm |
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
[core] | |
excludesfile = /Users/VRDeveloper/.gitignore_global | |
pager = less -FXRS -x2 | |
[alias] | |
st = status | |
di = diff | |
co = checkout | |
ci = commit | |
br = branch | |
sta = stash |
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 :sauce do | |
desc "Execute Jasmine tests on Sauce Labs with RSpec results, i.e. `rake sauce:jasmine['Windows 2008',iexplore,9]`" | |
task :jasmine, [:os, :browser, :browser_version] => 'jasmine:require' do |t, args| | |
RSpec::Core::RakeTask.new(:jasmine_continuous_integration_runner) do |t| | |
t.rspec_opts = ["--colour", "--format", "documentation"] | |
t.verbose = true | |
t.ruby_opts = ["-r #{File.expand_path(File.join(::Rails.root, 'config', 'environment'))}"] | |
t.pattern = [File.expand_path(File.join('script', 'jasmine_sauce_runner.rb'))] | |
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
# Matchers that will wait for a value to change. | |
# Ex. expect { email.reload.delivered? }.to become_true | |
RSpec::Matchers.define :become_true do | |
match do |block| | |
begin | |
Timeout.timeout(Capybara.default_wait_time) do | |
sleep(0.1) until value = block.call | |
value | |
end |
NewerOlder