- http://tutsplus.com/tutorial/writing-modular-javascript/
- https://github.com/aranm/scalable-javascript-architecture
- https://github.com/patrick99e99/scalable-js-architecture-app
- http://scaleapp.org/
- http://addyosmani.com/largescalejavascript/
- https://github.com/tcorral/Hydra.js/
- http://alanlindsay.me/kerneljs/
- http://terrifically.org/
- https://github.com/gorillatron/cerebral
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! | |
| Copyright (c) <2012> <Arieh Glazer> | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <!--[if IE 8]> <html lang="sv-SE" class="no-js ie8"> <![endif]--> | |
| <!--[if gt IE 8]><!--> <html lang="sv-SE" class="no-js"> <!--<![endif]--> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Breakpoint detection test</title> | |
| <style type="text/css" media="screen"> | |
| @media screen and (min-width: 320px) { | |
| #page:after { | |
| content: 'smallest'; /* represent the current width-bracket */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var p1 = { | |
| x: 20, | |
| y: 20 | |
| }; | |
| var p2 = { | |
| x: 40, | |
| y: 40 | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static Result list() | |
| { | |
| ObjectNode json = Json.newObject(); | |
| ArrayNode arr = json.arrayNode(); | |
| ObjectNode element1 = Json.newObject(); | |
| element1.put("title", 123); | |
| element1.put("content", 123); | |
| arr.add(element1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Based on https://github.com/jaubourg/ajaxHooks/blob/master/src/ajax/xdr.js | |
| (function( jQuery ) { | |
| if ( window.XDomainRequest && !jQuery.support.cors ) { | |
| jQuery.ajaxTransport(function( s ) { | |
| if ( s.crossDomain && s.async ) { | |
| if ( s.timeout ) { | |
| s.xdrTimeout = s.timeout; | |
| delete s.timeout; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Hide URL Bar for iOS and Android "level above next level" | |
| // streamlined version without extension part | |
| // slowly moving it to perfection... | |
| MBP.hideUrlBar = function () { | |
| if ( !location.hash ) { | |
| doScrollTop = setInterval(function(){ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * { | |
| /* makes border and padding grow inward from width & height | |
| - mix-and-match units for various box model properties | |
| - ex. width: 25%; padding: 15px; | |
| - no workie in IE7 | |
| */ | |
| -moz-box-sizing: border-box; | |
| box-sizing: border-box; | |
| /* hiding overflow creates a block formatting context |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| var path = require('path'), | |
| exec = require('child_process').exec, | |
| when = require('when'), | |
| gm = require('gm'), | |
| Gearman = require('node-gearman'), | |
| gearman = new Gearman(), | |
| options = { | |
| thumbDir: path.join(__dirname, 'thumb'), |