- Make website
- Find public domain content
- Host content to ensure it’s always available
- Need web seed support
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
| /** | |
| * Make a JSONP request. Server must support JSONP with callback name specified as a GET | |
| * parameter with the name `callback`. Callback function will be called when data arrives. | |
| * If request times out, callback is called with an Error object. | |
| * @param {string} uri | |
| * @param {Object} params Object of url params. Gets transformed into ?key1=value1&key2=value2 | |
| * @param {function} cb | |
| */ | |
| exports.jsonp = function (uri, params, cb) { | |
| cb = once(cb) |
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 VText = require('virtual-dom/vnode/vtext') |
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
| $.when( $.getJSON('/some/data/'), $.get('template.tpl') ).then(function( data, tmpl ){ | |
| $( tmpl ) // create a jQuery object out of the template | |
| .tmpl( data) // compile it | |
| .appendTo( "#target" ); // insert it into the DOM | |
| }); |
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
| // See comments below. | |
| // This code sample and justification brought to you by | |
| // Isaac Z. Schlueter, aka isaacs | |
| // standard style | |
| var a = "ape", | |
| b = "bat", | |
| c = "cat", | |
| d = "dog", |
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
| /* | |
| * Text shadow with conditional IE support. | |
| * | |
| * Examples: | |
| * text-shadow: none | |
| * text-shadow: <color>? <offset-x> <offset-y> <blur-radius>? | |
| * text-shadow: <offset-x> <offset-y> <blur-radius>? <color>? | |
| */ | |
| // TODO: Convert color to hex | |
| text-shadow() |
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
| /** | |
| * Given a filename for a static resource, returns the resource's absolute | |
| * URL. Supports file paths with or without origin/protocol. | |
| */ | |
| function toAbsoluteURL (url) { | |
| // Handle absolute URLs (with protocol-relative prefix) | |
| // Example: //domain.com/file.png | |
| if (url.search(/^\/\//) != -1) { | |
| return window.location.protocol + url | |
| } |
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 count = 0; | |
| var memoizer = function(memo, formula) { | |
| var recur = function(n) { | |
| var result = memo[n]; | |
| if (typeof result !== "number") { | |
| result = formula(n); | |
| memo[n] = result; | |
| } | |
| return result; |
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
| // Feross Aboukhadijeh - Apr 12 2010 | |
| // | |
| // Script I hacked together to cheat on TypeRacer.com. You use it by waiting for the typing game | |
| // to start. Once it starts, open up Firebug, paste in this code, and run it. Now, just press | |
| // space to auto-type each word. I made the user push space, as opposed to advancing the words | |
| // automatically because I believe the site looks for a keypress event before evaluating the contents | |
| // of the input box. I could not figure out how to fake a user keypress event. Perhaps this is | |
| // disallowed for browser security reasons? | |
| // | |
| // Next todo: Site detects the unbelievable WPM and asks you to do a captcha test. |
OlderNewer