Skip to content

Instantly share code, notes, and snippets.

View wankdanker's full-sized avatar

Dan VerWeire wankdanker

View GitHub Profile

/etc/ld.so.conf.d/psql.conf

#pervasive sql libraries
/usr/local/psql/lib/

Then issue sudo ldconfig

make: Entering directory `/home/dverweire/projects/node/node-odbc/build'
CXX(target) Release/obj.target/odbc_bindings/src/odbc.o
../src/odbc.cpp: In static member function ‘static void ODBC::Init(v8::Handle<v8::Object>)’:
../src/odbc.cpp:65:16: warning: unused variable ‘isolate’ [-Wunused-variable]
v8::Isolate* isolate = v8::Isolate::GetCurrent();
../node_modules/nan/nan_new.h: In instantiation of ‘typename NanIntern::Factory<T>::return_t NanNew(A0) [with T = v8::Integer; A0 = long int; typename NanIntern::Factory<T>::return_t = v8::Local<v8::Integer>]’:
../src/odbc.cpp:386:18: required from here
../node_modules/nan/nan_new.h:209:41: error: call of overloaded ‘New(long int&)’ is ambiguous
return NanIntern::Factory<T>::New(arg0);
^
@wankdanker
wankdanker / install.md
Last active August 29, 2015 14:19
Installing kdev-qmljs (JavaScript/Nodejs Code Completion) for kdevelop on Ubuntu 14.04

This is what I had to do in order to get code completion for node.js to work with kdevelop on Ubuntu 14.04.

I have not run through these steps again on a fresh system so, I'm not sure if I'm missing anything here. If you find something missing please let me know.

#enable the backports repository to get kdevelop 4.7
sudo apt-add-repository ppa:kubuntu-ppa/backports
sudo apt-get update

#you may be able to skip this step if you want, but I did it.
@wankdanker
wankdanker / gist:1270888
Created October 7, 2011 17:38
node-odbc debug
self: 0x7f16b4000ba0 hdbc: 0x16cff40 stmt: (nil)
self: 0x16a9050 hdbc: 0x16b5d20 stmt: 0x2f00c208053e0f2f
self: 0x16a94f0 hdbc: 0x7f16b40011d0 stmt: 0x3f077ba918000000
self: 0x7f16ac000d00 hdbc: 0x178c770 stmt: (nil)
self: 0x7f16ac000ba0 hdbc: 0x7f16b4047f90 stmt: (nil)
self: 0x16a76b0 hdbc: 0x16d13c0 stmt: 0x6c6975622f636264
self: 0x7f16ac000e60 hdbc: 0x17f31c0 stmt: (nil)
self: 0x7f16ac001120 hdbc: 0x16e02d0 stmt: (nil)
self: 0x7f16ac000fc0 hdbc: 0x7f16ac0762e0 stmt: (nil)
self: 0x7f16ac001280 hdbc: 0x182f400 stmt: (nil)
/*
* Copyright (c) 2011, Ben Noordhuis <info@bnoordhuis.nl>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@wankdanker
wankdanker / 0001-Add-support-for-uv_udp_set_broadcast.patch
Created November 4, 2011 14:35
Add setBroadcase support to node 0.5.10 and libuv
From 8ebf3363017dc223da153e69b372749ace222244 Mon Sep 17 00:00:00 2001
From: Dan VerWeire <dverweire@gmail.com>
Date: Thu, 27 Oct 2011 10:48:10 -0400
Subject: [PATCH 1/2] Add support for uv_udp_set_broadcast
---
deps/uv/include/uv.h | 12 ++++++++++++
deps/uv/src/unix/udp.c | 16 ++++++++++++++++
2 files changed, 28 insertions(+), 0 deletions(-)
@wankdanker
wankdanker / Linux-2.6.32-22-generic.md
Created November 4, 2011 17:37
nodejs tests for 0.6 release

####Linux inspection09 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i686 GNU/Linux

[23:28|% 100|+ 623|-   9]: Done

Notes: Head @ 5213c390, bare metal


DEST_OS: linux
@wankdanker
wankdanker / Linux-2.6.32.md
Created November 7, 2011 15:43
udp multiple process bind test results
user@inspection09:/tmp$ uname -a
Linux inspection09 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i686 GNU/Linux


user@inspection09:/tmp$ netstat -plun
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 0.0.0.0:12345           0.0.0.0:*                           7853/udp-bind-twice
udp        0      0 0.0.0.0:12345           0.0.0.0:*                           7776/udp-bind-twice
@wankdanker
wankdanker / SimpleHTTPServer.js
Created November 18, 2011 16:13
A simple static file server for node
var http = require('http'),
fs = require('fs'),
cwd = process.cwd();
http.createServer()
.on('request', function (request, response) {
var url = unescape(request.url);
var path = cwd + url;
console.log(request.socket.remoteAddress, path);
@wankdanker
wankdanker / gist:1377895
Created November 18, 2011 21:58
node 0.6.2 windows xp
=== debug test-c-ares ===
Path: simple/test-c-ares
C:\node\test\simple\test-c-ares.js:46
if (error) throw error;
^
Error: getaddrinfo ENOENT
at errnoException (dns.js:31:11)
at Object.onanswer [as oncomplete] (dns.js:140:16)
Command: C:\node\Debug\node.exe C:\node\test\simple\test-c-ares.js
=== debug test-child-process-double-pipe ===