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
./configure \ | |
--pid-path=/var/run/nginx.pid \ | |
--lock-path=/var/lock/nginx.lock \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--user=www-data \ | |
--group=www-data \ | |
--without-mail_pop3_module \ | |
--without-mail_imap_module \ | |
--without-mail_smtp_module \ | |
--without-http_fastcgi_module \ |
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
# Como usarlo: | |
# ruby sleep.rb "6:15 AM" | |
# ruby sleep.rb | |
require 'date' | |
require 'time' | |
desired_hour = ARGV.first || "7 AM" | |
wakeup_at = Time.parse("#{Date.today} #{desired_hour}") |
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
module MyApp | |
# See ActiveSupport::Cache::Store for documentation. | |
module Cache | |
class << self | |
def fetch(key, options = {}, &block) | |
if block_given? | |
if ActionController::Base.perform_caching && options && options[:expires_in].to_i > 0 | |
Rails.cache.fetch(key, options, &block) | |
else | |
yield |
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
class Una | |
def get | |
"Esta es una prueba" | |
end | |
end | |
dos = Class.new(Una) do | |
def get | |
"desde aca" | |
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
ruby-1.9.2-p180 :009 > driver.projects.first.tickets | |
RuntimeError: can't typecast "252" | |
from /Users/ecruz/.rvm/gems/ruby-1.9.2-p180@panorama/gems/activesupport-3.0.6/lib/active_support/core_ext/hash/conversions.rb:96:in `typecast_xml_value' | |
from /Users/ecruz/.rvm/gems/ruby-1.9.2-p180@panorama/gems/activesupport-3.0.6/lib/active_support/core_ext/hash/conversions.rb:118:in `block in typecast_xml_value' | |
from /Users/ecruz/.rvm/gems/ruby-1.9.2-p180@panorama/gems/activesupport-3.0.6/lib/active_support/core_ext/hash/conversions.rb:117:in `each' | |
from /Users/ecruz/.rvm/gems/ruby-1.9.2-p180@panorama/gems/activesupport-3.0.6/lib/active_support/core_ext/hash/conversions.rb:117:in `inject' | |
from /Users/ecruz/.rvm/gems/ruby-1.9.2-p180@panorama/gems/activesupport-3.0.6/lib/active_support/core_ext/hash/conversions.rb:117:in `typecast_xml_value' | |
from /Users/ecruz/.rvm/gems/ruby-1.9.2-p180@panorama/gems/activesupport-3.0.6/lib/active_support/core_ext/hash/conversions.rb:78:in `from_xml' | |
from /Users/ecruz/.rvm/gems/ruby-1 |
NewerOlder