Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry session
Debugger
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry sessionDebugger
.container | |
position: relative | |
+desktop | |
margin: 0 auto | |
max-width: $desktop - 40px | |
width: $desktop - 40px | |
// Modifiers | |
&.is-fluid | |
margin: 0 20px | |
max-width: none |
https://kangax.github.io/compat-table/es6/
A variable can be either of global or local scope. A global variable is a variable declared in the main body of the source code, outside all functions, while a local variable is one declared within the body of a function or a block. Modern versions allow nested lexical scoping.
The difference is scoping. var is scoped to the nearest function block and let is scoped to the nearest enclosing block, which can be smaller than a function block. Both are global if outside any block.
/** | |
* EventEmitter x 2,590,624 ops/sec ±4.54% (79 runs sampled) | |
* EventEmitter2 x 9,239,432 ops/sec ±1.95% (90 runs sampled) | |
* Mitt x 3,161 ops/sec ±43.29% (10 runs sampled) | |
* Tiny Emitter x 2,380,065 ops/sec ±1.46% (94 runs sampled) | |
* PubsubJS x 231,646 ops/sec ±14.09% (64 runs sampled) | |
* Fastest is EventEmitter2 | |
*/ | |
var Benchmark = require('benchmark'); |
# test/fixtures/abandoned_tickets.yml | |
<% two_days_ago = Time.now - 2.days %> | |
abandoned_ticket_one: | |
company: company_one | |
user: user_one | |
abandoned_ticket_two: | |
company: company_one | |
user: user_one |
for(var x = 0; x < 50000; x++){ | |
console.log(x); | |
} |
window.requestAnimFrame = (function() { | |
return window.requestAnimationFrame || | |
function(/* function */ callback, /* DOMElement */ element){ | |
window.setTimeout(callback, 1000 / 60); | |
}; | |
})(); |
Todo: Separate into useful sections.
const path = require('path'); | |
const pathConfig = require('./path-config.json'); | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer') | |
.BundleAnalyzerPlugin; | |
const opn = require('opn'); | |
module.exports = { | |
html: false, | |
ghPages: false, | |
images: true, |