Skip to content

Instantly share code, notes, and snippets.

View ebidel's full-sized avatar

Eric Bidelman ebidel

View GitHub Profile
anonymous
anonymous / test_basics.html
Created August 15, 2012 17:09
"upgradeneeded" shim for Chrome's IndexedDB
<!DOCTYPE html>
<title>upgradeneeded shim test - basics</title>
<body>
<script src="upgradeneeded.js"></script>
<script>
window.indexedDB = window.indexedDB || window.webkitIndexedDB;
function show(s) {
document.querySelector('#output').appendChild(document.createTextNode(s + "\n"));
}
@axemclion
axemclion / IndexedDB.setVersionShim.js
Created May 11, 2012 00:29
Shim that converts Chrome's SetVersion to the standard IndexedDB onupgradeneeded events
////////////////////////////////////////////////////////////////////////////////////////////////////
var openReqShim = function(dbName, version){
var me = this;
var IDBRequest = function(){
this.onsuccess = this.onerror = this.onblocked = this.onupgradeneeded = null;
};
function copyReq(req){
req = req || dbOpenReq;
@subtleGradient
subtleGradient / appify
Created November 11, 2010 16:03
appify. Create the simplest possible mac app from a shell script
#!/usr/bin/env bash
#
# url : https://gist.github.com/672684
# version : 2.0.2
# name : appify
# description : Create the simplest possible mac app from a shell script.
# usage : cat my-script.sh | appify MyApp
# platform : Mac OS X
# author : Thomas Aylott <[email protected]>