Skip to content

Instantly share code, notes, and snippets.

View seth-macpherson's full-sized avatar

Seth MacPherson seth-macpherson

  • Appfolio
  • Hood River, OR
View GitHub Profile
ReferralUserTest
at top level in PASS (0 at line 00
Finished in 0.003279 seconds.
1 tests, 1 passed, 0 failures, 0 errors, 0 skips, 3 assertions
copy output
Program exited with code #0 after 10.35 seconds.
require 'socket'
Socket.do_not_reverse_lookup = true
UDPSocket.open do |s|
s.connect '8.8.8.8', 1
p s.addr.last
end
# 85.17.96.111, 65.21.182.202
require 'socket'
Socket.do_not_reverse_lookup = true
UDPSocket.open do |s|
s.connect '8.8.8.8', 1
p s.addr.last
end
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00051s latency).
rDNS record for 127.0.0.1: assets.hiringthing-sm.com
Not shown: 997 closed ports
PORT STATE SERVICE
23/tcp open telnet
53/tcp open domain
631/tcp open ipp
Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds
(rubybook) $ irb
1.9.3p125 :001 > require 'rubygems'
=> false
1.9.3p125 :002 > require 'selenium-webdriver'
=> true
1.9.3p125 :003 > driver = Selenium::WebDriver.for :firefox
Errno::EADDRNOTAVAIL: Cannot assign requested address - bind(2)
from /home/seth/.rvm/gems/ruby-1.9.3-p125/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/firefox/socket_lock.rb:45:in `initialize'
@seth-macpherson
seth-macpherson / install.bash
Created December 10, 2012 22:17
Install RVM
curl -L https://get.rvm.io | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 185 100 185 0 0 513 0 --:--:-- --:--:-- --:--:-- 1201
100 10242 100 10242 0 0 4975 0 0:00:02 0:00:02 --:--:-- 17280
Downloading RVM from wayneeseguin branch master
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 131 100 131 0 0 183 0 --:--:-- --:--:-- --:--:-- 279
@seth-macpherson
seth-macpherson / 0-readme.md
Created November 30, 2012 19:31 — forked from burke/0-readme.md
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@seth-macpherson
seth-macpherson / 0-readme.md
Created November 30, 2012 19:31 — forked from burke/0-readme.md
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@seth-macpherson
seth-macpherson / Gemfile
Created November 26, 2012 22:24
Sample Gemfile with Selenium
group :test do
gem 'turn'
gem 'minitest'
gem 'factory_girl_rails', '4.0.0'
gem 'factory_girl', '4.0.0'
gem 'launchy'
gem 'simplecov', :require => false
gem 'capybara', '1.1.2'
gem 'selenium-client', '1.2.18'