Skip to content

Instantly share code, notes, and snippets.

@renz45
renz45 / cleverButton.sass
Created August 6, 2011 23:03 — forked from olivierlacan/cleverButton.css.sass
cleverButton Sass mixin for Compass
// original cleverButtons by Olivier Lacan & Andrew Smith (http://clevercode.net)
// modified by Adam Rensel
//edge can be: glow, stark, 3d, 3dLight
//border can be: solid, twoTone
=cleverButton($radius : 5px, $textcolor : white, $from : #aaa, $to : #666, $edge : "3dLight", $border : "solid")
// adjustable settings for padding
padding: 0.3em .9em 0.3em
@renz45
renz45 / responsiveMixins.sass
Created September 23, 2011 21:47
Sass mixins I use for responsive design to calculate width percents quickly
//responsive Design mixins, it's recommended that if you need a different
//pageWidth than the default of 960px that proxy functions be made to change the default ex:
// =rwidth1($width)
// +rwidth($width, 800px)
//
//this makes it faster to use
//calculates a percentage based width based on the pageWidth constant and the given width
=rwidth($width,$pageWidth : 960px)
/*! #{$width}/#{$pageWidth}*/
@renz45
renz45 / clever_panel.sass
Created September 23, 2011 21:50
styled panel mixin, based on the clever button
// based on the original cleverButtons by Olivier Lacan & Andrew Smith (http://clevercode.net)
// I tweaked it work for simple panels
// modified by Adam Rensel
//edge can be: glow, stark, 3d, 3dLight
//border can be: solid, twoTone
=cleverPanel($radius : 5px, $textcolor : white, $from : #aaa, $to : #666, $edge : "3dLight", $border : "solid")
// adjustable settings for padding
@renz45
renz45 / base.sass
Created September 23, 2011 21:53
base starting css
@import compass/reset
body
font: 62.5%/1 Helvetica, Arial, Sans-Serif
h1,h2,h3,strong
font-weight: bold
h1
font-size: 3em
after_initialize :init_many_to_many_counters
def init_many_to_many_counters
setup_many_to_many_counts(:categories, :tags)
end
# == Schema Information
#
# Table name: posts
#
# id :integer not null, primary key
# title :string(255)
# content :text
# user_id :integer
# slug :string(255)
# created_at :datetime
@renz45
renz45 / .pryrc
Created January 5, 2012 01:15
Pry configuraton
#switch default editor for pry to sublime text
Pry.config.editor = "sublime"
#format prompt to be <Rails version>@<ruby version>(<object>)>
Pry.config.prompt = proc do |obj, level, _|
prompt = "\e[1;30m"
prompt << "#{Rails.version} @ " if defined?(Rails)
prompt << "#{RUBY_VERSION}"
"#{prompt} (#{obj})>\e[0m"
end
@renz45
renz45 / params.rb
Created January 23, 2012 14:46 — forked from codeschool-courses/params.rb
Rails for Zombies 2 - Challenge 3-7
# Here is the parameters hash sent into the controller
params = { zombie_id: 2, id: 1 }
@renz45
renz45 / An_example.markdown
Last active December 4, 2016 21:01
Re-style Sublime Text 2 sidebar to a darker theme

This re-styles your sublime text 2 sidebar to be darker, so it doesn't blind you when using a dark theme.

Dark sublime text 2 sidebar

Save the Default.sublime-theme file into packages/user

@renz45
renz45 / config.ru
Created February 29, 2012 17:52
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
# Run this file with `RAILS_ENV=production rackup -p 3000 -s thin`
# Be sure to have rails and thin installed.
require "rubygems"
require "rails"
# Let's load only action controller. If you want
# to use active record, just require it as well.
require "action_controller/railtie"
class MyApp < Rails::Application