Skip to content

Instantly share code, notes, and snippets.

@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 10, 2024 20:23
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@mattbrictson
mattbrictson / Gemfile
Created September 11, 2015 15:55
Using vcr with Minitest + Rails (test unit style)
group :test do
gem "minitest"
gem "vcr"
gem "webmock", "~> 1.15.0"
end
@lbspen
lbspen / gist:5674563
Created May 29, 2013 23:11
Select date and time for capybara-rspec from rails forms
def select_date(date, options = {})
field = options[:from]
base_id = find(:xpath, ".//label[contains(.,'#{field}')]")[:for]
year, month, day = date.split(',')
select year, :from => "#{base_id}_1i"
select month, :from => "#{base_id}_2i"
select day, :from => "#{base_id}_3i"
end
def select_time(hour, minute, options = {})
@rstacruz
rstacruz / index.md
Last active November 3, 2023 09:56
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one