This file contains hidden or 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 'tempfile' | |
class Firefox | |
def self.debug(page) | |
if page.is_a? File | |
page = page.read | |
elsif page.respond_to?(:body) and page.body.is_a? String | |
page = page.body | |
end | |
This file contains hidden or 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 'mechanize' | |
module MathUrl | |
def mathurl_agent | |
@agent ||= WWW::Mechanize.new | |
end | |
def mathurl_img_for(latex) | |
page = math_url_agent.get("http://mathurl.com") | |
form = page.forms.first |
NewerOlder