Skip to content

Instantly share code, notes, and snippets.

View kyrylo's full-sized avatar

Kyrylo Silin kyrylo

View GitHub Profile
~% time pry -e exit
pry -e exit 0.47s user 0.06s system 99% cpu 0.540 total
~%
~% pry --installed-plugins
Installed Plugins:
--
coolline Live syntax-highlighting for the Pry REPL
debugger Fast debugging with Pry.
debundle Allows you to use gems not in your Gemfile from Pry.
doc Provides YARD and extended documentation support for Pry

Constant lookup in Ruby can happen lexically or through the ancestry tree of the receiver(a class or module). You can identify which lookup rules are being applied by the context you're in or by the syntax being used to define a class or module.

A class body that is defined as class A::B::C; …; end will lookup constants through the ancestry tree when a constant is evaluated in its class body. Anytime you see A::B::C being used as syntax to define a class or lookup the value of a constant the ancestry tree is being used for the lookup.

@kyrylo
kyrylo / custom.css.css
Last active December 12, 2015 08:48 — forked from banister/custom.css.css
#button-babies {
position: relative;
margin: 0 -80px 1.5em 80px;
display: block;
float: left;
width: 700px;
text-align: center;
word-spacing: 8px;
font-size: 30px;
letter-spacing: -2px;
@kyrylo
kyrylo / gist:1683470
Created January 26, 2012 15:59
256 colors in the terminal
perl -e 'foreach $i (0..255) {printf("\e[38;5;$i"."m%03d\e[0m ",$i); }'