Skip to content

Instantly share code, notes, and snippets.

View vishalkardode's full-sized avatar

Vishal Kardode vishalkardode

View GitHub Profile
@dhavaln
dhavaln / download_test.html
Created July 5, 2012 17:59
Cordova (1.7.0, 1.8.1 and 1.9.0) File Download Test
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript" src="lib/android/cordova-1.7.0.js"></script>
<script type="text/javascript">
window.appRootDirName = "download_test";
document.addEventListener("deviceready", onDeviceReady, false);
@ryanflorence
ryanflorence / universal-module.js
Created September 6, 2011 18:10
Universal JavaScript Module, supports AMD (RequireJS), Node.js, and the browser.
(function (name, definition){
if (typeof define === 'function'){ // AMD
define(definition);
} else if (typeof module !== 'undefined' && module.exports) { // Node.js
module.exports = definition();
} else { // Browser
var theModule = definition(), global = this, old = global[name];
theModule.noConflict = function () {
global[name] = old;
return theModule;