This file contains 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
{ | |
"files": | |
{ | |
"avgrundjs": "https://raw.github.com/voronianski/jquery.avgrund.js/master/js/jquery.avgrund.js", | |
"backbone": "http://documentcloud.github.com/backbone/backbone.js", | |
"backbone.localStorage": "https://raw.github.com/jeromegn/Backbone.localStorage/master/backbone.localStorage.js", | |
"backbone.min": "http://documentcloud.github.com/backbone/backbone-min.js", | |
"d3js": "http://d3js.org/d3.v3.min.js", | |
"raphaeljs": "http://github.com/DmitryBaranovskiy/raphael/raw/master/raphael-min.js", | |
"history": "https://raw.github.com/balupton/history.js/master/scripts/compressed/history.js", |
This file contains 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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
This file contains 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> | |
<html> | |
<head> | |
<title>PLS Processor</title> | |
<!-- needed for IE9 to ensure it treats page as HTML5 properly --> | |
<meta http-equiv="X-UA-Compatible" content="IE=9" > | |
</head> | |
<body> | |
<p>Audio PLS processor<p> | |
<audio id="audio" controls="controls"></audio > |
This file contains 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
<snippet> | |
<content><![CDATA[ | |
var assert = function(value, msg){ | |
if(!value) | |
throw(msg|| (value + " does not equal true")); | |
}; | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>assert</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> |
This file contains 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
<snippet> | |
<content><![CDATA[ | |
var assertEqual = function(val1, val2, msg){ | |
if(val1!=val2) | |
throw (msg||(val1+" does not equal " + val2)); | |
}; | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>assertequal</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> |
This file contains 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
/* | |
Memoizer function takes an initial memo array and fundamental function. | |
It returns a shell function that manages the memo store and that calls the functamental function as needed. | |
We pass the shell function and the function's parameters to the fundamental function. | |
For example: Fibonacci series creater. | |
var fibonacci = memoizer([0,1], function(shell, n){ | |
return shell(n-1) + shell(n-2); | |
}); | |
*/ |
This file contains 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
<snippet> | |
<content><![CDATA[ | |
(function(){ | |
${1} | |
})(); | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>funs</tabTrigger> |
This file contains 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
// set some global vars | |
var _c; | |
// params for making rose flower play with these settings to make all kinds of different shapes | |
var a = 8; | |
var b = 16; | |
var c = 16; | |
// number of flowers to draw. each one progressively smaller | |
var shades = 10; |
This file contains 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 encodeValue(val){ | |
var encodedVal; | |
if(!encodeURIComponent){ | |
encodedVal = escape(val); | |
//Fix the omissions | |
encodedVal = encodedVal.replace(/@/g, '%40'); | |
encodedVal = encodedVal.replace(/\//g, '%2F'); | |
encodedVal = encodedVal.replace(/\+/g, '%2B'); | |
} | |
else{ |
This file contains 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 createXHR(){ | |
try {return new XMLHttpRequest();} catch(e){} | |
try {return new ActiveXObject("Msxml2.XMLHTTP.6.0"); } catch(e){} | |
try {return new ActiveXObject("Msxml2.XMLHTTP.3.0"); } catch(e){} | |
try {return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e){} | |
try {return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){} | |
return null; | |
} |
OlderNewer