I hereby claim:
- I am dinks on github.
- I am dinks (https://keybase.io/dinks) on keybase.
- I have a public key whose fingerprint is D872 3799 C467 BC06 6591 DAE0 75E9 3E8C 90F0 C705
To claim this, I am signing this object:
a = [1, 2] # [1, 2] | |
a.object_id # 70364895085700 | |
a << 3 # [1, 2, 3] | |
a.object_id # 70364895085700 | |
h = {} # {} | |
h[a] = true # true | |
h # {[1, 2, 3]=>true} | |
h[a] # true |
# qux.rb | |
Qux = "I'm at the root!" | |
# foo.rb | |
module Foo | |
end | |
# foo/qux.rb | |
module Foo | |
Qux = "I'm in Foo!" |
# Memoize with extend | |
module Memoize | |
def memoize(method) | |
unmemoized_name = :"__unmemoized_#{method}" | |
alias_method unmemoized_name, method | |
define_method method do | |
@__memoized_results ||= {} |
module AA | |
def hi | |
end | |
end | |
class A | |
include AA | |
end | |
class B |
I hereby claim:
To claim this, I am signing this object:
bundle show | wc -l |
require 'rspec/core/formatters/base_text_formatter' | |
# Custom Rspec formatter | |
# bundle exec rspec --require ./hearts_formatter.rb --format HeartsFormatter | |
# | |
class HeartsFormatter < RSpec::Core::Formatters::BaseTextFormatter | |
DOT_SUCCESS = "💚" | |
DOT_PENDING = "💛" | |
DOT_FAILURE = "💔" |
<VirtualHost *:80> | |
ServerName app | |
ServerAlias app.dev app.local | |
DocumentRoot /opt/app/public | |
PassengerRuby /home/user/ruby-wrapper.sh | |
PassengerMinInstances 1 | |
PassengerMaxPoolSize 3 | |
PassengerUser user | |
RailsBaseURI / |
[color] | |
ui = true | |
[difftool "sourcetree"] | |
cmd = opendiff \"$LOCAL\" \"$REMOTE\" | |
path = | |
[mergetool "sourcetree"] | |
cmd = /opt/homebrew-cask/Caskroom/sourcetree/2.0.4/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" | |
trustExitCode = true | |
[alias] | |
co = checkout |
# Always use lazy! | |
(0..3).lazy.cycle.map {|x| x * 10}.take(5).to_a | |
# Without lazy, the program wont stop! |