This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set chan [socket 127.0.0.1 9900] | |
while {1} { | |
puts -nonewline "Message? " | |
flush stdout | |
set msg [gets stdin] | |
puts $chan $msg | |
flush $chan | |
puts "server response: [gets $chan]" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('stdout._type:', process.stdout._type); | |
process.nextTick(function() { | |
process.exit(123); | |
}); | |
process.on('exit', function(code) { | |
process.nextTick(function() { | |
console.log('This does not run, as the docs say.'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* A simple module to query an OID (Oracle Internet Directory) server in order to | |
* look up the full connection string for a given database name. | |
*/ | |
var ldap = require('ldapjs'); | |
module.exports.byAlias = function(dbAlias, callback) { | |
var client = ldap.createClient({ | |
url: 'ldap://oid:123/', | |
timeout: "2000", // LDAP operations timeout (milliseconds) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var genericPool = require('generic-pool'); | |
// This is the 'nearinfinity' driver: `npm install oracle` | |
var oracle = require('oracle'); | |
conf = { | |
"hostName": "localhost", | |
"port": 1521, | |
"user": "oracle", | |
"password": "oracle", | |
"database": "xe", | |
} |