jQuery plugin to catch image load errors and re-direct src urls. Allows for multiple fallback options.
Author: Dan Woodson
jQuery plugin to catch image load errors and re-direct src urls. Allows for multiple fallback options.
Author: Dan Woodson
!! drop in Solarized colorscheme for Xresources/Xdefaults | |
!!SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB | |
!!--------- ------- ---- ------- ----------- ---------- ----------- ----------- | |
!!base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 | |
!!base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 | |
!!base01 #586e75 10/7 brgreen 240 #585858 45 -07 -07 88 110 117 194 25 46 | |
!!base00 #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195 23 51 | |
!!base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 | |
!!base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 |
Immediate feedback validation | |
Author: Dan Woodson | |
Date: 2011-08-14 | |
for ticket GRN-1833 |
{ | |
// -------------------------------------------------------------------- | |
// JSHint Configuration, Strict Edition | |
// -------------------------------------------------------------------- | |
// | |
// This is a options template for [JSHint][1], using [JSHint example][2] | |
// and [Ory Band's example][3] as basis and setting config values to | |
// be most strict: | |
// | |
// * set all enforcing options to true |
/* if portrait mode is detected, rotate the entire site -90 degrees to hint rotating to landscape */ | |
@media (orientation: portrait) { | |
body { | |
-webkit-transform: rotate(-90deg); | |
-moz-transform: rotate(-90deg); | |
-o-transform: rotate(-90deg); | |
-ms-transform: rotate(-90deg); | |
transform: rotate(-90deg); | |
} | |
} |
Node.js core does its best to treat every platform equally. Even if most Node developers use OS X day to day, some use Windows, and most everyone deploys to Linux or Solaris. So it's important to keep your code portable between platforms, whether you're writing a library or an application.
Predictably, most cross-platform issues come from Windows. Things just work differently there! But if you're careful, and follow some simple best practices, your code can run just as well on Windows systems.
On Windows, paths are constructed with backslashes instead of forward slashes. So if you do your directory manipulation
{ | |
// -------------------------------------------------------------------- | |
// JSHint Configuration for Dan Woodson | |
// -------------------------------------------------------------------- | |
// | |
// Note: This is a modified version of the file found at [5]. | |
// The configuration options have been changed to fit the | |
// needs of Magazines.com | |
// | |
// This is a options template for [JSHint][1], using [JSHint example][2] |
<img>
s must have an alt<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Flatiron Example</title> | |
</head> | |
<body> | |
<div id="body"></div> | |
</body> | |
</html> |
this.addEventListener("fetch", function(event) { | |
console.log('WORKER: fetch event in progress.'); | |
/* We should only cache GET requests, and deal with the rest of method in the | |
client-side, by handling failed POST,PUT,PATCH,etc. requests. | |
*/ | |
if (event.request.url !== 'https://myserver.ngrok.com/app.js') { | |
/* If we don't block the event as shown below, then the request will go to | |
the network as usual. | |
*/ |