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
| SCREEN 12: CLS : xs = 1: ys = 1: x = 25: y = 25 | |
| 1 CIRCLE (xx, yy), 20, 0: CIRCLE (x, y), 20, 15 | |
| DO: s = s + 1: IF s = 30 THEN s = 0: EXIT DO | |
| LOOP: xx = x: yy = y: x = x + xs: y = y + ys | |
| IF x < 25 OR x > 615 THEN xs = -xs | |
| IF y < 25 OR y > 455 THEN ys = -ys | |
| GOTO 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
| # Initialize new Triple DES, CBC cipher with PKCS5 padding | |
| cipher = Cipher.new | |
| # Begin | |
| cipher.encrypt | |
| # Pass in encryption key, as given: "...rbtrj" | |
| cipher.key = "KEY" | |
| # Pass in initialization vector, as given: "...gdf=" |
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 "rails", "3.0.7" | |
| gem "pg" | |
| gem "jquery-rails", "~> 1.0.7" | |
| gem "faye", "~> 0.6.0" | |
| group :development, :test do |
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
| [NilClass, TrueClass, FalseClass].each do |klass| | |
| klass.class_eval do | |
| def as_json(options = nil) | |
| self | |
| end | |
| end | |
| end | |
| ActiveSupport::JSON::Encoding::Encoder.class_eval do | |
| def encode(value, use_options = true) |
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
| Feature: Chat | |
| As a user | |
| I want to chat with other users | |
| So I feel like part of a community | |
| @javascript | |
| Scenario: Push for chat | |
| Given the following users exist: | |
| | name | | |
| | Steve | |
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
| 71.205.214.254 - - [19/Jul/2011:00:01:43 +0000] "GET /buttons/OV5a-bMRyaFfCUMiElKvCA.png HTTP/1.1" 404 313 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30" |
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 "authlogic/test_case" | |
| World(Authlogic::TestCase) | |
| Before do | |
| @cookies = ActionDispatch::Cookies::CookieJar.new(Rails.application.config.secret_token) | |
| Authlogic::TestCase::MockCookieJar.stub(:new).and_return{ @cookies } | |
| ActionDispatch::Request.any_instance.stub(:cookies).and_return{ @cookies } | |
| ActionDispatch::Request.any_instance.stub(:cookie_jar).and_return{ @cookies } |
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 MagicProxy | |
| @methods = [] | |
| def self.method_missing(method) | |
| @methods << method | |
| # Put magic here! | |
| puts @methods.join('.') | |
| self | |
| end | |
| 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
| I'm writing a gem as an extension of multiple ORMs. I'd like to test the gem against 4 rubies, 4 ORMs and a few minor versions of each ORM. I have the 4 rubies specified in .travis.yml. I also have 13 gemfiles checked into the repo. That's 52 builds total. Each run should test only a specific version of a specific ORM using a specific Ruby. | |
| To test a specific ORM, I need to set an "ADAPTER" ENV variable. | |
| To test a specific version, I need to bundle using a different gemfile. | |
| Solution #1 | |
| ----------- | |
| I could set the "rvm" rubies, set the "env" array for the 4 ORMs, and set the "gemfile" array to the 13 gemfiles. But that's going to run 208 builds. Plus many of them would be against ActiveRecord using a MongoMapper gemfile. Doesn't work. |
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 'https://rubygems.org' | |
| gem 'rails', '3.2.12' | |
| # Bundle edge Rails instead: | |
| # gem 'rails', :git => 'git://github.com/rails/rails.git' | |
| gem 'sqlite3' | |