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
[Desktop Entry] | |
Name=Aptana Studio 3 | |
Comment=Integrated development environment (IDE) for building Ajax web applications. | |
Exec=/home/biske/Aptana_Studio_3/AptanaStudio3 -applciation | |
Icon=/home/biske/Aptana_Studio_3/icon.xpm | |
Terminal=false | |
Type=Application | |
StartupNotify=true | |
Categories=Development;RevisionControl; | |
X-GNOME-FullName=Aptana Studio 3 |
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
require 'capybara/dsl' | |
require 'selenium-webdriver' | |
Capybara.run_server = false | |
Capybara.default_driver = :selenium | |
class GoogleRobot | |
include Capybara::DSL | |
def go |
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
if page.has_no_selctor?(:xpath, "//h1", text: "Missing Deal") | |
if page.has_selector?(:xpath, '//*[@id="deal_merchant_display_name"]') | |
sheet[red,0] = find(:xpath, '//*[@id="deal_merchant_display_name"]').text | |
end | |
if page.has_selector?(:xpath, '//*[@id="option_title_for_deal"]') | |
sheet[red,1] = find(:xpath, '//*[@id="option_title_for_deal"]').text | |
end | |
if page.has_selector?(:xpath, '//*[@id="view-details-full"]/p[2]') | |
sheet[red,2] = find(:xpath, '//*[@id="view-details-full"]/p[2]').text | |
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
require 'capybara/dsl' | |
require 'selenium-webdriver' | |
Capybara.run_server = false | |
Capybara.default_driver = :selenium | |
class Robot | |
include Capybara::DSL | |
def go |
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
require 'capybara/dsl' | |
require 'selenium-webdriver' | |
Capybara.run_server = false | |
Capybara.default_driver = :selenium | |
html_string = "<html> | |
<body> | |
<div id='foo'></div> | |
</body> |
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
require "capybara" | |
html = DATA.read | |
app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
sess = Capybara::Session.new(:selenium, app) | |
sess.visit("/") | |
puts sess.find('#id1').text | |
__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
def open_user_file | |
print "File to open: " | |
filename = gets.chomp | |
fh = File.open filename | |
yield fh | |
fn.close | |
rescue | |
puts "Couldn't open your file!" | |
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
Prerequisites | |
sudo apt-get install openjdk-7-jdk | |
Install | |
cd ~ | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.0.deb | |
sudo dpkg -i elasticsearch-1.1.0.deb |
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
class ControllerTestCase < ActionController::TestCase | |
include Devise::TestHelpers | |
include Warden::Test::Helpers | |
def setup | |
Warden.test_mode! | |
self.do_setup | |
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
curl -X POST --data 'user[email][email protected]&user[password]=pass' http://0.0.0.0:3000/users/sign_in |
OlderNewer