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
| function preload(url, loadedCb) { | |
| var tagType = 'img' || 'object', | |
| elem = document.createElement(elem), | |
| correctCallback = 'onerror' || 'onload'; | |
| if (tagType === 'img') { | |
| elem.width = '1'; | |
| elem.height = '1'; | |
| } | |
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
| location ~ \.ini$ { deny all; } | |
| location / { | |
| root /location.com/httpdocs; | |
| index index.php index.html index.htm; | |
| try_files $uri $uri/index.php @normal; location @normal { redirects } | |
| rewrite ^(.*[^/])$ $1/ permanent; | |
| rewrite ^run/$ index.php?state=run last; | |
| rewrite ^run/(.*)/?$ index.php?state=run&user=$1 last; |
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
| // Call yepnope | |
| yepnope([ | |
| { | |
| load: 'http://cdn.com/jquery.js', | |
| wait: true, // unnecessary, but clear... | |
| callback: function(name, i, yepnope, result) { | |
| // you have to return the execution of yepnope for this to work | |
| return yepnope({ | |
| test: typeof window.jQuery == 'function', | |
| nope: 'wait!local/jquery.js' |
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
| /** | |
| * Yepnope JS | |
| * | |
| * Version 0.2.6pre | |
| * | |
| * by Alex Sexton - AlexSexton@gmail.com | |
| * | |
| * Tri-Licensed WTFPL, BSD, & MIT | |
| */ | |
| (function(window, doc, undef) { |
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
| // everyone's new favorite closure pattern: | |
| (function(window,document,undefined){ ... })(this,this.document); | |
| // when minified: | |
| (function(w,d,u){ ... })(this,this.document); | |
| // which means all uses of window/document/undefined inside the closure | |
| // will be single-lettered, so big gains in minification. | |
| // it also will speed up scope chain traversal a tiny tiny little bit. |
NewerOlder