Skip to content
View BitOfUniverse's full-sized avatar

Sponsoring

@wevm

Block or report BitOfUniverse

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. multikimultikiPublic

    Run multiple async tasks and get results in sync fashion

    Ruby

  2. Ruby IFFE with method definition Ruby IFFE with method definition
    1
    senddefexecute_right_now
    2
    puts"That's nice!"
    3
    end
  3. Consistent splitting using hashing a...Consistent splitting using hashing and modulo
    1
    require'zlib'
    2
    3
    six_items=["item_1","item_2","item_3","item_4","item_5","item_6"]
    4
    ten_items=["item_1","item_2","item_3","item_4","item_5","item_6","item_7","item_8","item_9","item_10"]
    5
  4. Ruby IFFE usage in RailsRuby IFFE usage in Rails
    1
    classRailsController
    2
    helper_methoddefcurrent_user
    3
    User.current
    4
    end
    5
    end
  5. Ruby infinite lambda self invocationRuby infinite lambda self invocation
    1
    go_deeper.call.call.call.call.call.call.call.call
    2
    # You can try to implement it yourself. Your code will look like this:
    3
    4
    (go_deeper=->{puts"deeper";go_deeper}).call.call.call.call.call
  6. Ruby infinitely nested hashRuby infinitely nested hash
    1
    hash=Hash.new{|h,k| h[k]=Hash.new(&h.default_proc)}
    2
    hash[:this][:is][:really]='Amazing!'
    3
    hash
    4
    5
    =>{:this=>{:is=>{:really=>"Amazing!"}}}