Skip to content

Instantly share code, notes, and snippets.

💩
pu

Rachel Heaton rheaton

💩
pu
View GitHub Profile
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
$small-only: only screen and (max-width: 40em);
$small-up: only screen; // everything
$medium-only: only screen and (min-width: 40.0625em) and (max-width: 64em);
$medium-up: only screen and (min-width: 40.0625em);
$large-only: only screen and (min-width: 64.0625em) and (max-width: 90em);
$large-up: only screen and (min-width: 64.0625em);
@rheaton
rheaton / SassMeister-input.scss
Created Jun 15, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
$small-only: only screen and (max-width: 40em);
$small-up: only screen; // everything
$medium-only: only screen and (min-width: 40.0625em) and (max-width: 64em);
$medium-up: only screen and (min-width: 40.0625em);
$large-only: only screen and (min-width: 64.0625em) and (max-width: 90em);
$large-up: only screen and (min-width: 64.0625em);
@rheaton
rheaton / history.md
Last active Aug 29, 2015
Emerson: Problem Solving
View history.md

Browser history is hard. Even github can't get it right (I found a bug writing this: Click "Raw" and then go Back in Chrome).

##Scenario

AB test single-page-checkout vs. 3 step checkout with minimal code duplication for fewer bugs and chances to pollute the test. 3-step checkout is already in place and refactored using a combination of emerson views and traits.

<div data-view='checkout' data-checkout-path='checkout/customer'>
...
</div>
View application.html.erb
...
<body class='class-for-all-pages <%= body_classes%>'>
...
@rheaton
rheaton / Gemfile
Last active Aug 29, 2015
development ssl (rails 4)
View Gemfile
#...
# gem 'unicorn'
gem 'thin'
#...
@rheaton
rheaton / email_job.rb
Last active Dec 22, 2015
Base Resque Job For instance methods & correct term exception handling (b/c of rails's re-raising of errors with a different class).
View email_job.rb
# example job (for emails)
class EmailJob < Jobs::Base
@queue = :mailer
attr_reader :mailer, :params, :email_type
def initialize(mailer_class, email_type, params={})
@mailer = mailer_class.constantize
@params = params.with_indifferent_access
@email_type = email_type
end
@rheaton
rheaton / gist:5861191
Created Jun 25, 2013
background-size mixin using IE8 polyfill
View gist:5861191
@mixin ftm-background-size($background-size-value: contain, $background-size-value-y: 100%) {
$cover-or-contain: ($background-size-value == contain) or ($background-size-value == cover);
@if $cover-or-contain {
background-size: $background-size-value;
-webkit-background-size: $background-size-value;/* Safari 3.0 */
-moz-background-size: $background-size-value; /* Gecko 1.9.2 (Firefox 3.6) */
-o-background-size: $background-size-value; /* Opera 9.5 */
} @else {
background-size: $background-size-value $background-size-value-y;
-webkit-background-size: $background-size-value $background-size-value-y;/* Safari 3.0 */
@rheaton
rheaton / Gemfile
Last active Oct 6, 2015
emerson up and running in rails >= 3.2
View Gemfile
gem 'emerson'
@rheaton
rheaton / tracker_csv_export_to_pdf.rb
Created Mar 30, 2011
takes a csv file from tracker and makes story cards. be careful of the order when you are cutting them up.
View tracker_csv_export_to_pdf.rb
#!/usr/bin/env ruby
# Script to generate PDF cards suitable for planning poker
# from Pivotal Tracker [http://www.pivotaltracker.com/] CSV export.
# Inspired by Bryan Helmkamp's http://github.com/brynary/features2cards/
# Example output: http://img.skitch.com/20100522-d1kkhfu6yub7gpye97ikfuubi2.png
require 'rubygems'
You can’t perform that action at this time.