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 connection = { | |
notes: { fcrds: { fcrdns: "Hello World" } } | |
}; | |
var thing_we_want = "notes.fcrds.fcrdns"; | |
var thing = connection; | |
var parts = thing_we_want.split('.'); | |
while(parts.length > 0) { | |
thing = thing[parts.shift()]; |
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
setInterval(function () { console.log("ping") }, 1000); | |
process.on('SIGINT', function () { console.log("Got SIGINT") }); | |
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 util = require('util'); | |
function json_stringify_safe(node, parents){ | |
parents = parents || []; | |
console.log("Looking at: ", node); | |
if(!node || typeof node != "object" || util.isDate(node) || util.isError(node) || util.isRegExp(node)){ | |
return JSON.stringify(node); | |
} |
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
"use strict"; | |
var fs = require('fs'); | |
var path = require('path'); | |
fs.readdirSync(__dirname + '/model').forEach(function (model_file) { | |
if (/\.js$/.test(model_file)) { | |
var key = model_file.replace(/\.js$/, ''); | |
exports[key] = require(path.join(__dirname, 'model', model_file)); | |
} |
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
Run with: perl -C uni.pl |
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
// Fixup the email (TODO: we should probably clone the transaction here because we don't want it changed for every RCPT TO) | |
trans.remove_header('List-Unsubscribe'); | |
trans.add_header('List-Unsubscribe', list.email.replace('@', '-unsub@')); | |
trans.remove_header('List-ID'); | |
trans.add_header('List-ID', list.name + " <" + list.email.replace('@', '.') + ">"); | |
trans.remove_header('List-Message-Id'); | |
trans.add_header('List-Message-Id', id); | |
if (list.reply_to_set) { | |
trans.remove_header('Reply-To'); | |
trans.add_header('Reply-To', list.email); |
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
"use strict"; | |
var fs = require('fs'); | |
var cache = {}; | |
var timers = {}; | |
var times = 0; | |
function leak_test (name, cb) { | |
if (cache[name]) { |
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
$ echo 'process.removeAllListeners("uncaughtException");' > /tmp/foo.js | |
$ node /tmp/foo.js | |
[exits normally] |
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
select start_date, end_date from employees where company_id=10; start_date | end_date | |
------------+---------- | |
2013-05-31 | | |
2013-07-09 | | |
2013-07-17 | | |
2013-05-31 | | |
2013-05-31 | | |
2013-05-31 | |
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
diff --git a/connection.js b/connection.js | |
index 3be5f70..c0fa9b8 100644 | |
--- a/connection.js | |
+++ b/connection.js | |
@@ -1105,7 +1105,7 @@ Connection.prototype.cmd_mail = function(line) { | |
var results; | |
var from; | |
try { | |
- results = rfc1869.parse("mail", line); | |
+ results = rfc1869.parse("mail", line, config.get('strict_rfc1869') && !this.relaying); |