- agilezen
- flexmls_api
- freckly
- gowalla
- gstock
- mad_mimi
- mlb
- octokit
- open311
- t
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
commit 719d2cddb8452d2252b221b0f82918113ddda6ff | |
Author: Erik Michaels-Ober <[email protected]> | |
Date: Sat Mar 17 09:17:20 2012 -0600 | |
New Rails engine | |
diff --git a/.gitignore b/.gitignore | |
index eb3489a..1dfe31e 100644 | |
--- a/.gitignore | |
+++ b/.gitignore |
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
# Helper function that returns a number with its correct indefinite article | |
# e.g. number_with_indefinite_article(10) #=> "a 10" | |
# e.g. number_with_indefinite_article(80, "$") #=> "an $80" | |
def number_with_indefinite_article(number, prefix=nil) | |
[indefinite_article_for_number(number), " ", prefix, number].compact.join | |
end | |
# Helper function that returns the correct indefinite article for a number | |
# e.g. indefinite_article_for_number(10) #=> "a" | |
# e.g. indefinite_article_for_number(80) #=> "an" |
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 "rubygems" | |
require "rbench" | |
class A | |
def initialize(hash={}) | |
hash.each do |key, value| | |
instance_variable_set(:"@#{key}", value) | |
end | |
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
iterations = 100 | |
test_file = "#{File.dirname(__FILE__)}/benchmark.md" | |
implementations = [ | |
{class_name: 'BlueCloth', gem_name: 'bluecloth', require_name: 'bluecloth'}, | |
{class_name: 'RDiscount', gem_name: 'rdiscount', require_name: 'rdiscount'}, | |
{class_name: 'Maruku', gem_name: 'maruku', require_name: 'maruku'}, | |
{class_name: 'PEGMarkdown', gem_name: 'rpeg-markdown', require_name: 'peg_markdown'}, | |
] | |
# Attempt to require each implementation and remove any that are not |
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
ruby-1.9.2-head :001 > a = {} | |
=> {} | |
ruby-1.9.2-head :002 > a["☃"] = 1 | |
=> 1 | |
ruby-1.9.2-head :003 > a | |
=> {"☃"=>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
source 'http://rubygems.org' | |
gem 'sinatra' | |
gem 'nokogiri' | |
gem 'multi_xml' | |
gem 'slim' |
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
Day Job: Fellow at Code for America | |
Open Source contribution: lots of gems: rails_admin, omniauth, multi_xml, multi_json, faraday, twitter, simple_oauth, oauth2, octokit, and many more. | |
Tell me about your experience with Ruby/Rails: I started using Rails in 2006, shortly after version 1 was released. I then switched to primarily using Merb in 2008 and released my first Open Source project on GitHub: MerbAdmin. I then switched back after Rails 3 was released and oversaw the porting of MerbAdmin to Rails 3 as a Ruby Summer of Code mentor. | |
How do you use GitHub: GitHub is my life. | |
Favorite luchador(es): I must confess, I know almost nothing about lucha libre. |
- bundler
- aavkontakte
- AbsoluteRenamer
- accessible_attributes
- accumulators
- active_diigo
- activerecord-mysql2legacydb-adapter
- active_record_shards
- activerecord-simpledb-adapter
- activerecord-table_version
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'rubygems/remote_fetcher' | |
file = "Marshal.#{Gem.marshal_version}.Z" | |
# uri = URI.parse "http://gems.rubyforge.org/#{file}" | |
# data = Gem::RemoteFetcher.fetcher.fetch_path uri | |
data = File.read(file) |