Skip to content

Instantly share code, notes, and snippets.

View mtodd's full-sized avatar
🔐
[redacted]

Matt Todd mtodd

🔐
[redacted]
View GitHub Profile
From 0236c4cf9b61787413090365a6e42b29aadcb02d Mon Sep 17 00:00:00 2001
From: David Reiss <dreiss@facebook.com>
Date: Sun, 12 Sep 2010 21:30:40 -0700
Subject: [PATCH 20/50] THRIFT-925. cpp: Add _VALUES_TO_NAMES enum map
---
compiler/cpp/src/generate/t_cpp_generator.cc | 85 +++++++++++++++++++-------
lib/cpp/src/Thrift.h | 29 +++++++++
2 files changed, 91 insertions(+), 23 deletions(-)
@mtodd
mtodd / gist:949926
Created April 30, 2011 19:37
quantity-specs.log
quantity:activesupport-compatibility ruby-1.8.7$ gem install rspec -v "~> 1.2.9"
Fetching: rspec-1.2.9.gem (100%)
**************************************************
Thank you for installing rspec-1.2.9
Please be sure to read History.rdoc and Upgrade.rdoc
for useful information about this release.
**************************************************

ruby-metrics

use of the quantity gem conflicts with ActiveSupport's durations:

@rescale_window = 1.hour.to_seconds.to_i
@mtodd
mtodd / gist:941828
Created April 26, 2011 05:22
rake spec.log
thinking-sphinx:index-builder-sanitize_sql ruby-1.9.2$ rake spec
(in /Users/mtodd/Projects/Contributions/thinking-sphinx)
DEPRECATION WARNING: require "activerecord" is deprecated and will be removed in Rails 3. Use require "active_record" instead. (called from <top (required)> at /Users/mtodd/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-2.3.10/lib/activerecord.rb:2)
/Users/mtodd/.rvm/rubies/ruby-1.9.2-p180/bin/ruby -S bundle exec rspec "spec/thinking_sphinx/active_record/delta_spec.rb" "spec/thinking_sphinx/active_record/has_many_association_spec.rb" "spec/thinking_sphinx/active_record/scopes_spec.rb" "spec/thinking_sphinx/active_record_spec.rb" "spec/thinking_sphinx/adapters/abstract_adapter_spec.rb" "spec/thinking_sphinx/association_spec.rb" "spec/thinking_sphinx/attribute_spec.rb" "spec/thinking_sphinx/auto_version_spec.rb" "spec/thinking_sphinx/configuration_spec.rb" "spec/thinking_sphinx/context_spec.rb" "spec/thinking_sphinx/core/array_spec.rb" "spec/thinking_sphinx/core/string_spec.rb" "spec/thinking_s
@mtodd
mtodd / git.diff
Created March 22, 2011 02:10
git.diff
diff --git a/lib/fog/storage/aws.rb b/lib/fog/storage/aws.rb
index dfb66a0..0ec0d6d 100644
--- a/lib/fog/storage/aws.rb
+++ b/lib/fog/storage/aws.rb
@@ -65,7 +65,7 @@ module Fog
query << "AWSAccessKeyId=#{@aws_access_key_id}"
query << "Signature=#{CGI.escape(signature(params))}"
query << "Expires=#{params[:headers]['Date']}"
- "https://#{@host}/#{params[:path]}?#{query.join('&')}"
+ "#{@scheme}://#{@host}/#{params[:path]}?#{query.join('&')}"
LOGGER = lambda do |app|
lambda do |env|
puts "Request: %s %s" % [env[:method], env[:url].to_s]
app.call(env)
end
end
@mtodd
mtodd / .gitconfig
Created February 2, 2011 16:01
Put this in ~/.gitconfig
[alias]
st = status
ci = commit
co = checkout
br = branch
b = branch
track = checkout -b
s = stash
d = diff
a = add .
helpers do
def format
(params[:format] || :json).to_sym
end
def render_to(format, results)
case format
when :json
results.to_json
when :xml
commit 6025b58e00cc93501049f1ad43b0a1d16ba69c86
Author: Matt Todd <chiology@gmail.com>
Date: Mon Jan 3 22:05:15 2011 -0500
Add failing spec for filters missing route params
diff --git a/test/filter_test.rb b/test/filter_test.rb
index ef7e9ae..e4d1966 100644
--- a/test/filter_test.rb
+++ b/test/filter_test.rb