// jQuery
$(document).ready(function() {
// code
})| // Destroys the localStorage copy of CSS that less.js creates | |
| function destroyLessCache(pathToCss) { // e.g. '/css/' or '/stylesheets/' | |
| if (!window.localStorage || !less || less.env !== 'development') { | |
| return; | |
| } | |
| var host = window.location.host; | |
| var protocol = window.location.protocol; | |
| var keyPrefix = protocol + '//' + host + pathToCss; |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>BackgroundBlur</key> | |
| <real>0.0</real> | |
| <key>BackgroundColor</key> | |
| <data> | |
| YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS | |
| AAGGoKMHCA9VJG51bGzTCQoLDA0OViRjbGFzc1xOU0NvbG9yU3BhY2VXTlNXaGl0ZYAC |
| server { | |
| index index.php; | |
| set $basepath "/var/www"; | |
| set $domain $host; | |
| # check one name domain for simple application | |
| if ($domain ~ "^(.[^.]*)\.dev$") { | |
| set $domain $1; | |
| set $rootpath "${domain}"; |
- Avoid too many reflows (the browser to recalculate everything)
- Use advanced CSS3 for graphic card rendering
- Precalculate sizes and positions
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:
| <?php | |
| require_once __DIR__ . '/../lib/vendor/Silex/silex.phar'; | |
| $app = new Silex\Application(); | |
| $app['debug'] = true; | |
| // Registering Symfony\Yaml and Symfony\Config | |
| $app['autoloader']->registerNamespace('Symfony', __DIR__.'/../lib/vendor/symfony/src'); |
#Setting up Nginx on Your Local System ###by Keith Rosenberg
##Step 1 - Homebrew The first thing to do, if you're on a Mac, is to install homebrew from http://mxcl.github.io/homebrew/
The command to type into terminal to install homebrew is:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
| var gulp = require('gulp'), | |
| pkg = require('./package.json'), | |
| path = require('path'), | |
| connect = require('connect'), | |
| http = require('http'), | |
| open = require('open'), | |
| compass = require('gulp-compass'), |
Google Chrome Developers says:
The new WOFF 2.0 Web Font compression format offers a 30% average gain over WOFF 1.0 (up to 50%+ in some cases). WOFF 2.0 is available since Chrome 36 and Opera 23.
Some examples of file size differences: WOFF vs. WOFF2