This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
put_up_christmas_lights(:level => 2) | |
rescue fatal | |
safety = EmergencyResponse.new() | |
safety.deploy_safety_net | |
safety.call_paramedics | |
puts "HELP!" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin sprite($url, $height: 100, $width: 100, $x: 0, $y: 0) | |
display: block | |
height: $height | |
width: $width | |
background: url($url) | |
background-position: ($x * $width) ($y * $height) | |
// used like so | |
// @include sprite($url: "images/sprite.png", $x: -3, $y: -1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$narrow-device: "(max-width: 539px)" !default | |
$standard-device: "(min-width: 540px)" !default | |
$wide-device: "(min-width: 1200px)" !default | |
$retina-device: "(-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx)" !default | |
@mixin responds-to($device) | |
@if $device == wvp | |
@media #{ $wide-device } | |
@content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=set-type($base: 16px, $leading: 24px, $scale: 16px 18px 21px 24px 36px 48px) | |
body | |
font-size: percentage($base/16px) | |
h1 | |
font-size: #{ nth($scale, 6) / $base }em | |
// TODO: figure out how to choose how many | |
// baseline grid spaces to use for line height | |
line-height: #{ ($leading * 2) / nth($scale, 6) }em |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Drops, re-creates and re-migrates the database | |
# Usage: rake db:remigrate | |
namespace :db do | |
desc "Raise an error unless development environment" | |
task :dev_only do | |
raise "You can only use this in dev!" unless Rails.env == 'development' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=font-face($family, $file, $weight: normal, $style: normal) | |
@font-face | |
font-family: $family | |
src: url("#{ $file }.eot") | |
src: url("#{ $file }.eot?#iefix") format("embedded-opentype"), url("#{ $file }.woff") format("woff"), url("#{ $file }.ttf") format("truetype"), url("#{ $file }.svg#svg#{ $family }") format("svg") | |
font-weight: $weight | |
font-style: $style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html{ | |
background-image: linear-gradient(#0ff 1px, transparent 1px); | |
background-size: auto 1.5em; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 0; | |
/* Step 1: Choose a font-family */ | |
font-family: Georgia, serif; | |
/* Step 2: Choose a font size */ | |
font-size: 100%; | |
/* Step 3: Choose a line height (baseline grid unit) */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.assignment { | |
font-family: Georgia; | |
font-size: 24px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ------------------------------------------- helpers */ | |
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
background-color: rgba(0,0,0,0.1); | |
border: 1px solid rgba(0,0,0,0.1); | |
min-height: 3em; | |
} | |
.clearfix::after { |
OlderNewer