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
module Capybara::Driver | |
class Envjs | |
PreTypingEvents = ['focus'] | |
TypingEvents = ['keydown', 'keypress', 'keyup'] | |
PostTypingEvents = ['change', 'blur'] | |
def self.type_into(field, value) | |
PreTypingEvents.each { |e| field.trigger(e) } | |
field.set(value) | |
TypingEvents.each { |e| field.trigger(e) } |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'date' | |
#location = 'http://www.howdoesitfeel.co.uk/podcast.html' | |
location = './podcast.html' |
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
module PublishingLogic | |
module Migrations | |
class AddProgrammes < ActiveRecord::Migration | |
def self.up | |
create_table :programmes do |t| | |
t.boolean :publishing_enabled | |
t.datetime :published_at | |
t.datetime :published_until | |
t.timestamps | |
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
Feature: Allowing users to vote for an answer | |
As a visitor to the FAQ site | |
I want to be able to vote for the answer I think is best | |
In order to crowd-source the question having the most relevant answer | |
Scenario: I can vote for an answer | |
Given there is a question "What is jam?" | |
And it has been answered "Lovely sticky fruit stuff, best smeared on toast" | |
And it has been answered "A problem with too much traffic" | |
When I am on the page for question "What is jam?" |
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
Company A: $1,000 - $3,000 | |
Company B: $6,000 - $10,000 | |
Company C: $500 - $2,500 |
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
Amazon: $1,000 - $3,000 | |
Play.com: $100 - $1,000,000 | |
John Lewis: $1,000,000 - $2,000,000 | |
HMV: $10 - $250 | |
Toys'r'Us: $50 - $2,000 |
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' | |
fetcher = Gem::SpecFetcher.fetcher | |
my_dep = 'activesupport' | |
# 1st arg = all (true to get all versions, false to get latest) | |
# 2nd arg = prerelase (true to get pre-release gems, false to get stable) | |
all_gems = fetcher.list(false, false) |
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
Feature: There should be monsters in my dungeon | |
In order to manage what types of monsters are available to my dungeons | |
As a dungeon master | |
I want to be able to see a list of monsters, add new ones, edit them and also delete them | |
Scenario: Adding a monster to my list of monsters available to my dungeons | |
Given I am on the new monster page | |
When I fill in "Name" with "Orc" | |
And I select "very" from "Scariness" | |
And I press "Create" |
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
10 DIM R$(24,1),A(5),B(5),Z(5) | |
20 CLS: WIDTH 40: KEY OFF: SCREEN 0,1 | |
30 LOCATE 12,16,0:COLOR 7:PRINT "Stand by..." | |
40 FOR H=0 TO 1:FOR I = 1 TO 24 | |
50 R$(I,H)="":C=0 | |
60 READ T,KO:R$(I,H)+CHR$(T)+CHR$(KO) | |
70 C=C+T:IF C<17 THEN 60 | |
80 NEXT I,H | |
90 FOR I=1 TO 5: READ A(I), B(I):Z(I)=0:NEXT I | |
100 CLS: FOR K=1 TO 5:GOSUB 1000: NEXT K |
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
// ==UserScript== | |
// @name Growl Notifications with messages for campfire and fluid | |
// @namespace http://tim.theenchanter.com/ | |
// @description If your name is mentioned in a message, a growl notification shows what was said. | |
// @author Tim Harper, Murray Steele (modifications for prototype 1.7) | |
// @homepage http://tim.theenchanter.com/ | |
// @include *.campfirenow.com/room* | |
// ==/UserScript== | |
try { if ( typeof(Campfire) != "undefined" ) { |