This file contains 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
class Animal | |
def self.noise=(sound) | |
@noise = sound | |
end | |
def self.noise | |
@noise | |
end | |
def speak |
This file contains 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
http://www.evertype.com/standards/euro/formats.html |
This file contains 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 -w | |
require 'json' | |
repos = JSON.parse(File.read('repos')).map {|e| e['name']} | |
repos.each do |repo| | |
puts "=== #{repo}" | |
`git clone mas:#{repo} ex/#{repo}` | |
end |
This file contains 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
find app config db spec test -type f -name '*.rb' -or -name '*.coffee' -or -name '*.erb' -or -name '*.jbuilder' -or -name '*.js' | xargs sed -i '' -E "s/[[:space:]]*$//" |
This file contains 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
{ | |
{I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It's|It is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as you did, the {internet|net|web} will be {much more|a lot more} useful than ever before.| | |
I {couldn't|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!| | |
{I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch} your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you've} any? {Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may just|may|could} subscribe. Thanks.| | |
{It is|It's} {appropriate|perfect|the best} time to make some plans for the future and {it is|i |
This file contains 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
config.after(:each) do | |
if Capybara.current_driver != :rack_test && page.driver.error_messages.present? | |
puts example.metadata[:description_args] | |
end | |
end |
This file contains 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
Completed 500 Internal Server Error in 1867ms | |
NoMethodError (undefined method `include?' for nil:NilClass): | |
app/models/user.rb:121:in `svn_password_must_be_acceptable' |
This file contains 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
def routes(engine_name) | |
require 'rails/application/route_inspector' | |
puts Rails::Application::RouteInspector.new.format("#{engine_name}::Engine".constantize.routes.routes, nil) | |
end |
This file contains 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
TO RANDOMBATTLE | |
MAKE "VARFIGHT RANDOM 4 | |
IF :LEVELONE = 1 THEN LEVELONEDMG | |
IF :LEVELTWO = 1 THEN LEVELTWODMG | |
IF :LEVELTHREE = 1 THEN LEVELTHREEDMG | |
IF :LEVELFOUR = 1 THEN LEVELFOURDMG | |
IF :VARFIGHT = 0 THEN ELVENWARRIORS | |
IF :VARFIGHT = 1 THEN WEASEL | |
IF :VARFIGHT = 2 THEN TROGLODYTEADEPT | |
IF :VARFIGHT = 3 THEN ETTIN |
This file contains 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
def activated=(bool) | |
activate! | |
self[:activated] = true # if you want to persist this field | |
end | |
def activate! | |
# stuff you want done | |
end |
NewerOlder