Entries from March 2012 ↓
March 28th, 2012 — Uncategorized
The only references I’ve found online are to an old bug in Chrome.
Error: NAMESPACE_ERR: DOM Exception 14
I generated this with the following xpath expression generated by Firebug:
id('content')/x:div[2]/x:div[3]/x:div[1]/x:h2[2]
This causes this javascript line to fail:
document.evaluate("id('content')/x:div[2]/x:div[3]/x:div[1]/x:h2[2]", document, null, XPathResult.ANY_TYPE, null)
The fix is very simple: remove the namespaces – the “x:”, like so:
id('content')/div[2]/div[3]/div[1]/h2[2]
And then the JS code will work:
document.evaluate("id('content')/div[2]/div[3]/div[1]/h2[2]", document, null, XPathResult.ANY_TYPE, null)
March 24th, 2012 — Ubuntu, Virtualization
After doing “npm install forever” in a VirtualBox instance you may get an error like the following. This is caused by running the install from a folder shared with the host machine. Certain file operations fail when crossing the machine/file system boundary in VirtualBox.
npm ERR! error rolling back [email protected] Error: UNKNOWN, unlink '/vagrant/node_modules/forever/node_modules/winston/docs/winston/transports.html'
npm ERR! Error: UNKNOWN, symlink '../ncp/bin/ncp'
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
npm ERR!
npm ERR! System Linux 2.6.32-33-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "forever"
npm ERR! cwd /vagrant
npm ERR! node -v v0.6.13
npm ERR! npm -v 1.1.9
npm ERR! path ../ncp/bin/ncp
npm ERR! code UNKNOWN
npm ERR! message UNKNOWN, symlink '../ncp/bin/ncp'
npm ERR! errno {}
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/async
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /vagrant/npm-debug.log
npm not ok
March 20th, 2012 — Uncategorized
This fixes the following error:
/vagrant/node_modules/pg/wscript:16: error: The program ['pg_config'] is required
apt-get install libpq-dev
npm install pg
March 19th, 2012 — Uncategorized
The following script will fire an alert box for local files:
// ==UserScript==
// @name Matcher
// @descriptions Match Local Files
// @version 1
// @match file://*
// ==/UserScript==
alert(1);
Save as “match.user.js”. Drop into a Chrome tab and you will be prompted to install. These are done per user profile. Each time you re-install the script, you need to remove the script from the extensions tab and repeat this process.
In order for this to work correctly, you need to open the Extensions settings in Chrome. You need to allow access to file urls, and incognito mode, if necessary.

(Click to enlarge)