Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/indirect/dotfiles. strap.mikemcquaid.com
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142if defined?(IRB) IRB.conf[:AUTO_INDENT] = trueend
Dir[File.expand_path("~/.irbd/*.rb")].each{|f| require f }
module Kernel def pbpaste `pbpaste` end
def pbcopy(object) IO.popen('pbcopy', 'w') { |pb| pb << object.to_s } end
def pbfilter(filter) pbcopy pbpaste.split("\n").select{|l| l =~ filter }.join("\n") endend
class Object def local_methods self.methods.tap do |methods| self.class.ancestors.each do |ancestor| next if ancestor == self.class methods -= ancestor.instance_methods end end.sort endend
module Enumerable def histogram(&block) h = Hash.new(0) each do |entry| key = block_given? ? yield(entry) : entry h[key] += 1 end h endend