- Performance evaluation. Without minification and gzip, you can't always make accurate decisions regarding filesize changes, or do reasonable network speed testing locally.
- Cache-busting. By compiling your files and saving them with unique names, you're removing the need to clear the browser cache when testing on mobile devices and in older IE.
- Catching bugs.
- This is rarer now than it used to be, but uglify has historically created occasional issues in IE8. Better to catch them locally than on integration.
- Running in production mode exposes problems related to explicit filenames, since a production deploy can change filenames and break related code.
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
# just add these lines to development.rb | |
config.assets.debug = false | |
config.serve_static_assets = true | |
config.assets.js_compressor = :uglifier | |
config.assets.digest = true | |
# then on the command line | |
rake assets:precompile && rails s |
Create a shallow clone with the last fifty commits.
git clone --depth 50 some-repository
Open the current diff in the editor.
git add -e
View ALL branches:
git branch -a master
Fetch changes from all remote repositories.
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
=distribute($property, $min, $max, $start, $end, $precision, $metric) | |
#{$property}: $min | |
// get the range we're operating on | |
$range: $end - $start | |
// get the number of iterations we need to run by seeing how precise we should be | |
$loops: strip-units(ceil($range / $precision)) - 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
▓█████▄ ▒█████ █ ██ ▄████ ▄▄▄ ██▒ █▓▓█████ ██▀███ ▓██ ██▓ | |
▒██▀ ██▌▒██▒ ██▒ ██ ▓██▒ ██▒ ▀█▒ ▒████▄ ▓██░ █▒▓█ ▀ ▓██ ▒ ██▒▒██ ██▒ | |
░██ █▌▒██░ ██▒▓██ ▒██░▒██░▄▄▄░ ▒██ ▀█▄▓██ █▒░▒███ ▓██ ░▄█ ▒ ▒██ ██░ | |
░▓█▄ ▌▒██ ██░▓▓█ ░██░░▓█ ██▓ ░██▄▄▄▄██▒██ █░░▒▓█ ▄ ▒██▀▀█▄ ░ ▐██▓░ | |
░▒████▓ ░ ████▓▒░▒▒█████▓ ░▒▓███▀▒ ▓█ ▓██▒▒▀█░ ░▒████▒░██▓ ▒██▒ ░ ██▒▓░ | |
▒▒▓ ▒ ░ ▒░▒░▒░ ░▒▓▒ ▒ ▒ ░▒ ▒ ▒▒ ▓▒█░░ ▐░ ░░ ▒░ ░░ ▒▓ ░▒▓░ ██▒▒▒ | |
░ ▒ ▒ ░ ▒ ▒░ ░░▒░ ░ ░ ░ ░ ▒ ▒▒ ░░ ░░ ░ ░ ░ ░▒ ░ ▒░▓██ ░▒░ | |
░ ░ ░ ░ ░ ░ ▒ ░░░ ░ ░ ░ ░ ░ ░ ▒ ░░ ░ ░░ ░ ▒ ▒ ░░ | |
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ | |
░ ░ ░ ░ |
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
module.exports = React.createClass({ | |
getInitialState() { | |
return { | |
usingMouse : false, | |
focusedOnElement : false | |
} | |
}, | |
_setUsingMouse(usingMouse) { | |
this.setState({usingMouse: usingMouse}) |
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
// option for inlining (for index) | |
// option for caching (for SVGs used more than once) | |
export default React.createClass({ | |
getInitialState() { | |
return { | |
svg: '' | |
} | |
}, |
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
import store from 'data/store' | |
import browser from 'browser' | |
import Intro from './Intro' | |
import LevelEnd from './LevelEnd' | |
import Questions from './Questions' | |
import TimeoutTransitionGroup from 'vendor/timeout-transition-group' | |
export default React.createClass({ | |
_getScreen() { | |
const level = store.getLevel(this.props.level) |
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
<!DOCTYPE HTML> | |
<html> | |
<body> | |
<form> | |
<input type="date" /><br /> | |
<input type="number" min="5" max="15" step="3" required/><br /> | |
<input type="month" /><br /> | |
<input type="email" autofocus /><br /> |
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
/Library/Ruby/Site/1.8/rubygems/dependency.rb:52:in `initialize': Valid types are [:development, :runtime], not nil (ArgumentError) | |
from /Users/dougavery/.rvm/gems/ruby-1.9.2-p290@opower/gems/bundler-1.0.18/lib/bundler/resolver.rb:352:in `new' | |
from /Users/dougavery/.rvm/gems/ruby-1.9.2-p290@opower/gems/bundler-1.0.18/lib/bundler/resolver.rb:352:in `search' | |
from /Users/dougavery/.rvm/gems/ruby-1.9.2-p290@opower/gems/bundler-1.0.18/lib/bundler/resolver.rb:346:in `gems_size' | |
from /Users/dougavery/.rvm/gems/ruby-1.9.2-p290@opower/gems/bundler-1.0.18/lib/bundler/resolver.rb:179:in `resolve' | |
from /Library/Ruby/Site/1.8/rubygems/source_index.rb:95:in `sort_by' | |
from /Users/dougavery/.rvm/gems/ruby-1.9.2-p290@opower/gems/bundler-1.0.18/lib/bundler/resolver.rb:175:in `each' | |
from /Users/dougavery/.rvm/gems/ruby-1.9.2-p290@opower/gems/bundler-1.0.18/lib/bundler/resolver.rb:175:in `sort_by' | |
from /Users/dougavery/.rvm/gems/ruby-1.9.2-p290@opower/gems/bundler-1.0.18/lib/bundler/resolver.rb:175:in `resolve' | |
from /Us |
OlderNewer