- 1Password (hijacks the Snippety window)
- AirBuddy
- Amphetamine
- BlockBlock
- Cork (much better than Brewer X)
- CotEditor (fastest text editor with multi–line editing)
- DaisyDisk
- Fantastical
| // inert-unert.js: a quick utility for applying or removing the inert property | |
| // - @scottjehl, @filamentgroup | |
| // (note: inert support polyfill is still needed in some browsers) | |
| // usage: | |
| // when a modal element such as a dialog is active, | |
| // this function will make unrelated elements inert, aiming to affect as few as possible | |
| // example: inert( document.querySelector(".modal-open") ); | |
| function inert( allButThisElement ){ | |
| function inertSiblings( node ){ | |
| if( node.parentNode ){ |
| function setWeatherIcon(condid) { | |
| var icon = ''; | |
| switch(condid) { | |
| case '0': icon = 'wi-tornado'; | |
| break; | |
| case '1': icon = 'wi-storm-showers'; | |
| break; | |
| case '2': icon = 'wi-tornado'; | |
| break; | |
| case '3': icon = 'wi-thunderstorm'; |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParent
If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:
In the evenings read the [Domain-Driven Design Quickly Minibook]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):
- Eric Evans' [What I've learned about DDD since the book]{http://www.infoq.com/presentations/ddd-eric-evans}
- Eric Evans' [Strategic Design - Responsibility Traps]{http://www.infoq.com/presentations/design-strategic-eric-evans}
- Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{http://www.infoq.com/presentations/SOA-Business-Autonomous-Components}
- Udi Dahan's [Command-Query Responsibility Segregation]{http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation}
- Greg Young's [Unshackle Your Domain]{http://www.infoq.com/presentations/greg-young-unshackle-qcon08}
- Eric Evans' [Acknowledging CAP at the Root -- in the Domain Model]{ht
| /** | |
| * VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
| * | |
| * To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
| * It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
| * the height of element `.foo` —which is a full width and height cover image. | |
| * | |
| * iOS Resolution Quick Reference: http://www.iosres.com/ | |
| */ | |
| import sys, os.path, hashlib, re | |
| import zipfile | |
| import subprocess | |
| from StringIO import StringIO | |
| from io import BytesIO | |
| # | |
| # Passbook Hack | |
| # David Schuetz | |
| # 30 May 2014 |
JavaScript has evolved over the years and there are things that can be done with JavaScript now that couldn’t be done a few years ago. These tutorials present ways in which you can take existing JavaScript from a while ago and rework them to make better use of the newer features that are now available.
Generally speaking, a function is a "subprogram" that can be called by code external (or internal in the case of recursion) to the function. Like the program itself, a function is composed of a sequence of statements called the function body. Values can be passed to a function, and the function can return a value.
In JavaScript, functions are first-class objects, i.e. they are objects and can be