Slides: https://speakerdeck.com/kenwoodworth/design-smarter-not-harder
Soft Facade
http://softfacade.com
Flat Pixels: The Battle Between Flat Design & Skeuomorphism
by Sacha Grief
http://sachagreif.com/flat-pixels
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
global $user; | |
/* | |
* If the user is not logged in, require them to login prior to being | |
* redirected to the form | |
*/ | |
if ($user->uid === 0 && arg(0) != 'user') { | |
$dest = drupal_get_path_alias($_GET['q']); | |
drupal_goto('user', array('query' => array('destination' => $dest))); | |
} |
#!/bin/sh | |
PERM_USER=nobody | |
PERM_GROUP=dev | |
APACHE_USER=apache | |
if [ $# -ne 1 ] ; then | |
echo "USAGE $0 <d7 root dir>" | |
exit; | |
fi |
Slides: https://speakerdeck.com/kenwoodworth/design-smarter-not-harder
Soft Facade
http://softfacade.com
Flat Pixels: The Battle Between Flat Design & Skeuomorphism
by Sacha Grief
http://sachagreif.com/flat-pixels
~/.ideas.md | |
# Software | |
- doomed startup idea 1 | |
- some feature for an open-source project | |
- doomed startup idea 2 | |
- ... | |
# Blog posts | |
- the .ideas file |
(function() { | |
var CSSCriticalPath = function(w, d, opts) { | |
var opt = opts || {}; | |
var css = {}; | |
var pushCSS = function(r) { | |
if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
for(var i = 0; i < styles.length; i++) { | |
if(!!styles[i] === false) continue; | |
var pair = styles[i].split(": "); |
I wanted to figure out the fastest way to load non-critical CSS so that the impact on initial page drawing is minimal.
TL;DR: Here's the solution I ended up with: https://github.com/filamentgroup/loadCSS/
For async JavaScript file requests, we have the async
attribute to make this easy, but CSS file requests have no similar standard mechanism (at least, none that will still apply the CSS after loading - here are some async CSS loading conditions that do apply when CSS is inapplicable to media: https://gist.github.com/igrigorik/2935269#file-notes-md ).
Seems there are a couple ways to load and apply a CSS file in a non-blocking manner:
I've taken the benchmarks from Matthew Rothenberg's phoenix-showdown, updated Phoenix to 0.13.1 and ran the tests on the most powerful machines available at Rackspace.
Framework | Throughput (req/s) | Latency (ms) | Consistency (σ ms) |
---|
# | |
# Minimal Drupal 7.x development environment. | |
# | |
# Use: | |
# 1. Place a copy of this file at your Drupal site root. | |
# 2. Start the web stack: `USER_ID=$(id -u) docker-compose up -d` | |
# 3. Set up `settings.local.php` (note that the host is 'db' and the username, | |
# password, and schema are in the environment variables for the database | |
# container below). | |
# 4. If you have a database dump to import, place it in your Drupal site root, |
#!/bin/sh | |
SOURCEDIR=/path/to/docroot | |
DESTDIR=/path/to/backup/dir | |
NAME=<site-name> | |
RETENTION=2 | |
let MMIN=($RETENTION*60*24)-180 | |
DATE=`date +%Y-%m-%d-%H-%M` | |
EXCLUDE="" |