Install osxfuse (3.x.x) from https://github.com/osxfuse/osxfuse/releases.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"brew update| (function (R) { | |
| Math.cosd = function(d) { return Math.cos(d * R); }; | |
| Math.sind = function(d) { return Math.sin(d * R); }; | |
| Math.tand = function(d) { return Math.tan(d * R); }; | |
| })(Math.PI / 180); |
| /* | |
| A basic implementation of the Publisher/Subscriber design pattern. | |
| Developed by @addyosmani and @integralist | |
| Example Usage: | |
| // Create subscriber function to be called when topic publishes an event | |
| var testSubscriber = function (topics, data) { | |
| console.log(topics + ': ' + data); | |
| }; |
| .nav-tab { | |
| ... | |
| // instead of putting it on | |
| border-right: 1px solid #424242; | |
| &:last-child { | |
| border-right: 0; // and then taking it off | |
| } | |
| // use CSS not() to only apply to the elements you want | |
| &:not(:last-child) { | |
| border-right: 1px solid #424242; |
osxfuse (3.x.x) from https://github.com/osxfuse/osxfuse/releases.ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"brew update| var detectInjection = function(knownHostsArray) { | |
| var requests = window.performance.getEntriesByType("resource"); | |
| var unknownHosts = []; | |
| var knownHosts = {}; | |
| var foundHosts = {}; | |
| for (var knownHost in knownHostsArray) { | |
| knownHosts[knownHostsArray[knownHost]] = true; | |
| } |
| function add1(v) { return v + 1; } | |
| function isOdd(v) { return v % 2 == 1; } | |
| function sum(total,v) { return total + v; } | |
| var list = [2,5,8,11,14,17,20]; | |
| list | |
| .map( add1 ) | |
| .filter( isOdd ) | |
| .reduce( sum ); |
| .element { | |
| position: relative; | |
| top: 50%; | |
| transform: translateY(-50%); | |
| } |
The reflow appens as many times as there are frames per seconds. It recalculate all positions that change in order to diplay them. Basically, when you scroll you execute a function where you move things between two reflows. But there are functions that triggers reflows such as jQuery offset, scroll... So there are two things to take care about when you dynamically change objects in javascript to avoid too many reflows:
| { | |
| "name": "my-app", | |
| "version": "1.0.0", | |
| "description": "My test app", | |
| "main": "src/js/index.js", | |
| "scripts": { | |
| "jshint:dist": "jshint src/js/*.js", | |
| "jshint": "npm run jshint:dist", | |
| "jscs": "jscs src/*.js", | |
| "browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js", |