- A good writer is a good thinker
- Getting personal the why and how of designing for people
- Give them what they need not what they want
- Responsive images
- Rethinking publishing
- Beyond the browser with hybrid apps
- Is Blink the new IE6?
- Mystery speaker: Christian Heilmann
- Enhancing responsiveness with flexbox
List open ports on Mac OS X | |
sudo lsof -i -P | grep -i "listen" | |
--- Suspende node servers --- | |
ctrl-z suspends it, which means it can still be running. | |
ctrl-c will actually kill it. |
find ~/Sites/testsite -type f -exec dos2unix {} + |
find . -type f -exec grep -qIP '\r\n' {} ';' -exec perl -pi -e 's/\r\n/\n/g' {} '+' |
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains thewebsite.com --no-parent www.thewebsite.com | |
wget --recursive --no-clobber --page-requisites --html-extension --convert-links www.thewebsite.com |
<?php | |
/* | |
Plugin Name: Instrument Hooks for WordPress | |
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook. | |
Version: 0.1 | |
Author: Mike Schinkel | |
Author URI: http://mikeschinkel.com | |
*/ | |
if (isset($_GET['instrument']) && $_GET['instrument']=='hooks') { |
// Avoid `console` errors in browsers that lack a console. | |
if (!(window.console && console.log)) { | |
(function() { | |
var noop = function() {}; | |
var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn']; | |
var length = methods.length; | |
var console = window.console = {}; | |
while (length--) { | |
console[methods[length]] = noop; | |
} |
jQuery does good jobs when you're dealing with browser compatibility. But we're living in an age that fewer and fewer people use old-school browsers such as IE <= 7. With the growing of DOM APIs in modern browsers (including IE 8), most functions that jQuery provides are built-in natively.
When targeting only modern browsers, it is better to avoid using jQuery's backward-compatible features. Instead, use the native DOM API, which will make your web page run much faster than you might think (native C / C++ implementaion v.s. JavaScript).
If you're making a web page for iOS (e.g. UIWebView), you should use native DOM APIs because mobile Safari is not that old-school web browser; it supports lots of native DOM APIs.
If you're making a Chrome Extension, you should always use native APIs, not only because Chrome has almost the latest DOM APIs available, but this can also avoid performance issue and unnecessary memory occupation (each jQuery-driven extension needs a separate
*Device* *Portrait* *Landscape* *Device type* *Remarks* | |
Nexus 7 600 961 Tablet | |
iPad 2 768 768 Tablet iOS always reports the same, regardless of orientation. | |
Surface RT 1366 1024 Tablet | |
Galaxy Tab 2 1280 800 Tablet | |
Galaxy Nexus 360 598 Phone | |
iPhone 5 320 320 Phone iOS always reports the same, regardless of orientation. | |
Galaxy S3 mini 320 534 Phone Stock android browser reports 533, not 534 (Chrome). |