Skip to content

Instantly share code, notes, and snippets.

@nickstenning
nickstenning / console.js
Created July 1, 2010 11:50
Javascript console stubber
// Stub the console when not available so that everything still works.
(function () {
var i, functions = ["log", "debug", "info", "warn", "exception", "assert", "dir", "dirxml", "trace", "group", "groupEnd", "groupCollapsed", "time", "timeEnd", "profile", "profileEnd", "count", "clear", "table", "error", "notifyFirebug", "firebug", "userObjects"];
if (!("console" in this)) {
this.console = {};
for (i = 0; i < functions.length; i += 1) {
this.console[functions[i]] = function () {};
}
  1. . path/to/pyenv/bin/activate

  2. pip install linesman

  3. Add the following to your development.ini:

     [filter-app:profile]
     use = egg:linesman#profiler
     next = main
    
  4. paster serve development.ini -n profile

  5. Visit http://127.0.0.1:5000/__profiler__

Nick Stenning's Hilbert Problems of Annotation

My summary of Nick Stenning's slides about open problems on the Web for annotation at iannotate.

  • bi-directional links: need to be able to discover when resources are annotated
  • annotation of documents, not formats: an annotation of a document in html should apply to the pdf, epub, etc
  • annotating dynamic content: content changes on the Web, and annotations need to be able to survive that (Memento, InternetArchive could help here)
  • persistent reference: for annotation Cool URIs is not enough. The Web isn't cool enough.