- CSSConf EU 2014 - CSS Performance Tooling — by Addy Osmani
- React: CSS in JS — Slides, November 2014
- AngularJS: Realtime Eye Candy — by FITC
javascript:(function () { | |
var iframe = document.createElement("iframe"), | |
console; | |
iframe.src = "about:blank"; | |
iframe.style.display = "none"; | |
document.body.appendChild(iframe); | |
console = (iframe.contentWindow || iframe.contentDocument).console; | |
iframe.parentNode.removeChild(iframe); |
/* | |
* Scrolls the window to the required position using animation with custom easing. | |
* The required position can be set with the 1st argument ('position'); | |
* The fineness of the animation can be customized by using the 'speed' (2nd) argument, which ranges between 0.1 (very fine) and 1 (instant jump). | |
* Usage #1: | |
* scrollWindowTo(0, 0.2); // -> Scrolls the page to the top with a fine animation | |
* Usage #2: | |
* scrollWindowTo(100, 1); // -> Makes the page jump to 100px | |
*/ | |
var scrollWindowTo = (function(){ |
/** | |
* walk | |
* small function to walk along an array of functions | |
* each function walked gets an extra argument | |
* that argument is a function that should be called | |
* to notify the walk function to step to the next function | |
* the arguments given at call time are passed to the next function | |
* | |
* @function | |
* @param {Array} fns Array of functions |
function namespace (ns) { | |
var parts = ns.split('.'), | |
root = window || this; | |
return (function walk (obj) { | |
if (!root[obj]) { root[obj] = {}; } | |
root = root[obj]; | |
if (parts.length) { walk(parts.shift()); } | |
return root; | |
}(parts.shift())); |
[ | |
{ | |
"keys": ["super+alt+left"], | |
"command": "set_layout", | |
"args": | |
{ | |
"cols": [0.0, 0.33, 1.0], | |
"rows": [0.0, 1.0], | |
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]] | |
} |
/** | |
* __series | |
* Given an array of functions, it will call every function, | |
* once at a time, sequentially. | |
* Every function will have a trigger function as its last argument, | |
* that should be called when the function is done. | |
* If arguments are given to this trigger function, those will be passed | |
* to the next function. | |
* | |
* @example |
# Generate SSL Certificate for dev | |
export DOMAIN="example.dev" | |
export PASSPHRASE=$(head -c 500 /dev/urandom | tr -dc a-z0-9A-Z | head -c 128; echo) | |
export SUBJ=" | |
C=PT | |
ST=Aveiro | |
O=Example Organization | |
localityName=Aveiro | |
commonName=$DOMAIN |
(function (global) { | |
'use strict'; | |
var globals = []; | |
var iframe = document.createElement('iframe'); | |
var cleanWindow; | |
iframe.src = 'about:blank'; | |
iframe.style.display = 'none'; | |
document.body.appendChild(iframe); |