Skip to content

Instantly share code, notes, and snippets.

View Ebtoulson's full-sized avatar

Eric Toulson Ebtoulson

  • Atlanta, Georgia
View GitHub Profile
1.9.3-p392 :001 > class Test
1.9.3-p392 :002?> def self.wtf
1.9.3-p392 :003?> "WHAT DA FUCK"
1.9.3-p392 :004?> end
1.9.3-p392 :005?>
1.9.3-p392 :006 > self.singleton_class.send(:alias_method, :wtf_mate, :wtf)
1.9.3-p392 :007?> end
=> #<Class:Test>
1.9.3-p392 :008 > Test.wtf
=> "WHAT DA FUCK"
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-Y']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
# If you were curious how to do it with lambdas,
# I think this way makes the method definition look ugly but w/e
def method(arr, fn = ->(e){ "" })
arr[:no_key]
rescue => e
fn.call(e)
end
method([])
# => ""
!define loag {http://local.apartmentguide.com/apartments/Georgia/Norcross/search/}
#!| script|
!|scenario |User opens advanced search for Norcross GA and checks refinements using|selector|and views the |displayed_name|in the refinements list|
|windowMaximize |
|user opens |${loag} |
|user clicks|css=@selector |
|user waits |3000 |
|user |verifies |that |css=p.refinement_list|shows text |@displayed_name