I hereby claim:
- I am rmm5t on github.
- I am rmm5t (https://keybase.io/rmm5t) on keybase.
- I have a public key whose fingerprint is 79DA 34B8 A2E7 3C96 E0CC 5BB2 005A C77D 7CBF 3EAF
To claim this, I am signing this object:
puts "Holy crap, Batman, this is freakin' wicked!" |
source 'https://rubygems.org' | |
ruby '2.1.2' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.1.6' | |
gem 'sqlite3' | |
## Assets | |
gem "sprockets-rails", "~> 2.1.3" | |
# Use SCSS for stylesheets |
# Courtesy @zenspider | |
# http://exercism.io/submissions/b0613bbac84cd95fcad40e6b | |
class Hamming0 | |
def self.compute s1, s2 | |
length = [s1.length, s2.length].min | |
length.times.count { |i| s1[i] != s2[i] } | |
end | |
end |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
# Example Usage: | |
# vcard2asterisk *.vcf | |
# vcard2asterisk http://getvcard.com/dogetvcard.asp?UID=LD7U7mM | |
require 'rubygems' | |
require 'vpim/vcard' | |
def format_phone_number(phone) |
;;; Load twittering mode. | |
(require 'twittering-mode) | |
(load "~/.pw/twittering-pw.el" 'noerror) |
# Helper controller macros that define: | |
# on_get, on_post, on_put, on_delete | |
module ControllerMacros | |
[:get, :post, :put, :delete].each do |method| | |
class_eval <<-RUBY | |
def on_#{method}(action, options = {}, &block) | |
on_http_method(#{method.inspect}, action, options, &block) | |
end | |
RUBY |
module ControllerMacros | |
[:get, :post, :put, :delete].each do |method| | |
class_eval <<-RUBY | |
def on_#{method}(action, options = {}, &block) | |
on_http_method(#{method.inspect}, action, options, &block) | |
end | |
RUBY | |
end | |
def on_http_method(method, action, options = {}, &block) |
#!/usr/bin/env ruby | |
Package = Struct.new(:name, :path, :main, :globs) | |
packages = | |
[ | |
Package.new("ruby", "~/external/ruby-1.8.7-p72", "README", %w(*.c lib/**/*.rb)), | |
Package.new("rails", "~/external/rails", "railties/README", %w(*/README */lib/**/*)), | |
Package.new("shoulda", "~/external/shoulda", "README.rdoc", %w(lib/**/*.rb)) | |
] |
class Test::Unit::TestCase | |
# Ensures that the model has a method named scope_name that returns a NamedScope object with the | |
# proxy options set to the options you supply. scope_name can be either a symbol, or a method | |
# call which will be evaled against the model. The eval'd method call has access to all the same | |
# instance variables that a should statement would. | |
# | |
# Options: Any of the options that the named scope would pass on to find. | |
# | |
# Example: | |
# |