Skip to content

Instantly share code, notes, and snippets.

@nheinrich
nheinrich / gist:3941276
Created October 23, 2012 20:19
Deploy a middleman app to heroku
@nheinrich
nheinrich / gist:1304802
Created October 21, 2011 20:02
Attempt at a background texture mixin for a project
// _colors.sass
$bg_blue: #6ec2d8
$bg_green: #6db933
$bg_orange: #ff5924
$bg_yellow: #e9f82e
// _mixins.sass
= textured($color)
background: eval("$bg_#{$color}") image_url("textures/#{$color}.png")
@nheinrich
nheinrich / gist:1171939
Created August 25, 2011 21:03
Using Sass & Compass in Rails 3.1

app/assets/stylesheets/application.css

/*
  *= require "application/all"
*/

app/assets/stylesheets/application/_all.sass

@nheinrich
nheinrich / Sassy Buttons.textile
Created January 16, 2011 03:07
Keep your buttons sassy and defined once.

Rails

Template Usage

= fancy_button("Create Goal", new_goal_url, :class => 'create')

Helper

def fancy_button *args
  name = args.first
@nheinrich
nheinrich / Grid Overlay.textile
Created January 14, 2011 03:44
add a custom grid overlay button to your site unless it's in production

grid.html.haml

%section.grid
  .site
    .gutter 25
    .column 166
    .gutter 25
    .column 166      
    .gutter 25
    .column 166
@nheinrich
nheinrich / Rails SASS Architecture.textile
Created January 13, 2011 00:52
An overview of SASS/Compass architecture in Rails. Know which styles affect which pages, avoid CSS kudzu.