Skip to content

Instantly share code, notes, and snippets.

View carols10cents's full-sized avatar

Carol (Nichols || Goulding) carols10cents

View GitHub Profile
elevators:
speed: 1
number: 2
floors: 9
requests:
- arrive_at_elevator_time: 1
starting_floor: 3
destination_floor: 1
- arrive_at_elevator_time: 2
starting_floor: 9
SQL (0.0ms) SELECT name
FROM sqlite_master
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
SQL (0.0ms) select sqlite_version(*)
SQL (0.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL
)
SQL (0.0ms) PRAGMA index_list("schema_migrations")
SQL (15.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrat
ions" ("version")
require 'bundler'
Bundler.setup
Bundler.require(:default)
require_relative '../lib/munin-graph' # This is in ../lib
require 'munin_graph_server'
run Sinatra::Application
@carols10cents
carols10cents / gist:848212
Created February 28, 2011 22:50
Capybara session attach_file specs that fail on Windows
........FFFF.FFF.
Failures:
1) Capybara::Session with selenium driver it should behave like session it should behave like attach_file#attach_file with normal form should set a file path by id
Failure/Error: extract_results(@session)['image'].should == File.basename(__FILE__)
expected: "attach_file_spec.rb"
got: "" (using ==)
Shared Example Group: "attach_file" called from ./lib/capybara/spec/session.rb:46
# ./lib/capybara/spec/session/attach_file_spec.rb:12:in `block (4 levels) in <top (required)>'
# I created a new directory and with capistrano 2.6.0 did `capify .`, then defined this task in config/deploy.rb:
task :capistrano_bug do
set :something, current_release
end
# When I run cap capistrano_bug --dry-run, this is what I get:
$ cap capistrano_bug --dry-run
@carols10cents
carols10cents / oss.txt
Created September 1, 2011 23:12
Open Source Notes
Contributing to Open Source
===========================
First Rule: You can find the time
- It doesn't take much
- Weekends are good
- Find what other time you're wasting
- Try something that's _not_ your day job
Second Rule: What to contribute to?
@carols10cents
carols10cents / gist:1222234
Created September 16, 2011 14:29
OAuth::Problem: parameter_absent stack trace
[GEM_ROOT]/gems/oauth-0.4.5/lib/oauth/consumer.rb:181:in `request'
[GEM_ROOT]/gems/oauth-0.4.5/lib/oauth/consumer.rb:197:in `token_request'
[GEM_ROOT]/gems/oauth-0.4.5/lib/oauth/tokens/request_token.rb:18:in `get_access_token'
[GEM_ROOT]/gems/linkedin-0.3.1/lib/linked_in/helpers/authorization.rb:29:in `authorize_from_request'
app/models/linked_in_client.rb:39:in `authorize_access'
# Ok cool
<span class="fn"><a href="/users/hhhh" class="url">hhhh (<span class="nickname">hhhh</span>)</a></span>
@carols10cents
carols10cents / gist:1259231
Created October 3, 2011 14:38
Save the world ideas
1. Smile
2. No meat 1 day/week
3. Say Thank You
4. Work from home/carpool/take public transportation sometimes
5. See some trash, pick it up (literally and metaphorically)
6. Learn hacking in the physical world (buy vs build)
7. Vote
8.
9.
10. Share these ideas and others like them
@carols10cents
carols10cents / gist:1262342
Created October 4, 2011 18:08 — forked from colindean/gist:1261980
test generator failing
# Try this (minispec):
describe "not logged in" do
[:index, :new].each do |method|
it "should redirect to login on #{method}" do
get method
assert_redirect_to login_url
end
end
end