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
wget https://chromedriver.googlecode.com/files/chromedriver_linux64_2.3.zip | |
unzip chromedriver_linux64_2.3.zip | |
sudo cp chromedriver /usr/bin/chromedriver | |
sudo chown root /usr/bin/chromedriver | |
sudo chmod +x /usr/bin/chromedriver | |
sudo chmod 755 /usr/bin/chromedriver |
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
#Mounting the share is a 2 stage process: | |
# 1. Create a directory that will be the mount point | |
# 2. Mount the share to that directory | |
#Create the mount point: | |
mkdir share_name | |
#Mount the share: | |
mount_smbfs //username:password@server.name/share_name share_name/ |
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
class MyResource | |
include HTTParty | |
debug_output $stdout # <= will spit out all request details to the console | |
#... | |
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
require 'httparty' | |
require 'json' | |
class QueueInspector | |
include HTTParty | |
basic_auth "guest", "guest" | |
base_uri "http://192.168.0.1:55672" | |
def messages | |
body = {'count' => 5,'requeue' => true, 'encoding' => 'auto', 'truncate' => 50000}.to_json |
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
curl -H 'Content-Type:application/xml' -X PUT -d '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><thing></thing>' http://192.168.0.1:8080/some/resource/ --user admin:password |
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 'test/unit' | |
# implementation | |
class Duration | |
def in_seconds(raw_duration) | |
match = raw_duration.match(/PT(?:([0-9]*)H)*(?:([0-9]*)M)*(?:([0-9.]*)S)*/) | |
hours = match[1].to_i | |
minutes = match[2].to_i | |
seconds = match[3].to_f | |
seconds + (60 * minutes) + (60 * 60 * hours) |
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 'net/http' | |
class HttpClient | |
def initialize(base_url, username = nil, password = nil) | |
@base_url = base_url | |
@username = username | |
@password = password | |
end | |
def get(path, headers = {}) |
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
# Example Rakefile that demonstrates how to add task dependencies | |
# to custom rake tasks that don't allow for the normal rake task | |
# behaviour around setting task dependencies. | |
require 'cucumber/rake/task' | |
# here's the task that I want to run before any of my cucumber tasks (see below) | |
namespace :stub do | |
desc "Start stub required by features" | |
task :start do |
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
/* | |
Create a console app, add references to the various white libraries and use the following as a template for operating the Open Dialog window | |
Get the white binaries from here: http://white.codeplex.com/ | |
*/ | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Windows.Automation; | |
using White.Core; | |
using White.Core.UIItems; |
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
# Copyright (c) 2010, Nathaniel Ritmeyer. All rights reserved. | |
# | |
# http://www.natontesting.com | |
# | |
# Save this in a file called 'unused.rb' in your 'features/support' directory. Then, to list | |
# all the unused steps in your project, run the following command: | |
# | |
# cucumber -d -f Cucumber::Formatter::Unused | |
# | |
# or... |
NewerOlder