Skip to content

Instantly share code, notes, and snippets.

View ccarterc's full-sized avatar

Colby Callahan ccarterc

  • Netflix
  • Las Vegas, NV
View GitHub Profile
@topliceanu
topliceanu / description.markdown
Created May 5, 2012 10:16
lists all user defined globals attached to [window]

This bookmarklet can be used to keep track of global variables attached to window.

It displays the user-defined global variables by comparing all properties attached on current window to all standard properties extracted from an empty iframe.

To install, create a new bookmark in your bookmark bar and copy-paste the contents of listGlobals.bookmarklet

@hubgit
hubgit / xhr-binary.js
Created December 15, 2010 17:09
Binary file XHR getting and sending that works in Chrome 9 and Firefox
// https://developer.mozilla.org/en/using_xmlhttprequest
// http://web.archive.org/web/20071103070418/http://mgran.blogspot.com/2006/08/downloading-binary-streams-with.html
function getBinary(file){
var xhr = new XMLHttpRequest();
xhr.open("GET", file, false);
xhr.overrideMimeType("text/plain; charset=x-user-defined");
xhr.send(null);
return xhr.responseText;
}