This file contains hidden or 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
// Make a sauce for the headline... | |
var headlineSauce = new Sauce(); | |
headlineSauce.recipe(function(element){ | |
element.change("y").from(-200).using(Easie.bounceOut); | |
element.change("scale").from(0).using(Easie.circOut); | |
}); | |
headlineSauce.duration(1).delay(1).putOn("sauce"); | |
// Make a sauce for the tagline... | |
var taglineSauce = new Sauce(); |
This file contains hidden or 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
# FairTax vs. Progressive Income Tax | |
# DISCLAIMER: This of too simple and doesn't take the rebate/prebates into | |
# account but illustrates how consumption based taxation can be regressive. | |
# Current income tax brackets would be the equivalent of 16.9% of income for the middle fifth | |
# and 23.74% for the upper fifth. | |
# http://www.moneychimp.com/features/tax_brackets.htm | |
# Results in $7,361 on $44,943 of earnings. |
This file contains hidden or 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
# Just an example. | |
# @video is a direct reference to a '<video>' element. | |
# $() is assuming jQuery is being used in this example. | |
@video.addEventListener("loadedmetadata", (event) => | |
actualRatio = @video.videoWidth/@video.videoHeight | |
targetRatio = $(@video).width()/$(@video).height() | |
adjustmentRatio = targetRatio/actualRatio | |
$(@video).css("-webkit-transform","scaleX(#{adjustmentRatio})") | |
) |
This file contains hidden or 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
# To use this script run: | |
curl -O https://raw.github.com/gist/1395181/d9147fd2aa0ca24ec609c188438d1eec60f8ffb4/bootstrap.sh; chmod +x bootstrap.sh; sudo ./bootstrap.sh | |
# Also the script assumes a group with admin privileges | |
# called admin already exists. If it does not you may want | |
# to check by running visudo: | |
# | |
# Create sudo group: | |
# (may not be necessary LTS now has admin group by default) | |
visudo |
This file contains hidden or 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 rounded($side, $radius: 10px) { | |
border-#{$side}-radius: $radius; | |
-moz-border-radius-#{$side}: $radius; | |
-webkit-border-#{$side}-radius: $radius; | |
} | |
@mixin round($radius: 10px) { | |
border-radius: $radius; | |
-moz-border-radius: $radius; | |
-webkit-border-radius: $radius; |
This file contains hidden or 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
$.ajax({ | |
url: url | |
data: | |
cuepoints: @player.cuepoints | |
type: "POST" | |
dataType: "json" | |
error: (jqXHR, textStatus, errorThrown) => | |
@player.errorFlashMessage.html("There was a problem saving the cuepoint data at this time.") | |
@player.container.addClass(@player.errorClass) | |
@removeSpinner() |
This file contains hidden or 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
/** | |
* CSS3 Gradient Pixel/Percentage Mix-n-Match Example | |
*/ | |
background: #f06; | |
background: linear-gradient(left, #f00 10px, #444 20px, #3465a4 21px, #203388 10rem, #204a87 100%); | |
min-height:100%; | |
background: #426fa9; |
This file contains hidden or 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
class @Animator | |
@generate: (params={}) -> | |
animation = "@-#{Animator.prefix()}-keyframes #{params["name"]} {" | |
for keyframe, rules of params["keyframes"] | |
animation += "#{keyframe} {" | |
for property,value of rules | |
animation += "#{property.replace("prefix",Animator.prefix())}: #{value};" | |
animation += "}" | |
animation += "}" | |
This file contains hidden or 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
group :development, :test do | |
gem 'rspec-rails' # Use rspec to do our integration tests. | |
gem 'factory_girl_rails' # Factory girls makes it easy to mock objects for our tests. | |
gem 'capybara' # Capybara lets us drive our integration tests via headless browser. | |
gem 'launchy' # Launchy let's us launch the current state of the app in the browser if we need to diagnose. | |
gem 'database_cleaner' # Necessary for undoing transactions in the database during our integration tests. | |
gem 'sqlite3' | |
gem 'evergreen', :require => 'evergreen/rails' | |
gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i | |
gem 'guard-rspec' |
This file contains hidden or 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
<!DOCTYPE html> | |
<html class="mediaqueries"> | |
<head> | |
<style type="text/css" media="screen" src="..."></style> | |
</head> | |
<body> | |
... | |
<a href="#" id="mediaToggle">View the full site.</a> | |
</body> | |
</html> |