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" |
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
| $ 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
| 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
| 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
| import std.stdio; | |
| import std.socket; | |
| import std.string; | |
| import std.conv; | |
| import std.random; | |
| import std.outbuffer; | |
| import core.thread; | |
| int main() { | |
| auto s = new TcpSocket(); |
This file has been truncated, but you can view the full file.
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
| 11:58:24 write 0.000010 ruby | |
| 11:58:25 read 0.510431 W ruby | |
| 11:58:25 write 0.000010 ruby | |
| 11:58:25 ioctl 0.000027 W ruby | |
| 11:58:25 open lida/.rvm/gems/ruby-2.0.0-p247/gems/coderay-1.0.9/lib/coderay/tokens_proxy.rb 0.000036 ruby | |
| 11:58:25 fcntl 0.000002 ruby | |
| 11:58:25 fstat64 0.000004 ruby | |
| 11:58:25 fstat64 |
OlderNewer