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 | |
| /[if lt IE 7] | |
| | <html class="ie6"> | |
| /[if IE 7] | |
| | <html class="ie7"> | |
| /[if IE 8] | |
| | <html class="ie8"> | |
| /[if IE 9] | |
| | <html class="ie9"> | |
| | <!--[if (gte IE 9)|!(IE)]<!--> <html> <!--<![endif]--> |
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
| ### Testing if the client is a mobile or a desktop. | |
| ### The selection is based on the usual UA strings for desktop browsers. | |
| ## Testing a user agent using a method that reverts the logic of the | |
| ## UA detection. Inspired by notnotmobile.appspot.com. | |
| map $http_user_agent $is_desktop { | |
| default 0; | |
| ~*linux.*android|windows\s+(?:ce|phone) 0; # exceptions to the rule | |
| ~*spider|crawl|slurp|bot 1; # bots | |
| ~*windows|linux|os\s+x\s*[\d\._]+|solaris|bsd 1; # OSes |
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
| function check_compression { | |
| local unzipped=`curl "$1" --silent --write-out "%{size_download}" --output /dev/null` | |
| local zipped=`curl -H "Accept-Encoding: gzip,deflate" "$1" --silent --write-out "%{size_download}" --output /dev/null` | |
| echo "unzipped size: $unzipped, zipped size: $zipped" | |
| } |
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
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
| For those folks not already hanging out in #documentcloud... here's the log of this afternoon's Ember/Backbone politics discussion. | |
| 12:21 PM <wycats> jashkenas: hey | |
| 12:21 PM <wycats> jashkenas: I'm sorry | |
| 12:21 PM <wycats> how would you like me to describe backbone? | |
| 12:21 PM <wycats> let's work this out for once and for all :) | |
| 12:21 PM <wycats> I'm definitely not intentionally saying incorrect things about backbone | |
| 12:22 PM • knowtheory gets out popcorn | |
| 12:24 PM <jashkenas> don't worry about it too much -- I'm just not terribly pleased with backbone being continued to be used as the strawman... | |
| 12:24 PM <wycats> jashkenas: I am worried about it a lot |
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
| # Apart from the basic niceties of being able to leave off | |
| # parens in clear calls... | |
| print 10 | |
| alert "Hello #{name}" | |
| # ... the reason why they're important to have in CoffeeScript | |
| # is because it allows our "block" syntax (single function body |
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
| app = node[:rails][:app] | |
| rails_base app[:name] do | |
| ruby_ver app[:ruby_ver] | |
| gemset app[:gemset] | |
| end | |
| %w{config log pids cached-copy bundle system}.each do |dir| | |
| directory "#{app[:app_root]}/shared/#{dir}" do | |
| owner app[:deploy_user] |