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
// ==UserScript== | |
// @name WordPress Calypso Warn on Publish | |
// @version 0.1 | |
// @description Warn on publish | |
// @author Alister Scott | |
// @match https://wpcalypso.wordpress.com/* | |
// @match http://calypso.localhost:3000/* | |
// @match https://wordpress.com/* | |
// @grant none | |
// ==/UserScript== |
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
require 'quoth' | |
puts Quoth.get | |
# If I have ventured wrongly, very well, life then helps me with its penalty. | |
# But if I haven't ventured at all, who helps me then? ~ Søren Kierkegaard |
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
require 'securerandom' | |
puts SecureRandom.uuid | |
# ffe71bd2-2650-4135-b366-f8da08b4b708 |
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
require 'faker' | |
puts Faker::Name.name | |
# Nathanael Botsford | |
puts Faker::Company.name | |
# Labadie, Marvin and Kassulke | |
puts Faker::Company.catch_phrase | |
# Self-enabling bottom-line project | |
puts Faker::Company.bs | |
# grow B2C platforms |
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
require 'watir-webdriver' | |
file_name = nil | |
download_directory = "#{Dir.pwd}/downloads" | |
download_directory.gsub!("/", "\\") if Selenium::WebDriver::Platform.windows? | |
downloads_before = Dir.entries download_directory | |
profile = Selenium::WebDriver::Firefox::Profile.new | |
profile['browser.download.folderList'] = 2 # custom location | |
profile['browser.download.dir'] = download_directory |
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
require 'watir-webdriver' | |
require 'webdriver-user-agent' | |
driver = UserAgent.driver(:browser => :chrome, :agent => :iphone, :orientation => :landscape) | |
browser = Watir::Browser.new driver | |
browser.goto 'tiffany.com' | |
browser.url.should == 'http://m.tiffany.com/International.aspx' |
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
require 'selenium-webdriver' | |
require 'webdriver-user-agent' | |
driver = UserAgent.driver(:browser => :chrome, :agent => :iphone, :orientation => :landscape) | |
driver.get 'http://tiffany.com' | |
driver.current_url.should == 'http://m.tiffany.com/International.aspx' |
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
require 'selenium-webdriver' | |
require 'watir-webdriver' | |
require 'bench' | |
d = Selenium::WebDriver.for :chrome, native_events: true | |
b = Watir::Browser.new d | |
b.goto 'bing.com' | |
benchmark 'set chrome native' do | |
b.text_field(name: 'q').set 'ghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghghgh' |
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
visit LoginPage do |page| | |
page.login_with('foo', 'badpass') | |
page.text.should include "Login error" | |
page.text.should include "Secure your account" | |
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
#https://github.com/natritmeyer/site_prism#epilogue | |
# was | |
@home = Home.new | |
@home.load | |
@home.search_field.set "Sausages" | |
@home.search_field.search_button.click | |
@results_page = SearchResults.new | |
@results_page.should have_search_result_items |
NewerOlder