Skip to content

Instantly share code, notes, and snippets.

View JEG2's full-sized avatar

James Edward Gray II JEG2

View GitHub Profile
@JEG2
JEG2 / prepend.rb
Created March 27, 2013 16:18
Showing prepend in the middle.
module Plugin
def some_method
puts "Plugin"
super
end
end
class A
def some_method
puts "A"
@JEG2
JEG2 / quiz61.html
Created March 19, 2013 17:03
The "Dice Roller" Ruby Quiz
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Ruby Quiz - Dice Roller (#61)</title>
<link rel="stylesheet" type="text/css" href="quiz.css" />
<link rel="stylesheet" type="text/css" href="print.css" media="print" />
</head><body>
<div id="page">
<div id="header"><span class="ruby">Ruby</span> <span class="quiz">Quiz</span></div>
app@botqueen1:/u/apps/botqueen/current$ bundle exec ruby foo.rb
Ran 100 requests ******************************
Ran 100 requests ******************************
Ran 100 requests ******************************
Ran 100 requests ******************************
Ran 100 requests ******************************
Ran 100 requests ******************************
Ran 100 requests ******************************
Ran 100 requests ******************************
@JEG2
JEG2 / agenda.md
Last active December 13, 2015 20:28
The agenda for the AOK's February 2013 board meeting.

AOK Board Meeting

Fedruary 17th, 2013 at 2:00 PM

Midwest City Library
8143 East Reno Ave.
Midwest City, OK73110

Open to all: AOK board meetings are open to any members that wish to attend.

class MethodCounter
def initialize
@signature = ENV.fetch("COUNT_CALLS_TO")
@path = @signature.split(/(?:::|#)/)
@scope = @signature.include?("#") ? :instance : :class_or_module
@count = 0
@wrapping = false
@wrapped = false
end
@JEG2
JEG2 / Gemfile
Created November 20, 2012 21:46
Another Typhoeus VCR Interaction Bug
source :rubygems
gem "typhoeus", "~> 0.5.2"
gem "vcr", "~> 2.3.0"
gem "rspec"
@JEG2
JEG2 / Gemfile
Created November 13, 2012 15:22
Another Typhoeus VCR failure
gem "typhoeus", git: "https://github.com/typhoeus/typhoeus.git",
ref: "8e815cdf4fed2322947e2338d6f5b084c820a70b"
gem "vcr"
gem "rspec"
@JEG2
JEG2 / Gemfile.lock
Created November 12, 2012 19:41
Typhoeus and VCR version numbers.
GEM
remote: http://rubygems.org/
specs:
diff-lcs (1.1.3)
ethon (0.5.2)
ffi (~> 1.0.11)
mime-types (~> 1.18)
ffi (1.0.11)
mime-types (1.19)
rake (0.9.2.2)
@JEG2
JEG2 / vcr_spec.rb
Created November 12, 2012 18:45
The problem I'm having getting Typhoeus and VCR to cooperate.
require "typhoeus"
require "vcr"
VCR.configure do |config|
config.cassette_library_dir = "vcr_cassettes"
config.hook_into :typhoeus
end
describe VCR do
it "should work with a queue" do
@JEG2
JEG2 / ruby_nuby_videos.md
Created November 1, 2012 13:57
All of the videos created for the Ruby Nuby Project of the Ruby Rogues podcast.