110 karma · joined March 20, 2013
var getFont = function(url) {
var link = document.createElement('link');
link.rel='stylesheet';
link.type='text/css';
link.href = url;
document.head.appendChild(link);
}
getFont('https://fonts.googleapis.com/css?family=Open+Sans|Roboto')
var sheet = (function() {
var style = document.createElement('style');
document.head.appendChild(style);
return style.sheet;
})();
sheet.insertRule('body { font: 400 16px/24px Roboto,sans-serif!important; -webkit-font-smoothing: antialiased; }', 0); 11 × 16 = 1(1+6)6
34 × 11 = 3(3+4)4
124 × 11 = 1(1+2)(2+4)4
Or multiplication table 10 through 20: 14 × 17 = (14+7) × 10 + 7 × 4
13 × 18 = (13+8) × 10 + 8 × 3Users of software don’t care for the terms developers use to label their creations, “web app” or “web page” — it’s all the same to them. More importantly, they expect an identical behaviour from both. So when a web app can’t recreate its state from URL it’s breaking a fundamental web UI convention.
Another core UI convention that is often disregarded by web app developers is link click behaviour, i.e. you expect anything that performs a function of a link to behave as it normally would when you click on it with mouse’s middle button, or right click → context menu, or left click with modifier keys (cmd/ctrl, shift). Everyone got used to this and when the pattern is broken it is most annoying.
find . -name "*.png" -print0 | xargs -0 -P8 pngquant --ext .png --force 256 #optimizepng
(if you’re using zsh, you have to enable INTERACTIVE_COMMENTS option first; just run set -k)