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 xports(name, api){ | |
| if (typeof exports == 'object' && exports) { | |
| if (typeof module == 'object' && module.exports == exports) { | |
| module.exports = api; | |
| } else { | |
| exports[name] = api; | |
| } | |
| } else if (typeof define == 'function' && typeof define.amd == 'object') { | |
| define(function() { return api; }); |
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 testSupport(options){ | |
| var noop = function(){}; | |
| if (!options.name) throw Error('test needs a name'); | |
| if (!options.root) options.root = testSupport.results = {}; | |
| if (!options.success) options.success = noop; | |
| if (!options.failure) options.failure = noop; | |
| var run = function(options){ | |
| var result = (typeof options.test === 'function') ? options.test(options) : options.test; | |
| options.root[options.name] = result; | |
| ([options.failure, options.success][+result])(options); |
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 testSupport(options){ | |
| var noop = function(){}; | |
| if (!options.name) throw Error('test needs a name'); | |
| if (!options.root) options.root = testSupport.results = {}; | |
| if (!options.success) options.success = noop; | |
| if (!options.failure) options.failure = noop; | |
| var run = function(options){ | |
| var result = (typeof options.test === 'function') ? options.test(options) : options.test; | |
| options.root[options.name] = result; | |
| ([options.failure, options.success][+result])(options); |
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
| /*! Javascript plotting library for jQuery, v. 0.7. | |
| * | |
| * Released under the MIT license by IOLA, December 2007. | |
| * | |
| */ | |
| // first an inline dependency, jquery.colorhelpers.js, we inline it here | |
| // for convenience | |
| /* Plugin for jQuery for working with colors. |
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
| require('jsdom').env({ | |
| html: '<html><body></body></html>', // URL or markup required | |
| scripts: [ | |
| // can't use jQuery 1.7+, atm, b/c of https://github.com/NV/CSSOM/issues/29 | |
| 'http://code.jquery.com/jquery-1.6.4.min.js', | |
| // Flot 0.7 patched to support node-canvas | |
| 'https://raw.github.com/gist/1364155/8d9161159d1e2bbed1a34aad90dd6d7af07a7ccf/jquery.flot-on-node.js' | |
| ], | |
| done: function (errors, window) |
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
| 42a43,44 | |
| > width: null, | |
| > height: null, | |
| 137c139,141 | |
| < hooks: {} | |
| --- | |
| > hooks: {}, | |
| > width: null, | |
| > height: null | |
| 687c691,696 |
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
| #!/bin/bash | |
| function prompt_command() | |
| { | |
| scm_prompt_vars | |
| if [[ $SCM != $SCM_NONE ]] | |
| then | |
| local scm_info=" $blue[$SCM_BRANCH @ ${SCM_CHANGE:0:7}] $SCM_STATE"; |
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 (global) { | |
| // test: function to run OR value representing result | |
| // root: object where results are stored | |
| // name: key in storage object | |
| // success: function to run on success | |
| // failure: function to run on failure | |
| // retest: should the test be re-run after a failure | |
| // (eg. failure applied a polyfill) | |
| // test must be a function to retest | |
| function test(options) |
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
| console.log('get REQUEST token', clientId, clientSecret); | |
| gimmeOauth.getRequestToken(clientId, clientSecret, function(error, token){ | |
| if (error) { | |
| console.error(error); | |
| } else { | |
| console.log('got REQUEST token', token); | |
| console.log('get ACCESS token', clientId, token); | |
| gimmeOauth.getAccessToken(clientId, token, function(error, data) { | |
| if (error) console.error(error); | |
| else { |
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
| <html> | |
| <head> | |
| <script src='http://code.jquery.com/jquery-1.5.1.min.js'></script> | |
| </head> | |
| <body> | |
| <h2>Naive canvas</h2> | |
| <canvas id="naive" width="400" height="50"></canvas> | |
| <h2>High-def Canvas</h2> |