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 Outbox | |
@queue='v_redis' | |
def self.perform(userid,msgid) | |
$v_redis.set('ok',msgid+"*******") | |
get(userid,msgid) | |
end | |
def get(msg,msgid) | |
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
class Sth | |
def present | |
raise NotImplementedError | |
end | |
def log s | |
puts s | |
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
$ make | |
time ruby test.rb | |
4999999950000000 | |
5.20user 0.04system 0:05.25elapsed 99%CPU (0avgtext+0avgdata 119920maxresident)k | |
0inputs+0outputs (0major+12315minor)pagefaults 0swaps | |
rbx compile test.rb -o t.rbc | |
time rbx -e "Rubinius::CodeLoader.require_compiled 't'" | |
4999999950000000 | |
5.20user 0.00system 0:05.22elapsed 99%CPU (0avgtext+0avgdata 121152maxresident)k | |
0inputs+0outputs (0major+12387minor)pagefaults 0swaps |
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
def timeit name | |
begins = Time.now | |
yield | |
ends = Time.now | |
puts "running: #{name}, spend time: #{ends - begins}" | |
end | |
class MyData | |
def initialize(value) | |
@value = value |
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 'rails', '3.2.2' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
group :assets do | |
# gem 'sass-rails', " ~> 3.1.0" | |
gem 'sass-rails', git: "https://github.com/rails/sass-rails.git", :branch => '3-2-stable' | |
gem 'coffee-rails', " ~> 3.2.0" |
NewerOlder