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
| require 'benchmark' | |
| arr = [*0..99999] | |
| num = 100 | |
| Benchmark.bmbm do |x| | |
| x.report("sym#to_proc") do | |
| num.times do | |
| arr.each(&:to_i) | |
| 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
| function gg { freyr $@ --config-file="/web/Freyrfile" --ignore-local --namespace=gg; } |
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
| <a href="#" class="button h64" id="buy_package_1234"> | |
| <div class="left bg"></div> | |
| <div class="right bg"></div> | |
| <span class="text">Buy</span> | |
| </a> |
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
| >> m = Match.first | |
| => #<Match _id: 4d9bce2458f68fbb67000001, user_ids: [1, 2], _id: BSON::ObjectId('4d9bce2458f68fbb67000001'), _type: nil> | |
| >> m.players.create(:user_id => 1) | |
| NoMethodError: undefined method `name' for nil:NilClass |
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 Sequel::Model | |
| def sql_literal(dataset=nil) | |
| self.pk | |
| 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
| module Log | |
| LOGS = Hash.new {|h,k| h[k] = Logger.new("log/#{k}.log")} | |
| extend self | |
| def method_missing name | |
| LOGS[name] | |
| 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
| [alias] | |
| co = checkout | |
| ci = commit | |
| s = status -sb | |
| revert-to = read-tree -u -m HEAD | |
| sd = svn dcommit | |
| sr = svn rebase | |
| br = branch | |
| df = diff | |
| ff = rebase --stat @{upstream} |
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 Abc | |
| def foo *args | |
| puts 'foo', args | |
| end | |
| def run | |
| load '2.rb' | |
| 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
| _ruby_gem_path rvm_ruby_global_gems_path rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_load_path rvm_ruby_major_version rvm_ruby_make rvm_ruby_make_install rvm_ruby_minor_version rvm_ruby_mode rvm_ruby_name rvm_ruby_package_file rvm_ruby_package_name rvm_ruby_patch rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_require rvm_ruby_revision rvm_ruby_selected_flag rvm_ruby_sha rvm_ruby_string rvm_ruby_strings rvm_ruby_tag rvm_ruby_url rvm_ruby_user_tag rvm_ruby_version rvm_script_name rvm_scripts_path rvm_sdk rvm_user_install_flag rvm_silent_flag rvm_src_path rvm_sticky_flag rvm_system_flag rvm_tmp_path rvm_token rvm_trace_flag rvm_use_flag rvm_user_flag rvm_user_path rvm_usr_path rvm_verbose_flag rvm_wrapper_name rvm_wrappers_path rvm_ruby_repo_branch rvm_man_path | |
| ++ /scripts/base : 29 > case "rvm_base_except" in | |
| ++ /scripts/base : 34 > source /Users/tatlas/.rvm/scripts/selector | |
| ++ /scripts/base : 40 > scripts=(logging utility init cleanup env rvmrc install environment |