Skip to content

Instantly share code, notes, and snippets.

View c4milo's full-sized avatar
:octocat:

Camilo Aguilar c4milo

:octocat:
View GitHub Profile
camilo@macbooksito:~/Development/node-libvirt$ expresso test/storage_pool.test.js
libvir: Storage error : invalid storage pool pointer in virStoragePoolCreate
uncaught: TypeError: Cannot call method 'replace' of undefined
at error (/usr/local/bin/expresso:699:27)
at next (/usr/local/bin/expresso:768:21)
at next (/usr/local/bin/expresso:771:26)
at next (/usr/local/bin/expresso:771:26)
at runSuite (/usr/local/bin/expresso:773:6)
at check (/usr/local/bin/expresso:637:16)
LIBVIRT
libvirt = require('libvirt');
libvirt.version
HYPERVISOR
hypervisor.capabilities()
hypervisor.vcpus.max(type)
camilo@macbooksito:~/Development/node-inotify$ node test.js
notify created inotify-segfault-test
notify created inotify-segfault-test
notify modified inotify-segfault-test
notify modified inotify-segfault-test
notify modified inotify-segfault-test
file removed
camilo@macbooksito:~/Development/node-inotify$
var fs = require('fs');
var sys = require('sys');
var Inotify = require('inotify').Inotify;
var aF = 'inotify-segfault-test';
var aN = new Inotify();
var aW = null;
aN.addWatch({path:'.', watch_for:Inotify.IN_CREATE, callback:function(event) {
console.log('notify created '+event.name);
var o = /\/byname\/(?:([^\/\.]+))(?:\.([^\/\.]+))\/?/;
var r = /\/byname\/(?:([^\/]+))\.*(?:\.([^\/\.]+))\/?/;
var p = '/users/byname/c.aa.ea.3!@#$%&&?asdf.ddf.json/?';
var p3 = '/users/byname/c.aa.ea.3!@#$%&&?asdf.ddf.json/?';
var p2 = '/users/byname/tj.json/?';
if(captures = p3.match(r)) {
for (var i in captures) {
console.log(i + '-> '+ captures[i]);
}
@c4milo
c4milo / gist:653936
Created October 29, 2010 17:21
router.test.js
camilo@macbooksito:~/Development/connect$ make test TESTS=test/router.test.js
uncaught: AssertionError: expected response body of 'file: jquery.js', got 'Cannot GET /account/12/files/jquery.js'
at IncomingMessage.<anonymous> (/home/camilo/Development/connect/test/helpers/http.js:58:28)
at IncomingMessage.emit (events:41:20)
at HTTPParser.onMessageComplete (http:107:23)
at Client.onData [as ondata] (http:848:27)
at IOWatcher.callback (net:494:29)
at node.js:768:9
node mongoose-test.js
node.js:63
throw e;
^
TypeError: Cannot read property 'prototype' of undefined
at Array._cast (/opt/local/lib/node/.npm/mongoose/1.0.16/package/lib/mongoose/types/array.js:62:33)
at Object.map (native)
at Array.<anonymous> (/opt/local/lib/node/.npm/mongoose/1.0.16/package/lib/mongoose/types/array.js:129:36)
at Object.<anonymous> (/Users/camilo/Dropbox/Development/buglabs/playground/xmpp/mongoose-test.js:80:15)
@c4milo
c4milo / test.js
Created March 21, 2011 18:55
exception
curl -d@VirtualBox-4.0.4-70112-OSX.dmg http://localhost:5000/
node testfileupload.js
Express app started on port 5000
TypeError: Cannot use 'in' operator to search for 'R�y�o�J*JO>�D����?1g3k?��E���ʲP����?�q��q)�g�B0�b�
vV' in
at String.IN (native)
at querystring:92:19
at String.replace (native)
@c4milo
c4milo / npm.js
Created March 22, 2011 18:53
npm error
camilo@buggersillo:~/> curl http://npmjs.org/install.sh | npm_install=rc sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2047 100 2047 0 0 16216 0 --:--:-- --:--:-- --:--:-- 41775
fetching: http://registry.npmjs.org/npm/-/npm-1.0.0rc3.tgz
0.4.3
! [ -d .git ] || git submodule update --init
node cli.js cache clean
node cli.js rm npm -g
npm WARN Not installed in /usr/local/lib/node_modules npm
We couldn’t find that file to show.