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
class While | |
def initialize(&src_fn) | |
@src_fn = src_fn | |
end | |
def do | |
x = @src_fn.call | |
while(x) | |
yield(x) | |
x = @src_fn.call |
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
<li class='step'> | |
<%= sf.hidden_field :id %> | |
<%= sf.hidden_field :step_definition_id %> | |
<%= sf.hidden_field :position ,:class=>"position"%> | |
<%= sf.object.format_with_params { |param| render(:partial=>'scenarios/param' , :locals=>{:param=> param, :sf=>sf})} %> | |
<% if sf.object.new_record? %> | |
<%= link_to "Remove", '#', :onclick =>"$(this).parent('.step').remove()" %> | |
<% else %> | |
<%= sf.check_box '_destroy' %> |
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 'rubygems' | |
require 'parslet' | |
#This needs a few more 'as' calls to annotate the output | |
class JSONParser < Parslet::Parser | |
def initialize(number_parser) | |
@number_parser | |
end | |
rule(:space) { match('[\s\n]').repeat(1)} |
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
<html> | |
<body> | |
<table width='100%'> | |
<tr> | |
<td>Select a TestTemplate File to Load:</td> | |
<td><input type="file" id="fileToLoad"> | |
<td><a href="javascript:loadFileAsText()">Load Selected File</a><td> | |
</tr> | |
<tr> | |
<td colspan="3"> |
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
$:.unshift File.expand_path(File.dirname(__FILE__)) | |
require 'win32ole' | |
require 'qc_automation' | |
require 'qc_test' | |
require 'fileutils' | |
module QCIntegration | |
class TestFolder | |
attr_accessor :kids |
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
$(".tab_desc h4").each(function(e){ | |
var self = $(this); | |
var game = $(this).text().split(" ").join("+"); | |
// var data = { | |
// titleOrPublisher: self.text(), | |
// isIncluding: false, | |
// rating: "", | |
// ratingsCriteria: "", | |
// platforms: "", |
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
function move_duckduckgo(){ | |
var node = document.getElementById('ddg_zeroclick'); | |
if(node != null){ | |
document.getElementById('rhs').appendChild(node); | |
} else { | |
setTimeout(move_duckduckgo, 10); | |
} | |
} | |
move_duckduckgo(); |
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
source "http://rubygems.org" | |
gem "eventmachine", "1.0.8" | |
gem "thin" | |
gem "win32-service" | |
gem "sinatra" |
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 'parslet' | |
class Parslet::Atoms::FixedLength < Parslet::Atoms::Base | |
attr_reader :len, :parslet | |
def initialize(parslet, len, tag=:length) | |
super() | |
raise ArgumentError, | |
"Asking for zero length of a parslet. (#{parslet.inspect} length #{len})" \ | |
if len == 0 |
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 'pp' | |
require 'parslet' | |
module Example # as in 'lots of insipid and stupid parenthesis' | |
class Parser < Parslet::Parser | |
rule(:ws) { match('[\s]').repeat(1) } | |
rule(:ws?) { ws.maybe } | |
rule(:number) { match('[0-9]').repeat(1) } | |
rule(:offset) { ws? >> str("[") >> number.as(:offset) >> str("]") } |