Skip to content

Instantly share code, notes, and snippets.

💚
love

stagas stagas

💚
love
Block or report user

Report or block stagas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View failure
ubuntu@default:~/.node_libraries/nun$ make
test/test-basic.js: crypto:3638
return (new Hash).init(hash);
^
TypeError: undefined is not a function
at CALL_NON_FUNCTION_AS_CONSTRUCTOR (native)
at Object.createHash (crypto:3638:11)
at /home/ubuntu/.node_libraries/nun/index.js:35:19
at EventEmitter._tickCallback (node.js:48:25)
at node.js:204:9
View gist:415765
Waf: Entering directory `/home/pubuntu/node/build'
DEST_OS: linux
DEST_CPU: x86
Parallel Jobs: 1
Waf: Leaving directory `/home/pubuntu/node/build'
'build' finished successfully (0.210s)
python tools/test.py --mode=release simple
=== release test-http-304 ===
Path: simple/test-http-304
Server running at http://127.0.0.1:12346/
View boon.js
$('document').ready(function() {
var $img = $('img'); // Cache the image. Better for performance.
$img.draggable();
$img.css({
left: ($(document).width() / 2) - ($img.width() / 2),
top: ($(document).height() / 2) - ($img.height() / 2)
View Multiuser Sketchpad add for window.onresize event.
function onResize() {
var new_height = window.innerHeight;
messages.style.height = (new_height - 132) + 'px';
panel.style.height = new_height + 'px';
}
window.onresize = onResize;
onResize();
View shitty cygwin shell output for libxmljs errors
/usr/local/include/node/v8.h:203: undefined reference to `v8::Null()'
/usr/local/include/node/v8.h:217: undefined reference to `v8::FunctionTemplate::
GetFunction()'
/usr/local/include/node/v8.h:217: undefined reference to `v8::Function::NewInsta
nce(int, v8::Handle<v8::Value>*) const'
/usr/local/include/node/v8.h:203: undefined reference to `v8::External::New(void
*)'
/usr/local/include/node/v8.h:217: undefined reference to `v8::Object::SetInterna
lField(int, v8::Handle<v8::Value>)'
/usr/local/include/node/v8.h:219: undefined reference to `v8::V8::MakeWeak(v8::i
View test-nstore-remove-fail.js
var sys = require('sys')
, nStore = require('nstore')
var adb = nStore('mmm.db')
adb.clear()
function log(msg) {
sys.log(msg)
}
function logs(msg) {
View js for loop speed test
var myarray = []
for (var i=0; i<5000000; i++) {
myarray.push(i)
}
var time, newTime, wlen=0, wlength=0
for (var y=0; y<20; y++) {
time = new Date()
for (var x=0; x<10; x++) {
for (var i=0; i<myarray.length; i++) {
View weird audio bug
var Sfx = function() {
this.sounds = {}
this.active = false
this.max = 12
this.playing = 0
}
Sfx.prototype = {
init: function() {
this.active = true
View redis hangs
$ redis-server.exe redis.conf
[4636] 16 Oct 00:58:19 * Using '/cygdrive/h/redis.swap' as swap file
[4636] 16 Oct 00:58:19 * Allocating 4294967296 bytes of swap file
[4636] 16 Oct 00:58:19 * Swap file allocated with success
[4636] 16 Oct 00:58:19 - Allocated 16777216 bytes page table for 134217728 pages
[4636] 16 Oct 00:58:19 * Server started, Redis version 2.0.3
View strace on redis hang (last lines)
2494438 440345048 [main] redis-server 5908 fhandler_base::lseek: setting file pointer to 0
42 440345090 [main] redis-server 5908 lseek64: 0 = lseek (3, 0, 0)
4208 440349298 [main] redis-server 5908 writev: writev (3, 0x22C714, 1)
40 440349338 [main] redis-server 5908 fhandler_base::write: binary write
216 440349554 [main] redis-server 5908 writev: 315 = write (3, 0x22C714, 1), errno 0
227 440349781 [main] redis-server 5908 fhandler_base::lseek: setting file pointer to 0
31 440349812 [main] redis-server 5908 lseek64: 0 = lseek (3, 0, 1)
2465430 442815242 [main] redis-server 5908 fhandler_base::lseek: setting file pointer to 0
45 442815287 [main] redis-server 5908 lseek64: 0 = lseek (3, 0, 0)
2525 442817812 [main] redis-server 5908 writev: writev (3, 0x22C714, 1)
You can’t perform that action at this time.