Skip to content

Instantly share code, notes, and snippets.

# Add this to more_web_steps.rb
# Selenium docs: http://code.google.com/p/selenium/wiki/RubyBindings#Javascript_Alert/Confirm today!
When /^I (accept|dismiss) the "([^"]*)" alert$/ do |action, text|
alert = page.driver.browser.switch_to.alert
alert.text.should eq(text)
alert.send(action)
end

ssh <computer_name or ip> echo $PATH /usr/bin:/bin:/usr/sbin:/sbin

This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

Edit the /etc/sshd_config file by activating the PermitUserEnvironment yes option and then creating a ~/.ssh/environment file with the following:-

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin