Skip to content

Instantly share code, notes, and snippets.

Chris Eppstein chriseppstein

Block or report user

Report or block chriseppstein

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:13840
.field
Display Name:
= h @user.name
= link_to "edit", edit_user_url(@user, :field => "name")
.field
Your Email:
= h @user.email
= link_to "edit", edit_user_url(@user, :field => "email")
.field
Password:
View Example Sinatra stylesheet action.rb
get "/stylesheets/screen.css" do
content_type 'text/css'
# Use views/stylesheets & blueprint's stylesheet dirs in the Sass load path
sass :"stylesheets/screen", :sass => Compass.sass_engine_options
end
View rounded_corners.sass
// round corners (base)
= border-radius(!radius = 10px)
-moz-border-radius= !radius
-webkit-border-radius= !radius
border-radius= !radius
// top rounded corners
= border-top-radius(!radius = 10px)
+border-top-left-radius(!radius)
+border-top-left-radius(!radius)
View gist:70617
def f(ra,n)
r=0
ra.each {|x| r+=1 if x.include? n}
r
end
def g(ra, n)
ra.inject(0){|m, x| m + (x.include?(n) ? 1 : 0) }
end
View sass_template_handler.rb
module ActionView
class ErSass < ActionView::TemplateHandler
include ERB::Util
def self.call(template)
"ActionView::ErSass.new(self).render(template, local_assigns)"
end
def initialize(view = nil)
@view = view
View screen.sass
@import compass/reset.sass
@import blueprint.sass
@import blueprint/modules/form.sass
@import blueprint/modules/liquid.sass
@import compass/layout.sass
@import compass/utilities.sass
@import icons.sass
+blueprint-typography
+blueprint-utilities
View gist:95971
@import compass/utilities/general/inline_block.sass
.my-nav
.tabs
li
:border none
.tab_l, .tab_t, .tab_r
+inline-block
:background-repeat no-repeat
:height 35px
:color red
View my_grid.sass
@import 960/grid.sass
#gallery
+grid-container
// Or whatever gallery wrapper white padding used to be
padding: 1em 0
background-color: white
#images
+grid(9,12)
View compass.config
# config/compass.rb
# Require any additional compass plugins here.
project_type = :rails
project_path = RAILS_ROOT if defined?(RAILS_ROOT)
css_dir = "public/stylesheets/compiled"
sass_dir = "app/stylesheets"
images_dir = "public/images"
javascripts_dir = "public/javascripts"
output_style = :compact
http_images_path = "/public/images"
View gist:129758
//
Full stylesheet for Winston
License: see LICENSE packaged with Winston
the same license counts for each module separately
Desc: This is the full Winston stylesheet. It is recommended
to only take the parts you need in orde to minimize the
amount of CSS in your project.
You can’t perform that action at this time.