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
/** This file is used to turn the document into static HTML with no scripts | |
As a framescript this can access the document and its iframes without | |
cross-domain permission issues. | |
documentStaticData() is the main function that collects all the information | |
and returns a JSONable object. | |
This script also contains the infrastructure for communicating as a framescript | |
with lib/framescripter |
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 onButtonClicked() { | |
console.log("yay, click!"); | |
} | |
document.getElementById("button").addEventListener("click", function () { | |
TogetherJS.send({type: "myButtonClick"}); | |
onButtonClicked(); | |
}, false); | |
TogetherJS.hub.on("myButtonClick", function () { |
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
$ cat packages.txt | |
minimock | |
formencode | |
sqlobject | |
tempita | |
initools | |
zptkit | |
pastewebkit | |
deliverance | |
httpencode |
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:(function%20()%20%7Bwindow._TogetherJSBookmarklet%20%3D%20true%3Bs%3Ddocument.createElement('script')%3Bs.src%3D%22https%3A%2F%2Ftogetherjs.com%2Ftogetherjs.js%22%3Bdocument.head.appendChild(s)%3B%7D)()%3Bvoid(0) |
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
class Detector: | |
def __init__(self): | |
self.detectors = [] | |
self._pending = [] | |
self.matches = [] | |
def feed_input(self, obj, index): | |
"""After instantiating Detector and adding individual detector coroutines, call | |
feed_input(obj, index) over and over until you are done. You should end with a | |
sentinal obj. Look in .matches to get the results. |
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 AssertionError(msg) { | |
this.message = msg || ""; | |
this.name = "AssertionError"; | |
} | |
AssertionError.prototype = Error.prototype; | |
/* Call assert(cond, description1, ...) | |
An AssertionError will be thrown if the cond is false. All parameters will be logged to the console, | |
and be part of the error. | |
*/ |
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 promisize(func) { | |
return function () { | |
try { | |
var promise = func.apply(this, arguments); | |
if (! promise.isThenable) { | |
var result = new Resolver(); | |
result.resolve(promise); | |
return result.promise; | |
} else { | |
return promise; |
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 new_(constructor /* arguments to constructor */) { | |
var args = Array.prototype.slice.call(arguments, 1); | |
var obj = Object.create(constructor.prototype); | |
var result = constructor.apply(obj, args); | |
if (result === undefined) { | |
result = obj; | |
} | |
return result; | |
} |
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
var Class = function (superClass, prototype) { | |
if (prototype === undefined) { | |
prototype = superClass; | |
} else { | |
var newPrototype = Object.create(superClass); | |
for (var a in prototype) { | |
newPrototype[a] = prototype[a]; | |
} | |
prototype = newPrototype; | |
} |
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
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(auto-save-file-name-transforms (quote (("\\`/[^/]*:\\(.+/\\)*\\(.*\\)" "/Users/ianbicking/.emacs-saves/autosave")))) | |
'(backup-directory-alist (quote ((".*" . "/Users/ianbicking/.emacs-saves/backup/")))) | |
'(delete-old-versions t) | |
'(flymake-allowed-file-name-masks (quote (("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" flymake-simple-make-init) ("\\.cs\\'" flymake-simple-make-init) ("\\.p[ml]\\'" flymake-perl-init) ("\\.php[345]?\\'" flymake-php-init) ("\\.h\\'" flymake-master-make-header-init flymake-master-cleanup) ("\\.java\\'" flymake-simple-make-java-init flymake-simple-java-cleanup) ("[0-9]+\\.tex\\'" flymake-master-tex-init flymake-master-cleanup) ("\\.tex\\'" flymake-simple-tex-init) ("\\.idl\\'" flymake-simple-make-init)))) | |
'(frame-background-mode (quote |