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 "rubygems" | |
require ENV['CELERITY_PATH'] | |
require "pp" | |
c = Celerity::Browser.start("http://www.asquare.net/javascript/tests/KeyCode.html") | |
(%w[a b c d e f g h i j k l m ] + [" ", "\n"]).each do |char| | |
c.page.getFocusedElement.type(char) | |
table = c.tables.first.to_a | |
table.shift | |
p char => table |
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
def process_bills | |
bills = agent.links.select{|link| link.href if link.href.match(/billDetailSubmit/)}.compact | |
raise StandardError, 'Unable to find bills' unless bills | |
returning statements = [] do | |
bills.each do |bill| | |
statements << parse_statement_data_from(bill) | |
break unless include_historical_data | |
end | |
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
# | |
# simpletester.rb | |
# | |
# Created by Jari Bakken on 2009-08-19. | |
# Copyright 2009 Jari Bakken. All rights reserved. | |
# | |
require "rubygems" | |
require "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
include QA::SimpleTester::Delegator | |
set :data_source , RestDataSource.new(ARGV.dup) | |
set :output_format, :text | |
set :title , "Rest Test" | |
desc 'HTTP header has correct Content-Type' | |
expect { |rest| rest.headers.content_type }.to_be 'application/xml' | |
desc 'XML is well formed' |
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
#include "htmlsnap.h" | |
#include <QPainter> | |
#include <QDebug> | |
#include <QWebFrame> | |
HtmlSnap::HtmlSnap() | |
{ | |
connect(&page, SIGNAL(loadFinished(bool)), this, SLOT(render())); | |
} |
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
# encoding: utf-8 | |
require "rake/clean" | |
require "rake/gempackagetask" | |
CLEAN.include %w[pkg] | |
GEM_NAME = "cuketagger" | |
GEM_VERSION = "0.1" |
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 "open3" | |
Open3.popen3("ls non-existing") do |stdin, stdout, stderr| | |
# hvis du vil skrive | |
# | |
# stdin.write("foo") | |
# stdin.close_write | |
# | |
p :stderr => stderr.read, :stdout => stdout.read | |
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
*** Exception ArgumentError in Passenger::Rack::ApplicationSpawner (block not supplied) (process 29576): | |
from /usr/lib/ruby/1.8/rack/builder.rb:22:in `instance_eval' | |
from /usr/lib/ruby/1.8/rack/builder.rb:22:in `initialize' | |
from /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:886:in `new' | |
from /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:886:in `new' | |
from /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:879:in `prototype' | |
from /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call' | |
from /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in `synchronize' | |
from /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call' | |
from /usr/lib/ruby/1.8/passenger/rack/request_handler.rb:65:in `process_request' |
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
<script type="text/javascript"> | |
GitHub.currentCommitRef = "master" | |
GitHub.currentRepoOwner = "jarib" | |
GitHub.currentRepo = "celerity" | |
GitHub.hasWriteAccess = true | |
GitHub.watchingRepo = true | |
GitHub.ignoredRepo = false | |
GitHub.hasForkOfRepo = |
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
jarib :: ~/src/git/rvm> rvm install 1.9.1 -C --enable-shared=true,--with-readline-dir=/usr/local | |
<i> Installing Ruby from source to: /Users/jarib/.rvm/ruby-1.9.1-p243 | |
<i> Downloading ruby-1.9.1-p243, this may take a while depending on your connection... | |
<i> Extracting ruby-1.9.1-p243 ... | |
__rvm_run:4: no such file or directory: /Users/jarib/.rvm/log/ruby-1.9.1-p243/extract.log | |
error There was an error, please check /Users/jarib/.rvm/log/ruby-1.9.1-p243/extract.error.log | |
__rvm_run:4: no such file or directory: /Users/jarib/.rvm/log/ruby-1.9.1-p243/autoconf.log |